MapOptions class

Annotations
  • @JS()
  • @anonymous

Constructors

MapOptions({bool? preferCanvas, bool? attributionControl, bool? zoomControl, bool? closePopupOnClick, double? zoomSnap, double? zoomDelta, bool? trackResize, bool? boxZoom, bool? doubleClickZoom, bool? dragging, CRS? crs, LatLng? center, double? zoom, double? minZoom, double? maxZoom, List? layers, LatLngBounds? maxBounds, Renderer? renderer, bool? zoomAnimation, double? zoomAnimationThreshold, bool? fadeAnimation, bool? markerZoomAnimation, double? transform3DLimit, bool? inertia, double? inertiaDeceleration, double? inertiaMaxSpeed, double? easeLinearity, bool? worldCopyJump, double? maxBoundsViscosity, bool? keyboard, bool? keyboardPanDelta, bool? scrollWheelZoom, double? wheelDebounceTime, double? wheelPxPerZoomLevel, bool? tap, double? tapTolerance, bool? touchZoom, bool? bounceAtZoomLimits})
factory

Properties

attributionControl bool
Control options /// /// /// /// /// /// /// /// /// / Whether a attribution control is added to the map by default.
getter/setter pair
bounceAtZoomLimits bool
Set it to false if you don't want the map to zoom beyond min/max zoom and then bounce back when pinch-zooming.
getter/setter pair
boxZoom bool
Whether the map can be zoomed to a rectangular area specified by dragging the mouse while pressing the shift key
getter/setter pair
center LatLng
Initial geographic center of the map
getter/setter pair
closePopupOnClick bool
Interaction Options Set it to false if you don't want popups to close when user clicks the map.
getter/setter pair
crs CRS
The Coordinate Reference System to use. Don't change this if you're not sure what it means.
getter/setter pair
doubleClickZoom bool
Whether the map can be zoomed in by double clicking on it and zoomed out by double clicking while holding shift. If passed 'center', double-click zoom will zoom to the center of the view regardless of where the mouse was.
getter/setter pair
dragging bool
Whether the map be draggable with mouse/touch or not
getter/setter pair
easeLinearity double
getter/setter pair
fadeAnimatio bool
no getter
fadeAnimation bool
Whether the tile fade animation is enabled. By default it's enabled in all browsers that support CSS3 Transitions except Android.
no setter
hashCode int
The hash code for this object.
no setterinherited
inertia bool
If enabled, panning of the map will have an inertia effect where the map builds momentum while dragging and continues moving in the same direction for some time. Feels especially nice on touch devices. Enabled by default unless running on old Android devices.
getter/setter pair
inertiaDeceleration double
The rate with which the inertial movement slows down, in pixels/second².
getter/setter pair
inertiaMaxSpeed double
Infinity Max speed of the inertial movement, in pixels/second.
getter/setter pair
keyboard bool
Makes the map focusable and allows users to navigate the map with keyboard arrows and +/- keys.
getter/setter pair
keyboardPanDelta bool
Amount of pixels to pan when pressing an arrow key.
getter/setter pair
layers List<Layer>
Array of layers that will be added to the map initially
getter/setter pair
markerZoomAnimation bool
Whether markers animate their zoom with the zoom animation, if disabled they will disappear for the length of the animation. By default it's enabled in all browsers that support CSS3 Transitions except Android.
getter/setter pair
maxBounds LatLngBounds
When this option is set, the map restricts the view to the given geographical bounds, bouncing the user back if the user tries to pan outside the view. To set the restriction dynamically, use setMaxBounds method.
getter/setter pair
maxBoundsViscosity double
If maxBounds is set, this option will control how solid the bounds are when dragging the map around. The default value of 0.0 allows the user to drag outside the bounds at normal speed, higher values will slow down map dragging outside bounds, and 1.0 makes the bounds fully solid, preventing the user from dragging outside the bounds.
getter/setter pair
maxZoom double
Maximum zoom level of the map. If not specified and at least one GridLayer or TileLayer is in the map, the highest of their maxZoom options will be used instead.
getter/setter pair
minZoom double
Minimum zoom level of the map. If not specified and at least one GridLayer or TileLayer is in the map, the lowest of their minZoom options will be used instead.
getter/setter pair
preferCanvas bool
Whether Paths should be rendered on a Canvas renderer. By default, all Paths are rendered in a SVG renderer.
getter/setter pair
renderer Renderer
The default method for drawing vector layers on the map. L.SVG or L.Canvas by default depending on browser support.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrollWheelZoom bool
Whether the map can be zoomed by using the mouse wheel. If passed 'center', it will zoom to the center of the view regardless of where the mouse was.
getter/setter pair
tap bool
Enables mobile hacks for supporting instant taps (fixing 200ms click delay on iOS/Android) and touch holds (fired as contextmenu events).
getter/setter pair
tapTolerance double
The max number of pixels a user can shift his finger during touch for it to be considered a valid tap.
getter/setter pair
touchZoom bool
Whether the map can be zoomed by touch-dragging with two fingers. If passed 'center', it will zoom to the center of the view regardless of where the touch events (fingers) were. Enabled for touch-capable web browsers except for old Androids.
getter/setter pair
trackResize bool
Whether the map automatically handles browser window resize to update itself.
getter/setter pair
transform3DLimit double
getter/setter pair
wheelDebounceTime double
Limits the rate at which a wheel can fire (in milliseconds). By default user can't zoom via wheel more often than once per 40 ms.
getter/setter pair
wheelPxPerZoomLevel double
How many scroll pixels (as reported by L.DomEvent.getWheelDelta) mean a change of one full zoom level. Smaller values will make wheel-zooming faster (and vice versa).
getter/setter pair
worldCopyJump bool
With this option enabled, the map tracks when you pan to another "copy" of the world and seamlessly jumps to the original one so that all overlays like markers and vector layers are still visible.
getter/setter pair
zoom double
Initial map zoom level
getter/setter pair
zoomAnimation bool
Whether the map zoom animation is enabled. By default it's enabled in all browsers that support CSS3 Transitions except Android.
getter/setter pair
zoomAnimationThreshold double
Won't animate zoom if the zoom difference exceeds this value.
getter/setter pair
zoomControl bool
Whether a zoom control is added to the map by default.
getter/setter pair
zoomDelta double
Controls how much the map's zoom level will change after a zoomIn(), zoomOut(), pressing + or - on the keyboard, or using the zoom controls. Values smaller than 1 (e.g. 0.5) allow for greater granularity.
getter/setter pair
zoomSnap double
Forces the map's zoom level to always be a multiple of this, particularly right after a fitBounds() or a pinch-zoom. By default, the zoom level snaps to the nearest integer; lower values (e.g. 0.5 or 0.1) allow for greater granularity. A value of 0 means the zoom level will not be snapped after fitBounds or a pinch-zoom.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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