0

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..:)

asked 14 Aug '15, 06:00

akaAni's gravatar image

akaAni
26112
accept rate: 0%

edited 14 Aug '15, 06:34

scai's gravatar image

scai ♦
31.9k20291442


One Answer:
4
permanent link

answered 15 Aug '15, 10:40

mmd's gravatar image

mmd
5.6k14988
accept rate: 37%

edited 15 Aug '15, 10:42

about the mapbox solution (or even the OL or leafletjs solution):

is there any software (except GoogleEarth!) or webservice that can display this smooth zoom out and zoom in on an OSM based map, and that can capture or render a video clip from this?

(15 Aug '15, 13:38) stephan75

Thank you very much......

(19 Aug '15, 05:14) akaAni

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×117

question asked: 14 Aug '15, 06:00

question was seen: 4,870 times

last updated: 19 Aug '15, 05:14

powered by OSQA