public static class MapOptions.Builder extends Object
Constructor and Description |
---|
Builder(LatLng center,
Double zoom,
Double minZoom)
Instantiates a new MapOtions builder.
|
Modifier and Type | Method and Description |
---|---|
MapOptions.Builder |
attributionControl(Boolean attributionControl)
Whether the attribution control is added to the map by default.
|
MapOptions.Builder |
bounceAtZoomLimits(Boolean bounceAtZoomLimits)
Set it to false if you don't want the map to zoom beyond min/max zoom and then bounce back when pinch-zooming.
|
MapOptions.Builder |
boxZoom(Boolean boxZoom)
Whether the map can be zoomed to a rectangular area specified by dragging the mouse while pressing shift.
|
MapOptions |
build()
Builds the options
|
MapOptions.Builder |
closePopupOnClick(Boolean closePopupOnClick)
Set it to false if you don't want popups to close when user clicks the map.
|
MapOptions.Builder |
doubleClickZoom(Boolean doubleClickZoom)
Whether the map can be zoomed in by double clicking on it and zoomed out by double clicking while holding shift.
|
MapOptions.Builder |
dragging(Boolean dragging)
Whether the map is draggable with mouse/touch or not.
|
MapOptions.Builder |
fadeAnimation(Boolean fadeAnimation)
Whether the tile fade animation is enabled.
|
MapOptions.Builder |
inertia(Boolean inertia)
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.
|
MapOptions.Builder |
inertiaDeceleration(double inertiaDeceleration)
The rate with which the inertial movement slows down, in pixels/second2.
|
MapOptions.Builder |
inertiaMaxSpeed(double inertiaMaxSpeed)
Max speed of the inertial movement, in pixels/second.
|
MapOptions.Builder |
inertiaThreshold(double inertiaThreshold)
Number of milliseconds that should pass between stopping the movement and releasing the mouse or touch to prevent inertial movement.
|
MapOptions.Builder |
keyboard(Boolean keyboard)
Makes the map focusable and allows users to navigate the map with keyboard arrows and +/- keys.
|
MapOptions.Builder |
keyboardPanDelta(double keyboardPanDelta)
Amount of pixels to pan when pressing an arrow key.
|
MapOptions.Builder |
layers(Layer[] layers)
Layers that will be added to the map initially.
|
MapOptions.Builder |
markerZoomAnimation(Boolean markerZoomAnimation)
Whether markers animate their zoom with the zoom animation, if disabled they will disappear for the length of the animation.
|
MapOptions.Builder |
maxBounds(LatLngBounds maxBounds)
When this option is set, the map restricts the view to the given geographical bounds, bouncing the user back when he tries to pan outside the view.
|
MapOptions.Builder |
maxBoundsViscosity(double maxBoundsViscosity)
If maxBounds is set, this option will control how solid the bounds are when dragging the map around.
|
MapOptions.Builder |
maxZoom(Double maxZoom)
Maximum zoom level of the map.
|
MapOptions.Builder |
preferCanvas(Boolean preferCanvas)
Whether Paths should be rendered on a Canvas renderer.
|
MapOptions.Builder |
renderer(Renderer renderer)
The default method for drawing vector layers on the map.
|
MapOptions.Builder |
scrollWheelZoom(Boolean scrollWheelZoom)
Whether the map can be zoomed by using the mouse wheel.
|
MapOptions.Builder |
tap(Boolean tap)
Enables mobile hacks for supporting instant taps (fixing 200ms click delay on iOS/Android) and touch holds (fired as contextmenu events).
|
MapOptions.Builder |
tapTolerance(double tapTolerance)
The max number of pixels a user can shift his finger during touch for it to be considered a valid tap.
|
MapOptions.Builder |
touchZoom(Boolean touchZoom)
Whether the map can be zoomed by touch-dragging with two fingers.
|
MapOptions.Builder |
trackResize(Boolean trackResize)
Whether the map automatically handles browser window resize to update itself.
|
MapOptions.Builder |
transform3DLimit(double transform3DLimit)
Defines the maximum size of a CSS translation transform.
|
MapOptions.Builder |
wheelDebounceTime(double wheelDebounceTime)
Limits the rate at which a wheel can fire (in milliseconds).
|
MapOptions.Builder |
wheelPxPerZoomLevel(double wheelPxPerZoomLevel)
How many scroll pixels (as reported by L.DomEvent.getWheelDelta) mean a change of one full zoom level.
|
MapOptions.Builder |
worldCopyJump(Boolean worldCopyJump)
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.
|
MapOptions.Builder |
zoomAnimation(Boolean zoomAnimation)
Whether the tile zoom animation is enabled.
|
MapOptions.Builder |
zoomAnimationThreshold(double zoomAnimationThreshold)
Won't animate zoom if the zoom difference exceeds this value.
|
MapOptions.Builder |
zoomControl(Boolean zoomControl)
Whether the zoom control is added to the map by default.
|
MapOptions.Builder |
zoomDelta(double zoomDelta)
Controls how much the map's zoom level will change after a zoomIn(), zoomOut(), pressing + or - on the keyboard, or using the zoom controls.
|
MapOptions.Builder |
zoomSnap(double zoomSnap)
Forces the map's zoom level to always be a multiple of this, particularly right after a fitBounds() or a pinch-zoom.
|
public MapOptions.Builder layers(Layer[] layers)
layers
- the Layers that will be added to the map initially.public MapOptions.Builder maxZoom(Double maxZoom)
maxZoom
- the max zoompublic MapOptions.Builder maxBounds(LatLngBounds maxBounds)
maxBounds
- the max boundspublic MapOptions.Builder dragging(Boolean dragging)
dragging
- true or flasepublic MapOptions.Builder touchZoom(Boolean touchZoom)
touchZoom
- true or falsepublic MapOptions.Builder scrollWheelZoom(Boolean scrollWheelZoom)
scrollWheelZoom
- true or falsepublic MapOptions.Builder doubleClickZoom(Boolean doubleClickZoom)
doubleClickZoom
- true or falsepublic MapOptions.Builder boxZoom(Boolean boxZoom)
boxZoom
- true or falsepublic MapOptions.Builder tap(Boolean tap)
tap
- true or falsepublic MapOptions.Builder tapTolerance(double tapTolerance)
tapTolerance
- the tap tolerance numberpublic MapOptions.Builder trackResize(Boolean trackResize)
trackResize
- true or falsepublic MapOptions.Builder worldCopyJump(Boolean worldCopyJump)
worldCopyJump
- true or falsepublic MapOptions.Builder closePopupOnClick(Boolean closePopupOnClick)
closePopupOnClick
- true or falsepublic MapOptions.Builder bounceAtZoomLimits(Boolean bounceAtZoomLimits)
closePopupOnClick
- true or falsepublic MapOptions.Builder keyboard(Boolean keyboard)
keyboard
- true or falsepublic MapOptions.Builder keyboardPanDelta(double keyboardPanDelta)
keyboardPanOffset
- the keyboard pan offsetpublic MapOptions.Builder inertia(Boolean inertia)
inertia
- true or falsepublic MapOptions.Builder inertiaDeceleration(double inertiaDeceleration)
inertiaDeceleration
- the inertia decelerationpublic MapOptions.Builder inertiaMaxSpeed(double inertiaMaxSpeed)
inertiaMaxSpeed
- the inertia max speedpublic MapOptions.Builder inertiaThreshold(double inertiaThreshold)
inertiaThreshold
- the inertia thresholdpublic MapOptions.Builder zoomControl(Boolean zoomControl)
zoomControl
- true or falsepublic MapOptions.Builder attributionControl(Boolean attributionControl)
attributionControl
- true or falsepublic MapOptions.Builder fadeAnimation(Boolean fadeAnimation)
fadeAnimation
- true or falsepublic MapOptions.Builder zoomAnimation(Boolean zoomAnimation)
zoomAnimation
- the zoom animationpublic MapOptions.Builder zoomAnimationThreshold(double zoomAnimationThreshold)
zoomAnimationThreshold
- the zoom animation thresholdpublic MapOptions.Builder markerZoomAnimation(Boolean markerZoomAnimation)
markerZoomAnimation
- true or falsepublic MapOptions.Builder preferCanvas(Boolean preferCanvas)
preferCanvas
- public MapOptions.Builder renderer(Renderer renderer)
renderer
- public MapOptions.Builder wheelDebounceTime(double wheelDebounceTime)
wheelDebounceTime
- public MapOptions.Builder wheelPxPerZoomLevel(double wheelPxPerZoomLevel)
wheelPxPerZoomLevel
- public MapOptions.Builder zoomSnap(double zoomSnap)
zoomSnap
- public MapOptions.Builder zoomDelta(double zoomDelta)
zoomDelta
- public MapOptions.Builder maxBoundsViscosity(double maxBoundsViscosity)
maxBoundsViscosity
- public MapOptions.Builder transform3DLimit(double transform3DLimit)
transform3DLimit
- public MapOptions build()
Copyright © 2018 G-Widgets. All rights reserved.