Oops, typo in code
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 b=map.getBounds().getNorthEast();
var c=map.getBounds().getSouthWest();
_lattitude+=((b.lat()-c.lat())*mat.y)/4;
_longitude+=((b.lng()-c.lng())*mat.x)/4; <<<<<<<<
map.panTo(new GLatLng(_lattitude, _longitude));
reload_image(_longitude,_lattitude,_zoom);
}
On May 6, 2:13 pm, "mark.forster" <[email protected]> wrote:
> 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 b=map.getBounds().getNorthEast();
> var c=map.getBounds().getSouthWest();
>
> _lattitude+=((b.lat()-c.lat())*mat.y)/4;
> _longitude+=((b.lng()-c.lng())*mat.y)/4;
>
> map.panTo(new GLatLng(_lattitude, _longitude));
> reload_image(_longitude,_lattitude,_zoom);
> }
>
> On May 6, 1:42 pm, [email protected] wrote:
>
> > I would think that the panDirection method 'starts' a map pan
> > operation and you may need to set up an event to catch the moveend()
> > event.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---