Package | Description |
---|---|
net.java.html.leaflet |
Leaflet API for Java built around the
Map class. |
Modifier and Type | Method and Description |
---|---|
MapOptions |
MapOptions.setAttributionControl(boolean attributionControl)
Whether the attribution control is added to the map by default.
|
MapOptions |
MapOptions.setBounceAtZoomLimits(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 |
MapOptions.setBoxZoom(boolean boxZoom)
Whether the map can be zoomed to a rectangular area specified by dragging
the mouse while pressing shift.
|
MapOptions |
MapOptions.setCenter(LatLng latLng)
Initial geographical center of the map.
|
MapOptions |
MapOptions.setClosePopupOnClick(boolean closePopupOnClick)
Set it to
false if you don't want popups to close when user
clicks the map. |
MapOptions |
MapOptions.setCRS(ICRS crs)
Coordinate Reference System to use.
|
MapOptions |
MapOptions.setDoubleClickZoom(boolean doubleClickZoom)
Whether the map can be zoomed in by double clicking on it and zoomed out
by double clicking while holding shift.
|
MapOptions |
MapOptions.setDragging(boolean dragging)
Whether the map is draggable with mouse/touch or not.
|
MapOptions |
MapOptions.setFadeAnimation(boolean fadeAnimation)
Whether the tile fade animation is enabled.
|
MapOptions |
MapOptions.setInertia(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 |
MapOptions.setInertiaDeceleration(int inertiaDeceleration)
The rate with which the inertial movement slows down, in pixels/second^2.
|
MapOptions |
MapOptions.setInertiaMaxSpeed(int inertiaMaxSpeed)
Max speed of the inertial movement, in pixels/second.
|
MapOptions |
MapOptions.setInertiaThreshold(int inertiaThreshold)
Number of milliseconds that should pass between stopping the movement and
releasing the mouse or touch to prevent inertial movement. 32 for touch
devices and 14 for the rest by default.
|
MapOptions |
MapOptions.setKeyboard(boolean keyboard)
Makes the map focusable and allows users to navigate the map with
keyboard arrows and +/- keys.
|
MapOptions |
MapOptions.setKeyboardPanOffset(int keyboardPanOffset)
Amount of pixels to pan when pressing an arrow key.
|
MapOptions |
MapOptions.setKeyboardZoomOffset(int keyboardZoomOffset)
Number of zoom levels to change when pressing + or - key.
|
MapOptions |
MapOptions.setLayers(ILayer[] layers)
Layers that will be added to the map initially.
|
MapOptions |
MapOptions.setMarkerZoomAnimation(boolean markerZoomAnimation)
Whether markers animate their zoom with the zoom animation, if disabled
they will disappear for the length of the animation.
|
MapOptions |
MapOptions.setMaxBounds(LatLngBounds bounds)
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 |
MapOptions.setMaxZoom(int maxZoom)
Maximum zoom level of the map.
|
MapOptions |
MapOptions.setMinZoom(int minZoom)
Minimum zoom level of the map.
|
MapOptions |
MapOptions.setScrollWheelZoom(boolean scrollWheelZoom)
Whether the map can be zoomed by using the mouse wheel.
|
MapOptions |
MapOptions.setTap(boolean tap)
Enables mobile hacks for supporting instant taps (fixing 200ms click
delay on iOS/Android) and touch holds (fired as contextmenu events).
|
MapOptions |
MapOptions.setTapTolerance(int tapTolerance)
The max number of pixels a user can shift his finger during touch for it
to be considered a valid tap.
|
MapOptions |
MapOptions.setTouchZoom(boolean touchZoom)
Whether the map can be zoomed by touch-dragging with two fingers.
|
MapOptions |
MapOptions.setTrackResize(boolean trackResize)
Whether the map automatically handles browser window resize to update
itself.
|
MapOptions |
MapOptions.setWorldCopyJump(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 |
MapOptions.setZoom(int zoom)
Initial map zoom.
|
MapOptions |
MapOptions.setZoomAnimation(boolean zoomAnimation)
Whether the tile zoom animation is enabled.
|
MapOptions |
MapOptions.setZoomAnimationThreshold(int zoomAnimationThreshold)
Won't animate zoom if the zoom difference exceeds this value.
|
MapOptions |
MapOptions.setZoomControl(boolean zoomControl)
Whether the zoom control is added to the map by default.
|
Constructor and Description |
---|
Map(String id,
MapOptions options) |
Copyright © 2017. All rights reserved.