CRS class

Inheritance
Annotations
  • @JS('CRS')

Constructors

CRS()

Properties

code String
Methods Standard code name of the CRS passed into WMS services (e.g. 'EPSG:3857')
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
infinite bool
If true, the coordinate space will be unbounded (infinite in both axes)
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
wrapLat List<double>
Like wrapLng, but for the latitude (vertical) axis.
getter/setter pair
wrapLng List<double>
An array of two numbers defining whether the longitude (horizontal) coordinate axis wraps around a given range and how. Defaults to -180, 180 in most geographical CRSs. If undefined, the longitude axis does not wrap around.
getter/setter pair

Methods

addEventParent(Evented obj) Evented
Adds an event parent - an Evented that will receive propagated events
inherited
addTo(LeafletMap map) Layer
Adds the layer to the given map or layer group.
inherited
beforeAdd(LeafletMap map) Layer
Optional method. Called on map.addLayer(layer), before the layer is added to the map, before events are initialized, without waiting until the map is in a usable state. Use for early initialization only.
inherited
bindPopup(Popup content) Layer
Binds a popup to the layer with the passed content and sets up the necessary event listeners. If a Function is passed it will receive the layer as the first argument and should return a String or HTMLElement
inherited
bindTooltip(String content, [TooltipOptions? options]) Tooltip
Binds a tooltip to the layer with the passed content and sets up the options>options?) necessary event listeners. If a Function is passed it will receive the layer as the first argument and should return a String or HTMLElement.
inherited
closePopup() Layer
Closes the popup bound to this layer if it is open.
inherited
closeTooltip() Layer
Closes the tooltip bound to this layer if it is open.
inherited
distance(LatLng latlng1, LatLng latlng2) double
Returns the distance between two geographical coordinates.
fire(String type, [dynamic data, bool? propagate]) Evented
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.
inherited
getAttribution() String
Used by the attribution control, returns the attribution option.
inherited
getPane([String? name]) Element
Returns the HTMLElement representing the named pane on the map. If name is omitted, returns the pane for this layer
inherited
getPopup() Popup
Returns the popup bound to this layer.
inherited
getProjectedBounds(double zoom) Bounds
Returns the projection's bounds scaled and transformed for the provided zoom.
getTooltip() Tooltip
Returns the tooltip bound to this layer.
inherited
isPopupOpen() bool
Returns true if the popup bound to this layer is currently open.
inherited
isTooltipOpen() bool
Returns true if the tooltip bound to this layer is currently open.
inherited
latLngToPoint(LatLng latlng, double zoom) Point
Projects geographical coordinates into pixel coordinates for a given zoom.
listens(String type) bool
Returns true if a particular event type has any listeners attached to it.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
off(String type, [Function? fn, dynamic context]) Evented
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.
inherited
on(String type, Function fn, [dynamic context]) Evented
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').
inherited
onAdd(LeafletMap map) Layer
Should contain code that creates DOM elements for the layer, adds them to map panes where they should belong and puts listeners on relevant map events. Called on map.addLayer(layer).
inherited
once(String type, Function fn, [dynamic context]) Evented
Behaves as on(…), except the listener will only get fired once and then removed.
inherited
onRemove(LeafletMap map) Layer
Should contain all clean up code that removes the layer's elements from the DOM and removes listeners previously added in onAdd. Called on map.removeLayer(layer).
inherited
openPopup([LatLng? latlng]) Layer
Opens the bound popup at the specified latlng or at the default popup anchor if no latlng is passed.
inherited
openTooltip([LatLng? latlng]) Layer
Opens the bound tooltip at the specified latlng or at the default tooltip anchor if no latlng is passed.
inherited
pointToLatLng(Point point, double zoom) LatLng
The inverse of latLngToPoint. Projects pixel coordinates on a given zoom into geographical coordinates.
project(LatLng latlng) Point
Projects geographical coordinates into coordinates in units accepted for this CRS (e.g. meters for EPSG:3857, for passing it to WMS services).
remove() Layer
Removes the layer from the map it is currently active on.
inherited
removeEventParent(Evented obj) Evented
Removes an event parent, so it will stop receiving propagated events
inherited
removeFrom(LeafletMap map) Layer
Removes the layer from the given map
inherited
scale(double zoom) double
Returns the scale used when transforming projected coordinates into pixel coordinates for a particular zoom. For example, it returns 256 * 2^zoom for Mercator-based CRS.
setPopupContent(Popup content) Layer
Sets the content of the popup bound to this layer.
inherited
setTooltipContent(String content) Layer
Sets the content of the tooltip bound to this layer.
inherited
togglePopup() Layer
Opens or closes the popup bound to this layer depending on its current state
inherited
toggleTooltip() Layer
Opens or closes the tooltip bound to this layer depending on its current state.
inherited
toString() String
A string representation of this object.
inherited
unbindPopup() Layer
Removes the popup previously bound with bindPopup.
inherited
unbindTooltip() Layer
Removes the tooltip previously bound with bindTooltip.
inherited
unproject(Point point) LatLng
Given a projected coordinate returns the corresponding LatLng. The inverse of project.
wrapLatLng(LatLng latlng) LatLng
Returns a LatLng where lat and lng has been wrapped according to the CRS's wrapLat and wrapLng properties, if they are outside the CRS's bounds.
wrapLatLngBounds(LatLngBounds bounds) LatLngBounds
Returns a LatLngBounds with the same size as the given one, ensuring that its center is within the CRS's bounds. Only accepts actual L.LatLngBounds instances, not arrays.
zoom(double scale) double
Inverse of scale(), returns the zoom level corresponding to a scale factor of scale.

Operators

operator ==(Object other) bool
The equality operator.
inherited