public abstract class WebViewMapFragment extends Fragment implements AirMapInterface
| Modifier and Type | Class and Description |
|---|---|
class |
WebViewMapFragment.GeoWebChromeClient |
| Modifier and Type | Field and Description |
|---|---|
protected android.webkit.WebView |
webView |
CIRCLE_BORDER_COLOR, CIRCLE_BORDER_WIDTH, CIRCLE_FILL_COLOR| Constructor and Description |
|---|
WebViewMapFragment() |
| Modifier and Type | Method and Description |
|---|---|
void |
addMarker(AirMapMarker marker)
Add the given marker to the map
|
<T> void |
addPolygon(AirMapPolygon<T> polygon)
Add the given polygon to the map
|
<T> void |
addPolyline(AirMapPolyline<T> polyline)
Add the given polyline to the map
|
void |
animateCenter(LatLng latLng)
Animate the map to center the given
LatLng. |
void |
animateCenterZoom(LatLng latLng,
int zoom)
Animate the center of the map to the given location and zoom level
|
void |
clearGeoJsonLayer()
Remove GeoJson layer from map, if any.
|
void |
clearMarkers()
Clear all markers from the map
|
void |
drawCircle(LatLng latLng,
int radius)
Draw a circle at the given LatLng, with the given radius
|
void |
drawCircle(LatLng latLng,
int radius,
int borderColor)
Draw a circle at the given LatLng, with the given radius and stroke width
|
void |
drawCircle(LatLng latLng,
int radius,
int borderColor,
int borderWidth)
Draw a circle at the given LatLng, with the given radius, stroke width, and stroke color
|
void |
drawCircle(LatLng latLng,
int radius,
int borderColor,
int borderWidth,
int fillColor)
Draw a circle at the given LatLng, with the given radius, stroke width, stroke and fill colors
|
LatLng |
getCenter() |
void |
getMapScreenBounds(OnMapBoundsCallback callback)
Returns the map screen bounds to the supplied
OnMapBoundsCallback |
void |
getScreenLocation(LatLng latLng,
OnLatLngScreenLocationCallback callback)
Returns the point coordinates of the LatLng in the container to the supplied
OnLatLngScreenLocationCallback |
int |
getZoom() |
void |
highlightMarker(long markerId) |
protected boolean |
isChinaMode() |
boolean |
isInitialized() |
boolean |
isMyLocationEnabled()
Check if the user location is being tracked and shown on te map.
|
android.view.View |
onCreateView(android.view.LayoutInflater inflater,
android.view.ViewGroup container,
android.os.Bundle savedInstanceState) |
void |
onLocationPermissionsGranted()
Getting called when runtime location permissions got granted.
|
void |
onRequestPermissionsResult(int requestCode,
java.lang.String[] permissions,
int[] grantResults) |
void |
removeMarker(AirMapMarker marker)
Remove the given marker from the map
|
void |
removePolygon(AirMapPolygon polygon)
Remove the given
AirMapPolygon |
void |
removePolyline(AirMapPolyline polyline)
Remove the given
AirMapPolyline |
WebViewMapFragment |
setArguments(AirMapType mapType) |
void |
setCenter(LatLng latLng)
Center the map to the given
LatLng |
void |
setCenter(LatLngBounds bounds,
int boundsPadding)
Sets the given
LatLngBounds on the map with the specified padding |
void |
setCenterZoom(LatLng latLng,
int zoom)
Set the center of the map, and zoom level
|
void |
setGeoJsonLayer(AirMapGeoJsonLayer layer)
Adds a GeoJson layer to the map.
|
void |
setInfoWindowCreator(GoogleMap.InfoWindowAdapter adapter,
InfoWindowCreator creator)
Specific to Google Play Services maps.
|
void |
setMapToolbarEnabled(boolean enabled)
Enable a toolbar that displays various context-dependent actions.
|
void |
setMyLocationEnabled(boolean trackUserLocationEnabled)
Enable an indicator for the user's location on the map.
|
void |
setOnCameraChangeListener(OnCameraChangeListener listener)
Register a callback to be invoked when the camera of the map has changed
|
void |
setOnInfoWindowClickListener(OnInfoWindowClickListener listener)
Set the callback for info window click events
|
void |
setOnMapClickListener(OnMapClickListener listener)
Register a callback to be invoked when the map is clicked
|
void |
setOnMapLoadedListener(OnMapLoadedListener listener) |
void |
setOnMarkerClickListener(OnMapMarkerClickListener listener)
Register a callback to be invoked when a map marker is clicked
|
void |
setPadding(int left,
int top,
int right,
int bottom)
Set the map's padding.
|
void |
setZoom(int zoom)
Set the map zoom level
|
void |
unhighlightMarker(long markerId) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsetMapTypepublic WebViewMapFragment setArguments(AirMapType mapType)
public android.view.View onCreateView(android.view.LayoutInflater inflater,
android.view.ViewGroup container,
android.os.Bundle savedInstanceState)
public int getZoom()
getZoom in interface AirMapInterfacepublic LatLng getCenter()
getCenter in interface AirMapInterfaceLatLng of the center of the mappublic void setCenter(LatLng latLng)
AirMapInterfaceLatLngsetCenter in interface AirMapInterfacepublic void animateCenter(LatLng latLng)
AirMapInterfaceLatLng. Web maps will currently only center the map
(no animation).animateCenter in interface AirMapInterfacepublic void setZoom(int zoom)
AirMapInterfacesetZoom in interface AirMapInterfacepublic void drawCircle(LatLng latLng,
int radius)
AirMapInterfacedrawCircle in interface AirMapInterfacepublic void drawCircle(LatLng latLng,
int radius,
int borderColor)
AirMapInterfacedrawCircle in interface AirMapInterfacepublic void drawCircle(LatLng latLng,
int radius,
int borderColor,
int borderWidth)
AirMapInterfacedrawCircle in interface AirMapInterfacepublic void drawCircle(LatLng latLng,
int radius,
int borderColor,
int borderWidth,
int fillColor)
AirMapInterfacedrawCircle in interface AirMapInterfacepublic void highlightMarker(long markerId)
public void unhighlightMarker(long markerId)
public boolean isInitialized()
isInitialized in interface AirMapInterfacepublic void addMarker(AirMapMarker marker)
AirMapInterfaceaddMarker in interface AirMapInterfacemarker - AirMapMarker instance to addpublic void removeMarker(AirMapMarker marker)
AirMapInterfaceremoveMarker in interface AirMapInterfacemarker - AirMapMarker instance to removepublic void clearMarkers()
AirMapInterfaceclearMarkers in interface AirMapInterfacepublic void setOnCameraChangeListener(OnCameraChangeListener listener)
AirMapInterfacesetOnCameraChangeListener in interface AirMapInterfacepublic void setOnMapLoadedListener(OnMapLoadedListener listener)
setOnMapLoadedListener in interface AirMapInterfacepublic void setCenterZoom(LatLng latLng,
int zoom)
AirMapInterfacesetCenterZoom in interface AirMapInterfacelatLng - the LatLng to set as centerzoom - the zoom levelpublic void animateCenterZoom(LatLng latLng,
int zoom)
AirMapInterfaceanimateCenterZoom in interface AirMapInterfacelatLng - the LatLng to animate to centerzoom - the zoom levelpublic void setOnMarkerClickListener(OnMapMarkerClickListener listener)
AirMapInterfacesetOnMarkerClickListener in interface AirMapInterfacelistener - OnMapMarkerClickListener
callbackpublic void setPadding(int left,
int top,
int right,
int bottom)
AirMapInterfacesetPadding in interface AirMapInterfacepublic void setMyLocationEnabled(boolean trackUserLocationEnabled)
AirMapInterfacesetMyLocationEnabled in interface AirMapInterfacepublic void onLocationPermissionsGranted()
AirMapInterfaceonLocationPermissionsGranted in interface AirMapInterfacepublic void onRequestPermissionsResult(int requestCode,
java.lang.String[] permissions,
int[] grantResults)
public boolean isMyLocationEnabled()
AirMapInterfaceisMyLocationEnabled in interface AirMapInterfacepublic void setMapToolbarEnabled(boolean enabled)
AirMapInterfacesetMapToolbarEnabled in interface AirMapInterfacepublic <T> void addPolyline(AirMapPolyline<T> polyline)
AirMapInterfaceaddPolyline in interface AirMapInterfacepolyline - AirMapPolyline instance to addpublic void removePolyline(AirMapPolyline polyline)
AirMapInterfaceAirMapPolylineremovePolyline in interface AirMapInterfacepolyline - the AirMapPolyline to removepublic <T> void addPolygon(AirMapPolygon<T> polygon)
AirMapInterfaceaddPolygon in interface AirMapInterfacepolygon - AirMapPolygon instance to addpublic void removePolygon(AirMapPolygon polygon)
AirMapInterfaceAirMapPolygonremovePolygon in interface AirMapInterfacepolygon - the AirMapPolygon to removepublic void setOnMapClickListener(OnMapClickListener listener)
AirMapInterfacesetOnMapClickListener in interface AirMapInterfacelistener - OnMapClickListener callbackpublic void setOnInfoWindowClickListener(OnInfoWindowClickListener listener)
AirMapInterfacesetOnInfoWindowClickListener in interface AirMapInterfacelistener - OnInfoWindowClickListener
instancepublic void setInfoWindowCreator(GoogleMap.InfoWindowAdapter adapter,
InfoWindowCreator creator)
AirMapInterfaceGoogleMap.InfoWindowAdapter and InfoWindowCreatorsetInfoWindowCreator in interface AirMapInterfacepublic void getMapScreenBounds(OnMapBoundsCallback callback)
AirMapInterfaceOnMapBoundsCallbackgetMapScreenBounds in interface AirMapInterfacepublic void getScreenLocation(LatLng latLng,
OnLatLngScreenLocationCallback callback)
AirMapInterfaceOnLatLngScreenLocationCallbackgetScreenLocation in interface AirMapInterfacepublic void setCenter(LatLngBounds bounds,
int boundsPadding)
AirMapInterfaceLatLngBounds on the map with the specified paddingsetCenter in interface AirMapInterfaceprotected boolean isChinaMode()
public void setGeoJsonLayer(AirMapGeoJsonLayer layer)
AirMapInterfacesetGeoJsonLayer in interface AirMapInterfacelayer - An AirMapGeoJsonLayer layer with GeoJson and optional styling attributespublic void clearGeoJsonLayer()
AirMapInterfaceclearGeoJsonLayer in interface AirMapInterface