GoogleMaps Marker issue when using the query parameter

ساخت وبلاگ

Vote count: 0

I have a web application with coordinates for a single location, i want to display the map with a marker to this location using a lightbox dialog.

Everything was OK regarding the map initialization and displaying in the Lightbox dialog.

But when generating a url for google maps location (to be displayed as an iframe),and after i searched for this i found some solutions that uses (the q= and q=loc: parameters)

So this url will let google display the location and make the map centered on this location

But the problem is that this does not work in all cases, i tried the following locations and it worked perfectly: (using both q= and q=loc: parameters)

https://maps.google.com/maps?q=loc:12.927923,77.627108
http://maps.google.com/maps?q=24.810036, 46.732040

but when i tried another location as the following:

https://maps.google.com/maps?q=24.810036, 46.732040
http://maps.google.com/maps?q=loc:12.927923,77.627108

the map is centered correctly but the marker is not added! So the surprise that it worked for the first coordinates but didn't work for the second one(tested on Chrome with latest version).

And what was surprising for me that when i tested it on Opera (it worked perfectly for both coordinates)

Please note that: Using the same coordinates to generate a google static map image works fine and the marker is added successfully to the image

i had to try using google embed maps but i got the same result.

asked 30 secs ago

back soft...
ما را در سایت back soft دنبال می کنید

برچسب : نویسنده : استخدام کار backsoft بازدید : 443 تاريخ : چهارشنبه 31 شهريور 1395 ساعت: 2:09