public class NativeGoogleMapFragment extends SupportMapFragment implements AirMapInterface
CIRCLE_BORDER_COLOR, CIRCLE_BORDER_WIDTH, CIRCLE_FILL_COLOR| Constructor and Description |
|---|
NativeGoogleMapFragment() |
| Modifier and Type | Method and Description |
|---|---|
void |
addMarker(AirMapMarker airMarker)
Add the given marker to the map
|
<T> void |
addPolygon(AirMapPolygon<T> polygon)
Add the given polygon to the map
|
void |
addPolyline(AirMapPolyline 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 |
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() |
GoogleMap |
getGoogleMap()
This method will return the google map if initialized.
|
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 |
init() |
boolean |
isInitialized() |
boolean |
isMyLocationEnabled()
Check if the user location is being tracked and shown on te map.
|
static NativeGoogleMapFragment |
newInstance(AirGoogleMapOptions options) |
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 |
NativeGoogleMapFragment |
setArguments(AirGoogleMapOptions options) |
void |
setCenter(LatLng latLng)
Center the map to the given
LatLng |
void |
setCenter(LatLngBounds latLngBounds,
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 |
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 |
setMapType(MapType type)
Sets the type of map tiles that should be displayed
|
void |
setMyLocationEnabled(boolean enabled)
Enable an indicator for the user's location on the map.
|
void |
setOnCameraChangeListener(OnCameraChangeListener onCameraChangeListener)
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 onMapLoadedListener) |
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
|
public static NativeGoogleMapFragment newInstance(AirGoogleMapOptions options)
public NativeGoogleMapFragment setArguments(AirGoogleMapOptions options)
public android.view.View onCreateView(android.view.LayoutInflater inflater,
android.view.ViewGroup container,
android.os.Bundle savedInstanceState)
public void init()
public boolean isInitialized()
isInitialized in interface AirMapInterfacepublic void clearMarkers()
AirMapInterfaceclearMarkers in interface AirMapInterfacepublic void addMarker(AirMapMarker airMarker)
AirMapInterfaceaddMarker in interface AirMapInterfaceairMarker - AirMapMarker instance to addpublic void removeMarker(AirMapMarker marker)
AirMapInterfaceremoveMarker in interface AirMapInterfacemarker - AirMapMarker instance to removepublic 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 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 getMapScreenBounds(OnMapBoundsCallback callback)
AirMapInterfaceOnMapBoundsCallbackgetMapScreenBounds in interface AirMapInterfacepublic void getScreenLocation(LatLng latLng,
OnLatLngScreenLocationCallback callback)
AirMapInterfaceOnLatLngScreenLocationCallbackgetScreenLocation in interface AirMapInterfacepublic void setCenter(LatLngBounds latLngBounds,
int boundsPadding)
AirMapInterfaceLatLngBounds on the map with the specified paddingsetCenter in interface AirMapInterfacepublic void setZoom(int zoom)
AirMapInterfacesetZoom in interface AirMapInterfacepublic void animateCenter(LatLng latLng)
AirMapInterfaceLatLng. Web maps will currently only center the map
(no animation).animateCenter in interface AirMapInterfacepublic void setCenter(LatLng latLng)
AirMapInterfaceLatLngsetCenter in interface AirMapInterfacepublic LatLng getCenter()
getCenter in interface AirMapInterfaceLatLng of the center of the mappublic int getZoom()
getZoom in interface AirMapInterfacepublic void setOnCameraChangeListener(OnCameraChangeListener onCameraChangeListener)
AirMapInterfacesetOnCameraChangeListener in interface AirMapInterfacepublic void setOnMapLoadedListener(OnMapLoadedListener onMapLoadedListener)
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 setOnMapClickListener(OnMapClickListener listener)
AirMapInterfacesetOnMapClickListener in interface AirMapInterfacelistener - OnMapClickListener callbackpublic void setPadding(int left,
int top,
int right,
int bottom)
AirMapInterfacesetPadding in interface AirMapInterfacepublic void setMyLocationEnabled(boolean enabled)
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 void addPolyline(AirMapPolyline 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 setMapType(MapType type)
AirMapInterfacesetMapType in interface AirMapInterfacepublic GoogleMap getGoogleMap()