Skip to content
This repository has been archived by the owner on Apr 6, 2020. It is now read-only.

Grabbing Map Image #2

Open
RichieMcMullen opened this issue Mar 24, 2019 · 2 comments
Open

Grabbing Map Image #2

RichieMcMullen opened this issue Mar 24, 2019 · 2 comments

Comments

@RichieMcMullen
Copy link

Is there any easy way to grab the ride map using the "polyline" code returned from the API ?

At this stage it seems impossible to successfully get the map. Any ideas on this ?

@kjellknapen
Copy link
Owner

You could use the Google static maps API to display the polyline.

https://maps.googleapis.com/maps/api/staticmap?size=600x300&maptype=roadmap&path=enc:GIVE_YOUR_POLYLINE_DATA&key=GIVE_YOUR_API_KEY

You replace the GIVE_YOUR_POLYLINE_DATA with the polyline from the api and the GIVE_YOUR_API_KEY with the google maps static api key. You could also change the size and maptype if you want. This will generate a small static map that shows the polyline. I think that is the best way to generate a map from the polyline. Here's a preview of what that would look like

Screenshot_2019-03-27 staticmap (PNG Image, 600 × 300 pixels)

Hope this helps you?

@RichieMcMullen
Copy link
Author

Excellent I'll try that this evening. Cheers.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants