Display location Using Longitude/Latitude Coordinates - Google Maps

后端 未结 2 1257
北荒
北荒 2020-12-31 07:31

How can I input a set of coordinates and have Google maps show a location. This is all to be done through javascript (ie: no user interface)

Any help is appreciated<

2条回答
  •  南笙
    南笙 (楼主)
    2020-12-31 08:10

    Note: If you already have a latitude/longitude, see Alteveer’s answer.

    You'll need to need to use a geolocation service to get the latitude/longitude. Google Maps has one built in: http://code.google.com/apis/maps/documentation/javascript/services.html#Geocoding

    Here's an example of how to use it:

    
    

提交回复
热议问题