user714852
user714852

Reputation: 2154

Is there a way to construct mobile friendly google maps urls that do not redirect to google places?

I'm attempting to construct and send a google maps url to a mobile browser. When the url is opened I would like it to bring up a google map with the geopoint marked. I have seen the stack question: What parameters should I use in a Google Maps URL to go to a lat-lon? And the answer there works perfectly for iphones, and standard PC/Mac browsers. However I opened the link I created

https://maps.google.com/maps?z=18&t=h&q=loc:51.5+-0.07

with Opera Mobile and was redirected to google places with a url like

maps.google.com/m/local?z=18&t=h&q=loc:51.5+-0.07

and the textbox was filled with

loc:51.5 -0.07

i.e. the geopoint. There was no map in sight, and searching for the details autofilled in the text box did not give me anything. When I attempted to navigate to this url on my mac it gave me a 404 error. Is there a way to construct mobile friendly google maps urls that will not redirect to google places?

Upvotes: 0

Views: 841

Answers (1)

Mano Marks
Mano Marks

Reputation: 8819

The parameters for launching Google Maps are undocumented, which means they're subject to change without notification. You might want to look at using a Google Maps API instead, such as the Static Maps API if all you want is an image: https://developers.google.com/maps/documentation/staticmaps/ or the JavaScript API: https://developers.google.com/maps/documentation/javascript/

That way too you can keep people in your own application.

Upvotes: 1

Related Questions