NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

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
41112
accept rate: 0%

edited 14 Aug '15, 06:34

scai's gravatar image

scai ♦
33.3k21309459


permanent link

answered 15 Aug '15, 10:40

mmd's gravatar image

mmd
5.7k15388
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

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

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:

×122

question asked: 14 Aug '15, 06:00

question was seen: 6,819 times

last updated: 19 Aug '15, 05:14

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum