Draw path on a static map image

8 posts / 0 new
Last post
AndreaFerrarelli
Draw path on a static map image

I'm trying to draw my own path on a static map downloaded via Static Map API.

The map is downloaded rightly and I'm able to show it on my application, but I have some trouble to choose the right proportions for place my path over the image because the margins and the scale are different for each map I download. Which is the best way to do what I want? There is a way to know the exact longitude/latitude range of the downloaded image.

I attach a couple of image where the blue rectangle show the requested area for the obtained image and the track (in fucsia) don't overlap the street.

http://www.ferrarelli.eu/MapQuest/Img1.jpg

http://www.ferrarelli.eu/MapQuest/Img2.jpg


AndreaFerrarelli
Sorry, but I'm not able to

Sorry, but I'm not able to upload images.


AndreaFerrarelli
(No subject)

MQBrianCoakley
There is no meta data in the
There is no meta data in the image to indicate the map center, zoom, or bounds. We recommend using the static map API's route function.

AndreaFerrarelli
Hi Brian, thanks for your

Hi Brian, thanks for your answer.

If I understand rightly, the route function compute the route between two points, but I need to draw a path acquired with a cycling GPS device. In the meanwile, I tought it could be do using the polygon function, but probably I need to do some optimization in the number of points because I have thousands of point for each activity.

Or maybe, I must use other tools instead static maps.


MQBrianCoakley
You can encode those lines or
You can encode those lines or generalize the shape points.

AndreaFerrarelli
Thank you for the answer: ill

Thank you for the answer: ill try and I let you know.


MQBrianCoakley
You're welcome. Let us know
You're welcome. Let us know if you have any other questions.