mirror of
https://github.com/Leaflet/Leaflet.git
synced 2025-08-16 16:45:22 +00:00
docs: 📝 Adding documentation for the support of lon in the latLng function, resolves 8509 (#8524)
Co-authored-by: Volodymyr Agafonkin <agafonkin@gmail.com>
This commit is contained in:
@ -18,6 +18,7 @@ import {toLatLngBounds} from './LatLngBounds';
|
||||
* ```
|
||||
* map.panTo([50, 30]);
|
||||
* map.panTo({lat: 50, lng: 30});
|
||||
* map.panTo({lat: 50, lon: 30});
|
||||
* map.panTo(L.latLng(50, 30));
|
||||
* ```
|
||||
*
|
||||
@ -109,6 +110,7 @@ LatLng.prototype = {
|
||||
// @alternative
|
||||
// @factory L.latLng(coords: Object): LatLng
|
||||
// Expects an plain object of the form `{lat: Number, lng: Number}` or `{lat: Number, lng: Number, alt: Number}` instead.
|
||||
// You can also use `lon` in place of `lng` in the object form.
|
||||
|
||||
export function toLatLng(a, b, c) {
|
||||
if (a instanceof LatLng) {
|
||||
|
Reference in New Issue
Block a user