Slowly navigate to the map from one location to another
Hello Guys,
Please help me on this, I searched lot but didnt found solution.
first of all I am setting my map at one point suppose my lat long are `19.151568,41.872330`
so I am using following code to set my map on load to this points..
var val1 = "19.151568";
var val2 = "41.872330";
var lonLat = new OpenLayers.LonLat(val1,val2).transform(epsg4326, projectTo);
var zoom=18;
map.setCenter(lonLat, zoom);
Now in my js code I am calling one function i.e. `changeLocation(var1,var2);`
where var1 and var2 are my new lat and long for example : `18.950367,41.553726`
so my code for `changeLocation(var1,var2)` is as follows
function changeLocation(var1,var2) {
var zoomlvl = map.zoom;
var lonLat = new OpenLayers.LonLat(val1,val2).transform(epsg4326, projectTo);
map.setCenter(lonLat, zoomlvl);
}
after this function my map immediately goes to that location. where want it to go slowly from previous location to my new location.
Please help me on this.. Thank you guys..:)