mirror of
https://github.com/Leaflet/Leaflet.git
synced 2025-07-20 16:37:08 +00:00
update docs, removing outdated references to Leaflet pre-1.0 (#9229)
Co-authored-by: Adauji <5890802@ez.edeka.net>
This commit is contained in:
@ -17,7 +17,7 @@ Map panes use the [z-index CSS property](https://developer.mozilla.org/docs/Web/
|
||||
|
||||
This is why, in Leaflet maps, popups always show "on top" of other layers, markers always show on top of tile layers, etc.
|
||||
|
||||
A new feature of **Leaflet 1.0.0** (not present in 0.7.x) is custom map panes, which allows for customization of this order.
|
||||
Custom map panes offer the capability to customize this order.
|
||||
|
||||
## The default is not always right
|
||||
|
||||
|
@ -72,9 +72,9 @@ You can find other options of `L.ImageOverlay` in the [documentation](/reference
|
||||
|
||||
### `VideoOverlay`
|
||||
|
||||
Video used to be a hard task when building a webpage, until the [`<video>` HTML element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video) was made available.
|
||||
Video used to be a hard task when building a webpage, until the [`<video>` HTML element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video) became widely supported.
|
||||
|
||||
Nowadays, we can use the following HTML code:
|
||||
Nowadays, we can easily embed videos using the following HTML code:
|
||||
|
||||
```
|
||||
<video width="500" controls>
|
||||
|
@ -143,10 +143,10 @@ And use the `tms:true` option when instantiating the layers, like so:
|
||||
}).addTo(map);
|
||||
|
||||
|
||||
A new feature in **Leaflet 1.0** is the ability to use `{-y}` in the URL instead of a `tms: true` option, e.g.:
|
||||
In Leaflet you also have the option to use `{-y}` in the URL instead of a `tms: true` option, e.g.:
|
||||
|
||||
var layer = L.tileLayer('http://base_url/tms/1.0.0/tileset/{z}/{x}/{-y}.png');
|
||||
|
||||
The `tms: true` option (in Leaflet 0.7) or `{-y}` (in Leaflet 1.0) are needed because the origin of coordinates of vanilla `L.TileLayer`s is the top left corner, so the Y coordinate goes *down*. In TMS, the origin of coordinates is the *bottom* left corner so the Y coordinate goes *up*.
|
||||
The `tms: true` option or `{-y}` are needed because the origin of coordinates of vanilla `L.TileLayer`s is the top left corner, so the Y coordinate goes *down*. In TMS, the origin of coordinates is the *bottom* left corner so the Y coordinate goes *up*.
|
||||
|
||||
Besides the difference in the `y` coordinate and the discovery of tilesets, TMS services serve tiles exactly in the way that `L.TileLayer` expects.
|
||||
|
Reference in New Issue
Block a user