Draw a line into a map obtained via ModestMap
I'm playing around with your fine ModestMap (latest revision from the SVN). I'm able to get maps from Google for a given center coordinate.
Because I have route information also by hand (in forms of geo codes), I would like to draw a line into the map (as Google does it).
But I'm unable to figure out, how to come from a given geocode to an image coordinate in order to draw the line form the start of the route to the next waypoint. Only the first point seems to be fixed after all the math: The centered point, which is at (width/2, height/2).
Is there any means to calculate the image coordinates of other geo coordinates around?
Any pointer welcome
Because I have route information also by hand (in forms of geo codes), I would like to draw a line into the map (as Google does it).
But I'm unable to figure out, how to come from a given geocode to an image coordinate in order to draw the line form the start of the route to the next waypoint. Only the first point seems to be fixed after all the math: The centered point, which is at (width/2, height/2).
Is there any means to calculate the image coordinates of other geo coordinates around?
Any pointer welcome
2
people have this question
I have this question, too!
Tell me when someone answers.
The more people who ask this question, the more it gets noticed.
The more people who ask this question, the more it gets noticed.
Create a customer community for your own organization
Plans starting at $19/month
-
Inappropriate?I'm not sure I understand what you're asking, but I'll give it a shot. Assuming you're using the correct coordinate system, you'd use the map's locationPoint method as defined in Map.as...
/**
* Get a point (x, y) for a location (lat, lon) in the context of a given clip.
*
* @param Location to match.
* @param Movie clip context in which returned point should make sense.
*
* @return Matching point.
*/
public function locationPoint(location:Location, context:MovieClip):Point{ ... }
Loading Profile...



