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

Hi there, i would like to know how does the zoom algorithm works. I have to implement it in my own map control and zooming in or out into a point has to be the same as this behavior. Thank you very much!

asked 21 Nov '14, 15:52

Fabri's gravatar image

Fabri
-2111
accept rate: 0%

edited 02 Jan '15, 17:48

SomeoneElse's gravatar image

SomeoneElse ♦
36.9k71370866

Which "the zoom algorithm"? Please edit your question.

(21 Nov '14, 16:10) aseerel4c26 ♦

I ment how do I zoom out or in keeping the zone under the mouse pointer in the same place.

(21 Nov '14, 16:16) Fabri
1

This question is not related to OSM itself. Why don't you check the source code in openLayers or leaflet ?

(21 Nov '14, 16:56) Pieren

I did check there, but i couldn't find it.

(21 Nov '14, 17:21) Fabri

@Fabri, which software or website do you mean?

(21 Nov '14, 19:54) aseerel4c26 ♦

Just zoom into the coordinates of the mouse position? Or is your question about the slippy map tilenames?

permanent link

answered 21 Nov '14, 18:15

scai's gravatar image

scai ♦
33.3k21309459
accept rate: 23%

www.OpenStreetMap.org uses Leaflet to display map tiles and handle events such as zoom (whether via the mousewheel or via a +/- control). The Leaflet source code is available if you want to have a poke around in it to see what it's doing.

permanent link

answered 02 Jan '15, 16:53

SomeoneElse's gravatar image

SomeoneElse ♦
36.9k71370866
accept rate: 16%

edited 02 Jan '15, 17:46

aseerel4c26's gravatar image

aseerel4c26 ♦
32.6k18248554

(03 Jan '15, 10:22) stephan75

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:

×107
×14
×2

question asked: 21 Nov '14, 15:52

question was seen: 5,692 times

last updated: 03 Jan '15, 10:22

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