i use the following function to load virtual earth map, I wonder that after I load the map like this, can I change the map's pos

i use the following function to load virtual earth map, I wonder that after I load the map like this, can I change the map's postion after this

function GetMap()
{
map = new VEMap('myMap');
map.LoadMap(new VELatLong(37.41, -122.00), 10 ,'h' ,false); }

}

i appreciate your help




Answer this question

i use the following function to load virtual earth map, I wonder that after I load the map like this, can I change the map's pos

  • madxna

    Hi Jakein!

    You can manipulate the map position using this function

    function PanMap(x,y,latlong)
    {
    if (x!=null & y!=null)
    {
    map.Pan(x,y);
    }
    else if (latlong!=null)
    {
    map.PanToLatLong(latlong);
    }
    }

    Then...

    PanMap(null,null,new VELatLong('YourLat','YourLon'));

    []'s


  • HoOpOe

    Yep, Mauricio is right.

    You can also use the VEMap.SetCenter and VEMap.SetCenterAndZoom methods to change the map location.


  • i use the following function to load virtual earth map, I wonder that after I load the map like this, can I change the map's pos