I am working on a simple webapp using the V3 api. I am just starting
simple and trying to get "moveend" to trigger a div changing text, but
it just isn't working. Can anyone help me figure this out? I am a
amateur programmer so I have been hitting my head on this for hours. I
have some simple ASP above this code that gets the lat and long, but
other than that, this is all the code. Nothing put in
google.maps.Event.addListener seems to work when I pan around the
map.
here is a link to see the text on top not update.
http://iphone.placesnap.com/editlocation_03.asp?Photo=3624535389547715
Thanks everyone! I could really use the help.
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" /
>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title>Google Maps JavaScript API v3 Example: Map Simple</title>
<script type="text/javascript" src="
http://maps.google.com/maps/api/
js?sensor=false"> </script>
<script type="text/javascript">
function initialize() {
var myLatlng = new google.maps.LatLng(<%=xLatitude%>,<%=xLongitude
%>);
var myOptions = {
zoom: 14,
center: myLatlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
var map = new google.maps.Map(document.getElementById
("map_canvas"), myOptions);
}
function changetext(){
document.getElementById("message").innerHTML = "working"
}
google.maps.event.addListener(map, "moveend", function() {
changetext()
});
</script>
</head>
<body style="margin:0px; padding:0px;" onload="initialize();">
<div id="message">sdfg</div>
<div id="map_canvas" style="width:100%; height:100%"></div>
</body>
</html>