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.
<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>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Maps API" 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-API?hl=en
-~----------~----~----~----~------~----~------~--~---