If the points don't need to be interactive, it is just as easy and
definitely more optimal performance-wise to just draw your dots onto
the bitmap data that you use for the material. That way you won't need
to add any extra geometry OR any extra display objects for each dot
marker, essentially making 0 dots and 1 gazillion dots using the same
(tiny) amount of resources.

If you decide to go with this approach, you won't even have to do any
3D math, since the dots are only drawn onto a 2D map. You do need to
convert your geographic coordinates to a point in the map though. For
the X axis, just start at the zero-meridian (Greenwich, London) and
calculate the x position from the longitude, using a scale factor that
you will need to calculate from the size of your map (remember, the
entire map is 360 degrees wide, so if it's 2000px, each degree is
~5.56px.)

For the Y axis, you'll need to read up on Mercator Projection (http://
en.wikipedia.org/wiki/Mercator_projection) which is the projection
that I'm assuming that you're using. Use the function described there
to calculate a point on a map from a given latitude, and this time
start at the equator.

So basically it's a linear function for the longitudes (really simple
math) and a non-linear one for the latitudes (just copy off of the
wikipedia article.)


Cheers



On Feb 13, 4:53 pm, Shaun <[email protected]> wrote:
> I've read over all of the posts on here and I'm having problems
> getting this to work.
>
> I'm using Away3D in Flash CS4
>
> What I have:
> 1. A sphere that is textured via a BitmapMaterial
> 2. A JSON feed that has latitude/longitude
>
> What I'd like to do is take the lat/long and use it to plot points on
> the sphere.  I figure I can do it one of two ways - either use Away3D
> to add points to the sphere, or I can change my BitmapMaterial to a
> MovieMaterial and plot points on it (add children MovieClips to the
> MovieMaterial).
>
> So - my question is two fold:
>
> 1. Which is the better approach (better = better performance for lots
> of points)
> 2. How do I go about implementing the better approach?
>
> Thanks

Reply via email to