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:
Brian Ferry
2022-10-05 01:34:55 -04:00
committed by GitHub
parent d80bab1f39
commit 2a7b51b720

View File

@ -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) {