Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs redirects #5824

Merged
merged 11 commits into from
Oct 5, 2017
Prev Previous commit
Next Next commit
fix links in zoom-levels example
- use relative links instead of absolute
- remove hardcoded version in lins and refer to latest version docs instead
  • Loading branch information
cherniavskii committed Oct 4, 2017
commit 192b07b22e2f852f9dc3412bedda8599f3c15ba6
22 changes: 11 additions & 11 deletions docs/examples/zoom-levels/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ At high zoom levels, the scale changes very little, and is not noticeable.
## Controlling the zoom

A leaflet map has several ways to control the zoom level shown, but the most obvious
one is [`setZoom()`](../../reference-1.0.3.html#map-setzoom). For example, `map.setZoom(0);`
one is [`setZoom()`](../../reference.html#map-setzoom). For example, `map.setZoom(0);`
will set the zoom level of `map` to `0`.

This example again uses timeouts to alternate between zoom levels `0` and `1` automatically:
Expand All @@ -199,12 +199,12 @@ shown in the previous section!

Other ways of setting the zoom are:

* [`setView(center, zoom)`](../../reference-1.0.3.html#map-setview), which also sets the map center
* [`flyTo(center, zoom)`](../../reference-1.0.3.html#map-flyto), like `setView` but with a smooth animation
* [`zoomIn()` / `zoomIn(delta)`](../../reference-1.0.3.html#map-zoomin), zooms in `delta` zoom levels, `1` by default
* [`zoomOut()` / `zoomOut(delta)`](../../reference-1.0.3.html#map-zoomout), zooms out `delta` zoom levels, `1` by default
* [`setZoomAround(fixedPoint, zoom)`](../../reference-1.0.3.html#map-setzoomaround), sets the zoom level while keeping a point fixed (what scrollwheel zooming does)
* [`fitBounds(bounds)`](../../reference-1.0.3.html#map-fitbounds), automatically calculates the zoom to fit a rectangular area on the map
* [`setView(center, zoom)`](../../reference.html#map-setview), which also sets the map center
* [`flyTo(center, zoom)`](../../reference.html#map-flyto), like `setView` but with a smooth animation
* [`zoomIn()` / `zoomIn(delta)`](../../reference.html#map-zoomin), zooms in `delta` zoom levels, `1` by default
* [`zoomOut()` / `zoomOut(delta)`](../../reference.html#map-zoomout), zooms out `delta` zoom levels, `1` by default
* [`setZoomAround(fixedPoint, zoom)`](../../reference.html#map-setzoomaround), sets the zoom level while keeping a point fixed (what scrollwheel zooming does)
* [`fitBounds(bounds)`](../../reference.html#map-fitbounds), automatically calculates the zoom to fit a rectangular area on the map


## Fractional zoom
Expand All @@ -214,7 +214,7 @@ Before this, the zoom level of the map could be only an integer number (`0`, `1`
but now you can use fractional numbers like `1.5` or `1.25`.

Fractional zoom is disabled by default. To enable it, use the
[map's `zoomSnap` option](http://leafletjs.com/reference-1.0.3.html#map-zoomsnap).
[map's `zoomSnap` option](../../reference.html#map-zoomsnap).
The `zoomSnap` option has a default value of `1` (which means that the zoom level
of the map can be `0`, `1`, `2`, and so on).

Expand Down Expand Up @@ -245,12 +245,12 @@ a pinch-zoom gesture on a touchscreen.
`zoomSnap` can be set to zero. This means that Leaflet will <strong>not</strong>
snap the zoom level.

There is another important map option related to `zoomSnap`: [the `zoomDelta` option](http://leafletjs.com/reference-1.0.3.html#map-zoomdelta).
There is another important map option related to `zoomSnap`: [the `zoomDelta` option](../../reference.html#map-zoomdelta).
This controls how many zoom levels to zoom in/out when using the zoom buttons
(from the default [`L.Control.Zoom`](http://leafletjs.com/reference-1.0.3.html#control-zoom))
(from the default [`L.Control.Zoom`](../../reference.html#control-zoom))
or the `+`/`-` keys in your keyboard.

For the mousewheel zoom, the [`wheelPxPerZoomLevel`](http://leafletjs.com/reference-1.0.3.html#map-wheelpxperzoomlevel)
For the mousewheel zoom, the [`wheelPxPerZoomLevel`](../../reference.html#map-wheelpxperzoomlevel)
option controls how fast the mousewheel zooms in our out.

Here is an example with `zoomSnap` set to zero:
Expand Down