public class GoogleMap extends JavascriptObject
Type | Property and Description |
---|---|
javafx.beans.property.ReadOnlyObjectProperty<LatLong> |
center |
javafx.beans.property.IntegerProperty |
zoom |
Modifier and Type | Field and Description |
---|---|
protected static String |
divArg |
protected MapOptions |
options |
jsObject, objectCounter, peerRegistry, runtime, variableName
Constructor and Description |
---|
GoogleMap() |
GoogleMap(MapOptions mapOptions) |
Modifier and Type | Method and Description |
---|---|
void |
addMapShape(MapShape shape) |
void |
addMarker(Marker marker) |
void |
addStateEventHandler(MapStateEventType type,
StateEventHandler h)
Adds a handler for a state type event on the map.
|
void |
addUIEventHandler(JavascriptObject obj,
UIEventType type,
UIEventHandler h)
Adds a handler for a mouse type event on the map.
|
void |
addUIEventHandler(UIEventType type,
UIEventHandler h)
Adds a handler for a mouse type event on the map.
|
javafx.beans.property.ReadOnlyObjectProperty<LatLong> |
centerProperty() |
void |
fitBounds(LatLongBounds bounds) |
javafx.geometry.Point2D |
fromLatLngToPoint(LatLong loc)
Returns the screen point for the provided LatLong.
|
LatLongBounds |
getBounds()
Returns the LatLongBounds of the visual area.
|
LatLong |
getCenter()
Gets the value of the property center.
|
double |
getHeading() |
LatLong |
getLatLong() |
Projection |
getProjection() |
int |
getZoom()
Gets the value of the property zoom.
|
void |
panBy(double x,
double y)
Pans the map by the supplied values.
|
void |
removeMapShape(MapShape shape) |
void |
removeMarker(Marker marker) |
void |
setCenter(LatLong latLong)
Sets the value of the property center.
|
void |
setHeading(double heading) |
void |
setMapType(MapTypeIdEnum type) |
void |
setZoom(int zoom)
Sets the value of the property zoom.
|
javafx.beans.property.IntegerProperty |
zoomProperty() |
checkBoolean, checkInteger, checkUndefined, getJSObject, getNextVariableName, getProperty, getProperty, getVariableName, invokeJavascript, invokeJavascript, invokeJavascriptReturnValue, invokeJavascriptReturnValue, isMemberDefined, setProperty, setProperty, setProperty
public javafx.beans.property.IntegerProperty zoomProperty
getZoom()
,
setZoom(int)
public final javafx.beans.property.ReadOnlyObjectProperty<LatLong> centerProperty
getCenter()
,
setCenter(LatLong)
protected MapOptions options
protected static String divArg
public GoogleMap()
public GoogleMap(MapOptions mapOptions)
public void setZoom(int zoom)
public int getZoom()
public javafx.beans.property.IntegerProperty zoomProperty()
getZoom()
,
setZoom(int)
public void setCenter(LatLong latLong)
public LatLong getLatLong()
public void fitBounds(LatLongBounds bounds)
public final javafx.beans.property.ReadOnlyObjectProperty<LatLong> centerProperty()
getCenter()
,
setCenter(LatLong)
public LatLong getCenter()
public void setHeading(double heading)
public double getHeading()
public void addMarker(Marker marker)
public void removeMarker(Marker marker)
public void setMapType(MapTypeIdEnum type)
public void addMapShape(MapShape shape)
public void removeMapShape(MapShape shape)
public Projection getProjection()
public LatLongBounds getBounds()
public javafx.geometry.Point2D fromLatLngToPoint(LatLong loc)
One workaround is to only operate off bounds_changed events.
loc
- public void panBy(double x, double y)
x
- delta x value in pixels.y
- delta y value in pixels.public void addUIEventHandler(UIEventType type, UIEventHandler h)
type
- Type of the event to register against.h
- Handler that will be called when the event occurs.public void addUIEventHandler(JavascriptObject obj, UIEventType type, UIEventHandler h)
obj
- The object that the event should be registered on.type
- Type of the event to register against.h
- Handler that will be called when the event occurs.public void addStateEventHandler(MapStateEventType type, StateEventHandler h)
We could allow this to handle any state event by adding a parameter JavascriptObject obj, but we would then need to loosen up the event type and either accept a String value, or fill an enum with all potential state events.
type
- Type of the event to register against.h
- Handler that will be called when the event occurs.Copyright © 2016. All Rights Reserved.