NOTICE: is being shutdown on 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

accept rate: 0%

edited 02 Jan '15, 17:48

SomeoneElse's gravatar image

SomeoneElse ♦

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

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 ♦
accept rate: 23% 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 ♦
accept rate: 16%

edited 02 Jan '15, 17:46

aseerel4c26's gravatar image

aseerel4c26 ♦

(03 Jan '15, 10:22) stephan75
Your answer
toggle preview

Follow this question

By Email:

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



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "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:


question asked: 21 Nov '14, 15:52

question was seen: 5,655 times

last updated: 03 Jan '15, 10:22

NOTICE: is being shutdown on 1st March 2024. Please use the OpenStreetMap Community Forum