0

Actually in the current page I'm deep linking the google maps location on the button,i.e: when I clicked in button it should open new window and show the location marker.

I'm getting co-ordinates from the google maps api, the resultant window url
https://www.google.com/maps/@13.0106708,77.5552532,17z

resultant image

but I want to show the marker to that particular location like below

https://www.google.com/maps/place/Orion+Mall/@13.0106708,77.5552532,17z/data=!4m8!1m2!3m1!2sOrion+Mall!3m4!1s0x3bae3d4b805e4167:0xa4c255e80b7e5464!8m2!3d13.0110723!4d77.5549934

how to can show the marker in new window enter image description here

xomena
  • 31,125
  • 6
  • 88
  • 117
change need
  • 137
  • 2
  • 6
  • 23

1 Answers1

3

I would suggest having a look at the Google Maps URLs. Google designed Google Maps URLs as universal, cross-platform URL to launch Google Maps and perform searches, get directions and navigation, and display map views and panoramic images.

So, instead of the following URL

https://www.google.com/maps/@13.0106708,77.5552532,17z

use the official Google Maps URLs link

https://www.google.com/maps/search/?api=1&query=13.0106708,77.5552532

It will open Google Maps with marker. In case if you want to show some specific place and you retrieved a place Id from Google Maps API you can add place id in URL as well

https://www.google.com/maps/search/?api=1&query=13.0106708,77.5552532&query_place_id=ChIJZ0FegEs9rjsRZFR-C-hVwqQ

The latter will show Orion Mall place.

I hope this helps!

xomena
  • 31,125
  • 6
  • 88
  • 117