public interface IMap
Modifier and Type | Method and Description |
---|---|
void |
addMarker(Marker marker)
Add a marker.
|
void |
addPointsToPolyline(int id,
IGeoPoint... points)
Add points to a polyline
|
int |
addPolyline(Polyline polyline)
Add a polyline.
|
void |
clear()
Removes all markers, polylines, polygons, overlays, etc from the map.
|
void |
clearPolyline(int id)
Removes one polyline.
|
float |
getBearing()
Get the bearing of the map.
|
IGeoPoint |
getCenter()
Get the center of the map
|
IProjection |
getProjection()
Get the map projection
|
float |
getZoomLevel()
Get the current zoom level of the map
|
boolean |
isMyLocationEnabled()
Whether the map is currently showing the "my location" dot
|
void |
setBearing(float bearing)
Set the bearing of the map.
|
void |
setCenter(double latitude,
double longitude)
Set the center of the map
|
void |
setMyLocationEnabled(boolean enabled)
Whether to show the "my location" dot on the map
|
void |
setOnCameraChangeListener(OnCameraChangeListener listener)
Sets a callback that's invoked when the map view changes position.
|
void |
setPosition(IPosition position)
Set the position of the map
|
void |
setZoom(float zoomLevel)
Set the zoom level of the map
|
boolean |
zoomIn()
Increase zoom level by one
|
boolean |
zoomOut()
Decrease zoom level by one
|
float getZoomLevel()
void setZoom(float zoomLevel)
IGeoPoint getCenter()
void setCenter(double latitude, double longitude)
float getBearing()
void setBearing(float bearing)
void setPosition(IPosition position)
boolean zoomIn()
boolean zoomOut()
void setMyLocationEnabled(boolean enabled)
boolean isMyLocationEnabled()
IProjection getProjection()
void addMarker(Marker marker)
int addPolyline(Polyline polyline)
addPointsToPolyline(int, org.osmdroid.api.IGeoPoint...)
void addPointsToPolyline(int id, IGeoPoint... points)
id
- the id returned from addPolyline(Polyline)
points
- the points to addIllegalArgumentException
- if a polyline with this id was not addedvoid clearPolyline(int id)
id
- the id returned from addPolyline(Polyline)
IllegalArgumentException
- if a polyline with this id was not addedvoid clear()
void setOnCameraChangeListener(OnCameraChangeListener listener)
Copyright © 2016. All Rights Reserved.