google-mapsurl

How to create a Google Maps link to a pin at given GPS coordinates and also a forced pin info text?


Based on What parameters should I use in a Google Maps URL to go to a lat-lon? , I've tried the following:

But none of them will make a pin with this given text, at best it retrieves the nearest object of interest. Is there a way to link a pin at exact coordinates and force a given label text (will be an address or business name, but I'd like to link exact coordinates and ensure that the displayed info text exactly matches what I specify in the URL)?

Thanks!


Solution

  • You can't ask Google Maps to display a custo infotext / label but if you want Maps to display the official label, you need to form your URL like so

    https://www.google.com/maps/search/?api=1&query=Place+de+la+R%C3%A9publique,+Paris

    The documentation that @MrUpsidown has linked is the right one.