@Component(tag="lmap",
widgetModule="fujion-lmaps",
widgetClass="LeafletMap",
parentTag="*",
description="Fujion wrapper for leaflet.js interactive maps.")
public class LeafletMap
extends org.fujion.component.BaseUIComponent
| Constructor and Description |
|---|
LeafletMap() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Removes the current map.
|
void |
fitBounds(LatLngBounds bounds)
Sets a map view that contains the given geographical bounds with the maximum zoom level possible.
|
void |
flyToBounds(LatLngBounds bounds) |
LatLng |
getCenter()
Get the center coordinates.
|
int |
getMaxZoom()
Gets the upper limit for the available zoom levels.
|
int |
getMinZoom()
Gets the lower limit for the available zoom levels.
|
LeafletOptions |
getOptions()
Returns the option map.
|
int |
getZoom()
Get the map's zoom level.
|
boolean |
isRunning()
Returns true if a map is currently displayed on the client.
|
void |
locate()
Tries to locate the user using the Geolocation API, firing a locationfound event with location data on success
or a locationerror event on failure.
|
void |
locate(LocateOptions options)
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).
|
void |
panBy(double x,
double y)
Pans the map to a given center.
|
void |
panInside(LatLng latlng)
Pans the map the minimum amount to make the latlng visible.
|
void |
panInside(LatLngBounds bounds)
Pans the map to the closest view that would lie inside the given bounds (if it's not already).
|
void |
panTo(LatLng center)
Changes the center of the map to the given LatLng.
|
void |
run()
Display the map on the client using the current options.
|
void |
setCenter(LatLng center)
Sets the current center of the map.
|
void |
setCenter(String center)
Set the center coordinates.
|
void |
setMaxZoom(int maxZoom)
Set the upper limit for the available zoom levels.
|
void |
setMinZoom(int minZoom)
Set the lower limit for the available zoom levels.
|
void |
setZoom(int zoom)
Set the map's zoom level.
|
void |
stopLocate()
Stops watching location previously initiated by map.locate({watch: true}) and aborts resetting the map view if
map.locate was called with {setView: true}.
|
void |
zoom(int delta)
Increments the zoom of the map by delta.
|
void |
zoomAround(LatLng position)
Zooms the map while keeping a specified geographical position on the map stationary.
|
void |
zoomAround(Point offset)
Zooms the map while keeping a specified pixel on the map (relative to the top-left corner) stationary.
|
_syncClasses, _syncStyles, addClass, addMask, addMask, addMask, addStyle, addStyles, afterRemoveChild, focus, getBalloon, getClasses, getContext, getCss, getDragid, getDropid, getFirstVisibleChild, getFirstVisibleChild, getFlex, getHeight, getHint, getKeycapture, getPopup, getStyle, getStyles, getTabindex, getWidth, hide, isDisabled, isVisible, print, print, removeClass, removeMask, removeStyle, reportSize, scrollIntoView, setBalloon, setClasses, setContext, setCss, setDisabled, setDragid, setDropid, setFlex, setFocus, setHeight, setHint, setKeycapture, setPopup, setStyles, setTabindex, setVisible, setWidth, show, toggleClass_attach, _initProps, addChild, addChild, addChild, addChildren, addComposite, addEventForward, addEventForward, addEventForward, addEventForward, addEventListener, addEventListener, addEventListener, addEventListener, afterAddChild, afterSetParent, areEqual, beforeAddChild, beforeRemoveChild, beforeSetParent, bind, bringToFront, defaultify, destroy, destroyChildren, detach, detachChildren, disableChildren, disableChildren, finalize, findAllNamed, findAttribute, findByName, findByName, findChild, findChildByData, findChildByLabel, findChildByLabel, fireEvent, fireEvent, fireEventToClient, fireEventToClient, getAncestor, getAncestor, getAttribute, getAttribute, getAttributes, getChildAt, getChildCount, getChildCount, getChildren, getChildren, getContent, getControllers, getData, getData, getDefinition, getFirstChild, getFirstChild, getId, getIndex, getLastChild, getLastController, getLastController, getName, getNamespace, getNextSibling, getNextSibling, getPage, getParent, getPreviousSibling, getPreviousSibling, getRoot, hasChildren, hasEventListener, hasEventListener, initialize, invoke, invoke, invoke, invoke, invoke, invokeIfAttached, isAncestor, isContainer, isContentSynced, isDead, isInitializing, isNamespace, isRendered, loadModule, loadModule, notifyAncestors, notifyDescendants, nullify, onAttach, onDestroy, propertyChange, propertyChange, removeChild, removeEventForward, removeEventForward, removeEventForward, removeEventForward, removeEventListener, removeEventListener, removeEventListener, removeEventListener, setContent, setContentSynced, setData, setIndex, setName, setNamespace, setParent, sub, swapChildren, sync, toString, trimify, validate, validate, validateChild, validateIsChild, validateName, validatePage, validateParent, wireController, wireControllerpublic void clear()
public void run()
public boolean isRunning()
public LeafletOptions getOptions()
@Component.PropertyGetter(value="center",
description="The coordinates of the map\'s center.")
public LatLng getCenter()
@Component.PropertySetter(value="center",
description="The coordinates of the map\'s center.")
public void setCenter(String center)
center - The center coordinates.public void setCenter(LatLng center)
center - The current center of the map.@Component.PropertyGetter(value="zoom",
description="The map\'s current zoom level.")
public int getZoom()
@Component.PropertySetter(value="zoom",
description="The map\'s current zoom level.")
public void setZoom(int zoom)
zoom - The map's zoom level.@Component.PropertyGetter(value="minZoom",
description="The lower limit for the available zoom levels.")
public int getMinZoom()
@Component.PropertySetter(value="minZoom",
description="The lower limit for the available zoom levels.")
public void setMinZoom(int minZoom)
minZoom - The lower limit for the available zoom levels.@Component.PropertyGetter(value="maxZoom",
description="The upper limit for the available zoom levels.")
public int getMaxZoom()
@Component.PropertySetter(value="maxZoom",
description="The upper limit for the available zoom levels.")
public void setMaxZoom(int maxZoom)
maxZoom - The upper limit for the available zoom levels.public void panBy(double x,
double y)
x - The x increment.y - The y increment.public void panTo(LatLng center)
center - The new map center.public void panInside(LatLngBounds bounds)
bounds - The restricting bounds.public void panInside(LatLng latlng)
latlng - The location to make visible.public void fitBounds(LatLngBounds bounds)
bounds - The bounds.public void zoom(int delta)
delta - The amount to increment.public void zoomAround(LatLng position)
position - The position to remain stationary.public void zoomAround(Point offset)
offset - The pixel offset.public void flyToBounds(LatLngBounds bounds)
public void locate()
public void locate(LocateOptions options)
options - The locate options.public void stopLocate()
Copyright © 2023 Fujion Framework. All rights reserved.