Get latitude/longitude coordinates from a Google map using a marker

后端 未结 5 1805
梦如初夏
梦如初夏 2020-12-24 07:54

I just wondered if anyone knew of a simple script available that will do the following:

Load a google map in view, when clicked it displays a marker that will save t

5条回答
  •  执笔经年
    2020-12-24 08:53

    Check out Google maps API v.3. From the events page:

     google.maps.event.addListener(map, 'click', function(event) {
       // use event.latLng to place a google.maps.Marker
     });
    

提交回复
热议问题