Here's the URL: http://fillmewithlpg.zxq.net/add2.new.php
On Jun 5, 12:33 pm, Richard Harvey <[email protected]> wrote: > When my map is loaded, it automatically creates a new marker and then > open the info window as it should do. > > I can't get the event listener to even pop up an alert box when the > marker has been dragged? What am I doing wrong? > > var latlng = new google.maps.LatLng(54.255155,-3); > > var myOptions = { > zoom: 6, > center: latlng, > mapTypeId: google.maps.MapTypeId.ROADMAP > }; > > var map = new > google.maps.Map(document.getElementById("map_canvas"), myOptions); > > var image = 'dt104.gif'; > > var MyInfoWindow = new google.maps.InfoWindow({ > content: 'Hello world' > }); > > var newmarker = new google.maps.Marker({ > position: latlng, > map: map, > draggable: true, > icon: image, > title: document.formOne.name.value + " (" + > document.formOne.road.value + "). " + document.formOne.price.value > }); > > MyInfoWindow.open(map, newmarker); > MyInfoWindow.setContent("junk"); > MyInfoWindow.setPosition(newmarker); > > google.maps.event.addListener(newmarker, 'dragend', > function(event) { > alert ('test'); > }); -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.
