Class LocateOptions
java.lang.Object
com.google.gwt.core.client.JavaScriptObject
io.jmix.mapsui.widget.leaflet.client.Layer
io.jmix.mapsui.widget.leaflet.client.AbstractJsonOptions
io.jmix.mapsui.widget.leaflet.client.LocateOptions
Replicates the same class in LeafletJS:
Some of the geolocation methods for Map take in an options parameter. This is a plain javascript object with the following optional components:
Option Type Default Description
watch Boolean false If true, starts continous watching of location changes (instead of detecting it once) using W3C watchPosition method. You can later stop watching using map.stopLocate() method.
setView Boolean false If true, automatically sets the map view to the user location with respect to detection accuracy, or to world view if geolocation failed.
maxZoom Number Infinity The maximum zoom for automatic view setting when using setView option.
timeout Number 10000 Number of milliseconds to wait for a response from geolocation before firing a locationerror event.
maximumAge Number 0 Maximum age of detected location. If less than this amount of milliseconds passed since last geolocation response, locate will return a cached location.
enableHighAccuracy Boolean false Enables high accuracy, see description in the W3C spec.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic LocateOptions
create()
final void
setEnableHighAccuracy
(boolean e) final void
setMaximumAge
(double age) final void
setMaxZoom
(double z) final void
setTimeout
(double timeout) final void
setView
(boolean v) final void
setWatch
(boolean w) Methods inherited from class io.jmix.mapsui.widget.leaflet.client.AbstractJsonOptions
setCustomOption, setCustomOption, setCustomOption, setCustomOption
Methods inherited from class io.jmix.mapsui.widget.leaflet.client.Layer
addClickListener, addContextMenuListener, addLayerRemovedListener, addMouseOutListener, addMouseOverListener, removeClickListener, removeContextMenuListener, removeListener, removeMouseOutListener, removeMouseOverListener
Methods inherited from class com.google.gwt.core.client.JavaScriptObject
cast, createArray, createArray, createFunction, createObject, equals, hashCode, toSource, toString
-
Constructor Details
-
LocateOptions
protected LocateOptions()
-
-
Method Details
-
create
-
setWatch
public final void setWatch(boolean w) -
setView
public final void setView(boolean v) -
setMaxZoom
public final void setMaxZoom(double z) -
setTimeout
public final void setTimeout(double timeout) -
setMaximumAge
public final void setMaximumAge(double age) -
setEnableHighAccuracy
public final void setEnableHighAccuracy(boolean e)
-