Creates a popup with the specified content and options and opens it in the given point on a map.
Closes the popup previously opened with openPopup (or the given one).
Creates a new map pane with the given name if it doesn't exist already, then returns
it. The pane is created as a child of container, or as a child of the main map pane if not set.
Fires an event of the specified type. You can optionally provide an
data object — the first argument of the listener function will
contain its properties. The event can optionally be propagated to
event parents.
Zooms the map while keeping a specified pixel on the map (relative to the top-left corner) stationary.
Sets a map view that contains the given geographical bounds with the maximum zoom level possible.
Returns the maximum zoom level on which the given bounds fit to the map view in its entirety. If inside (optional) is set to true, the method
instead returns the minimum zoom level on which the map view fits into the given bounds in its entirety.
Methods
Returns the instance of Renderer that should be used to render the given Path. It will ensure that the renderer
options of the map and paths are respected, and that the renderers do exist on the map.
Returns the zoom level that the map would end up at, if it is at fromZoom level and
everything is scaled by a factor of scale. Inverse of getZoomScale.
Checks if the map container size changed and updates the map if so —
call it after you've changed the map size dynamically, also animating
pan by default. If options.pan is false, panning will not occur. If
options.debounceMoveend is true, it will delay moveend event so that
it doesn't happen often even if the method is called many times in a row
Tries to locate the user using the Geolocation API, firing a locationfound event with location data on
success or a locationerror event on failure, and optionally sets the map view to the user's location with
respect to detection accuracy (or to the world view if geolocation failed). Note that, if your page doesn't
use HTTPS, this method will fail in modern browsers (Chrome 50 and newer) See Locate options for more
details.
Removes a previously added listener function. If no function is
specified, it will remove all the listeners of that particular event
from the object. Note that if you passed a custom context to on, you
must pass the same context to off in order to remove the listener.
Adds a listener function (fn) to a particular event type of the object. You can optionally specify the context of the listener
(object the this keyword will point to). You can also pass several space-separated types (e.g. 'click dblclick').
Pans the map the minimum amount to make the latlng visible. Use
padding, paddingTopLeft and paddingTopRight options to fit the display
to more restricted bounds, like fitBounds. If latlng is already within
the (optionally padded) display bounds, the map will not be panned.
Pans the map to the closest view that would lie inside the given
bounds (if it's not already), controlling the animation using the
options specific, if any.
Projects a geographical coordinate LatLng according to the projection of the map's CRS,
then scales it according to zoom and the CRS's Transformation. The result is pixel
coordinate relative to the CRS origin.
Checks if the map container size changed and updates the map if so —
call it after you've changed the map size dynamically, also animating
pan by default.
Stops the currently running panTo or flyTo animation, if any.
Stops watching location previously initiated by map.locate({watch: true}) and aborts resetting the map view
if map.locate was called with {setView: true}.
Runs the given function fn when the map gets initialized with a view (center and zoom)
and at least one layer, or immediately if it's already initialized, optionally passing a function context.
Returns a LatLng where lat and lng has been wrapped according to the map's CRS's wrapLat
and wrapLng properties, if they are outside the CRS's bounds. By default this means
longitude is wrapped around the dateline so its value is between -180 and +180 degrees.
Returns a LatLngBounds with the same size as the given one, ensuring that its center is
within the CRS's bounds. By default this means the center longitude is wrapped around
the dateline so its value is between -180 and +180 degrees, and the majority of the bounds overlaps the CRS's bounds.