public class Map extends MapObject
Modifier and Type | Method and Description |
---|---|
void |
fitBounds(LatLngBounds bounds)
Sets the viewport to contain the given bounds.
|
LatLngBounds |
getBounds()
Returns the lat/lng bounds of the current viewport.
|
LatLng |
getCenter()
Returns the position displayed at the center of the map.
|
boolean |
getClickableIcons()
Returns the clickability of the map icons.
|
DirectionsRenderer |
getDirectionsRenderer()
Returns directions renderer associated with map.
|
double |
getHeading()
Returns the compass heading of aerial imagery.
|
MapTypeId |
getMapTypeId()
Returns the current map type.
|
StreetViewPanorama |
getStreetView()
Returns the default StreetViewPanorama bound to the map, which may be a default panorama embedded within the map,
or the panorama set using setStreetView().
|
double |
getTilt()
Returns the current angle of incidence of the map, in degrees from the viewport plane to the map plane.
|
double |
getZoom()
Returns the current zoom value.
|
MapTypeRegistry |
mapTypes()
Returns value of mapTypes property.
|
void |
panBy(double x,
double y)
Changes the center of the map by the given distance in pixels.
|
void |
panTo(LatLng latLng)
Changes the center of the map to the given LatLng.
|
void |
panToBounds(LatLngBounds latLngBounds)
Pans the map by the minimum amount necessary to contain the given LatLngBounds.
|
void |
setCenter(LatLng latLng)
Changes map center.
|
void |
setClickableIcons(boolean clickable)
Controls whether the map icons are clickable or not.
|
void |
setHeading(double heading)
Sets the compass heading for aerial imagery measured in degrees from cardinal direction North.
|
void |
setMapTypeId(MapTypeId mapTypeId)
Changes map type.
|
void |
setMapTypes(MapTypeRegistry registry)
Sets new value for mapTypes property.
|
void |
setOptions(MapOptions mapOptions)
Changes map options.
|
void |
setStreetView(StreetViewPanorama panorama)
Binds a StreetViewPanorama to the map.
|
void |
setTilt(double tilt)
Controls the automatic switching behavior for the angle of incidence of the map.
|
void |
setZoom(double zoom)
Changes map zoom.
|
addEventListener, attachObject, cacheProperties, cacheProperties, clone, createJSValue, dispose, fromJSValue, getJSObject, getMap, getProperties, invokeMethod, propertyChanged, removeEventListener, updateProperty
public void fitBounds(LatLngBounds bounds)
bounds
- source bounds@Nullable public LatLngBounds getBounds()
@Nullable public LatLng getCenter()
public double getHeading()
public MapTypeId getMapTypeId()
@Nullable public StreetViewPanorama getStreetView()
public double getTilt()
public double getZoom()
public boolean getClickableIcons()
public void panBy(double x, double y)
x
- delta xy
- delta ypublic void panTo(LatLng latLng)
latLng
- target pointpublic void panToBounds(LatLngBounds latLngBounds)
latLngBounds
- target boundspublic void setCenter(LatLng latLng)
latLng
- new centerpublic void setHeading(double heading)
heading
- new heading valuepublic void setMapTypeId(MapTypeId mapTypeId)
mapTypeId
- new map typepublic void setOptions(MapOptions mapOptions)
mapOptions
- new optionspublic void setStreetView(StreetViewPanorama panorama)
panorama
- street view objectpublic void setTilt(double tilt)
tilt
- new tilt valuepublic void setZoom(double zoom)
zoom
- new zoom valuepublic void setClickableIcons(boolean clickable)
clickable
- new zoom valuepublic MapTypeRegistry mapTypes()
Represents a registry of MapType instances by string ID.
setMapTypes(com.teamdev.jxmaps.MapTypeRegistry)
public void setMapTypes(MapTypeRegistry registry)
registry
- new property valuemapTypes()
public DirectionsRenderer getDirectionsRenderer()