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

后端 未结 5 1813
梦如初夏
梦如初夏 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:49

    I have managed the following so far - how could I amend this to move the marker position when I click anywhere on the map

    http://jsfiddle.net/ZW9jP/

    I've added the following but it doesnt seem to do anything

    google.maps.event.addListener(map, 'click', function(event) {
      addMarker(event.latLng);
    });  
    

提交回复
热议问题