@JsType(isNative=true) public class GeoJSON extends FeatureGroup
Modifier and Type | Method and Description |
---|---|
L |
addData(com.google.gwt.core.client.JavaScriptObject data)
Adds a GeoJSON object to the layer.
|
static LatLng |
coordsToLatlng(com.google.gwt.core.client.JsArray<com.google.gwt.core.client.JavaScriptObject> coords,
java.lang.Boolean reverse)
Creates a LatLng object from an array of 2 numbers (latitude, longitude) used in GeoJSON for points.
|
static com.google.gwt.core.client.JsArray<com.google.gwt.core.client.JavaScriptObject> |
coordsToLatlngs(com.google.gwt.core.client.JsArray<com.google.gwt.core.client.JavaScriptObject> coords,
java.lang.Number levelsDeep,
java.lang.Boolean reverse)
Creates a multidimensional array of LatLng objects from a GeoJSON coordinates array.
|
static ILayer |
geometryToLayer(com.google.gwt.core.client.JavaScriptObject featureData,
Function pointToLayer)
Creates a layer from a given GeoJSON feature.
|
L |
resetStyle(Path layer)
Resets the given vector layer's style to the original GeoJSON style, useful for resetting style after hover events.
|
L |
setStyle(Function style)
Changes styles of GeoJSON vector layers with the given style function.
|
bindPopup, bringToBack, bringToFront, clearAllEventListeners, fire, getBounds, off, on, onAdd, once, onRemove, setStyle
@JsMethod public L addData(com.google.gwt.core.client.JavaScriptObject data)
data
- the data@JsMethod public L setStyle(Function style)
style
- the style function@JsMethod public L resetStyle(Path layer)
layer
- the layer to reset@JsMethod public static ILayer geometryToLayer(com.google.gwt.core.client.JavaScriptObject featureData, Function pointToLayer)
featureData
- the feature datapointToLayer
- the point to layer@JsMethod public static LatLng coordsToLatlng(com.google.gwt.core.client.JsArray<com.google.gwt.core.client.JavaScriptObject> coords, java.lang.Boolean reverse)
coords
- the coordinatesreverse
- the reverse@JsMethod public static com.google.gwt.core.client.JsArray<com.google.gwt.core.client.JavaScriptObject> coordsToLatlngs(com.google.gwt.core.client.JsArray<com.google.gwt.core.client.JavaScriptObject> coords, java.lang.Number levelsDeep, java.lang.Boolean reverse)
coords
- the coordinateslevelsDeep
- specifies the nesting levelreverse
- the reverse