How do I link to Google Maps with a particular longitude and latitude?

前端 未结 15 2196
夕颜
夕颜 2020-12-02 04:49

I have a small application that gives the current location: longitude and latitude. Now I have to browse to google maps with the longitude and latitude. Please suggest how I

15条回答
  •  有刺的猬
    2020-12-02 04:59

    These are URLs that work:

    http://maps.google.com/?q=,

    https://maps.google.com/?q=,&ll=,&z=18

    https://www.google.com/maps/@,,16z

    https://maps.google.com/?q=,&z=16

    Although (for avid readers) This is the latest from google (August 22 2017):

    Maps URLs
    Maps URLs with map display
    Maps URLs with search action

    From google

    Search: When searching for a specific place, the resulting map puts a pin in the specified location and displays available place details.

    Important: The parameter api=1 identifies the version of Maps URLs this URL is intended for. This parameter is required in every request. The only valid value is 1. If api=1 is NOT present in the URL, all parameters are ignored and the default Google Maps app will launch, either in a browser or the Google Maps mobile app, depending on the platform in use (for example, https://www.google.com/maps).

提交回复
热议问题