I'm writing a mashup that uses both the dynamic and static map.
when the dynamic map pans, i want to capture the new lpnitude/
lattitude to re-request the static image for the new map center.
how do i do this?
This is what i have so far
function move_map(command){
var mat={}
switch(command){
case "map-left":mat={x:1,y:0};break;
case "map-right":mat={x:-1,y:0};break;
case "map-up":mat={x:0,y:1};break;
case "map-down":mat={x:0,y:-1};break;
}
map.panDirection(mat.x,mat.y);
var c=map.getCenter();
console.log(_longitude+ " : "+c.lng())
_longitude=c.lng();
_lattitude=c.lat();
reload_image(_longitude,_lattitude,_zoom);
}
but in the code above, the lon/lat never changes. the map seems to pan
without changing these values.
I figure the solution is to recalculate the new lat/lon based on
changes to the bounds but dont know where to start? maybe there is an
easier way?
any ideas
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---