public class MapView
extends GLSurfaceView
Modifier and Type | Field and Description |
---|---|
static int |
CACHESIZE
Initial size of cache used for map assets.
|
static boolean |
CALL_EGL_DESTROYCONTEXT
Controls how the MapView's EGL factory responds to destroyContext requests from the operating system.
|
static boolean |
DEBUG
Controls display of OpenGL debug messages.
|
static boolean |
PRESERVE_GLCONTEXT_ONPAUSE
Controls whether or not the mapping engine asks the operating system
to preserve its OpenGL context when paused.
|
static int |
TILESINFLIGHT
Controls the number of parallel requests the engine will make for raster, terrain,
or vector tile data.
|
Constructor and Description |
---|
MapView(Context context) |
MapView(Context context,
AttributeSet attrs) |
MapView(Context context,
boolean translucent,
int depth,
int stencil) |
Modifier and Type | Method and Description |
---|---|
void |
addArrowPulse(ArrowPulse arrowPulse)
Adds an arrow pulse
|
void |
addCachedImage(java.lang.String imageName,
Bitmap bitmap,
boolean compressTexture) |
void |
addCachedPngImage(java.lang.String imageName,
byte[] pngData,
boolean compressTexture)
Add a png image to the internal cache.
|
void |
addDynamicLineToVectorMap(java.lang.String mapName,
java.lang.String lineId,
Location[] coordinates,
LineStyle lineStyle)
Adds a dynamic line to a vector map.
|
void |
addDynamicMarkerToMap(java.lang.String mapName,
DynamicMarker dynamicMarker)
Add a dynamic marker to a dynamic marker map.
|
void |
addHaloPulse(HaloPulse pulse)
Adds a halo pulse.
|
void |
addInternetMap(java.lang.String mapName,
java.lang.String urlTemplate,
java.lang.String subDomains,
int maxLevel,
int zOrder,
int numWorkers,
boolean useCache,
boolean enableAlpha)
Add a map layer that is composed of spherical mercator projected tiles available on a web server.
|
void |
addLineToVectorMap(java.lang.String mapName,
Location[] coordinates,
LineStyle lineStyle)
Add a line (or path) to a dynamic vector map.
|
void |
addMap(java.lang.String mapName,
java.lang.String mapSqliteFileName,
java.lang.String mapDataFileName,
boolean compressTextures)
Add a map layer to the current view.
|
void |
addMapUsingMapInfo(MapInfo mapInfo)
Adds a map layer whose type and properties are specified by a MapInfo object.
|
void |
addMBTilesMap(java.lang.String mapName,
java.lang.String fileName,
java.lang.String defaultTileName,
ImageDataType imageDataType,
boolean compressTextures,
int zOrder,
MapLoadingStrategy mapLoadingStrategy)
Adds an MBTiles raster map.
|
void |
addPolygonToVectorMap(java.lang.String mapName,
Location[] coordinates,
PolygonStyle style)
Add a polygon to a dynamic vector map.
|
void |
addPolygonToVectorMap(java.lang.String mapName,
java.lang.String polygonId,
Location[] coordinates,
PolygonStyle style)
Add a polygon to a dynamic vector map.
|
void |
addReadyListener(ReadyListener newListener) |
void |
addVectorMap(java.lang.String mapName,
java.lang.String mapSqliteFileName,
java.lang.String mapDataFileName)
Add a vector map layer to the current view.
|
void |
clearDynamicGeometryFromMap(java.lang.String mapName)
Clears all dynamic lines and polygons from a vector map.
|
PointF |
convertCoordinate(Location coord)
Converts a Location to a screen point.
|
void |
createNativeObject() |
void |
destroyNativeObject(long nativeObjectHandle) |
protected void |
finalize() |
double |
getAltitude()
Returns the current view altitude in meters.
|
Location |
getCenterCoordinate()
Returns the geographic location that is currently at the center of the view.
|
float |
getDeviceScale() |
Location3D |
getLocation3D()
Returns the current 3D position of the virtual camera.
|
void |
getLocationForPoint(PointF point,
ConvertPointCallback callback)
Converts a view point to a geographic location
|
int |
getterTest() |
java.lang.String |
getVersionHash()
Returns the version commit hash for this build of Altus.
|
java.lang.String |
getVersionTag()
Returns the version tag for this build of Altus.
|
void |
hideDynamicMarker(java.lang.String mapName,
java.lang.String markerName)
Make a marker invisible
|
boolean |
onDown(MotionEvent arg0) |
void |
onDrawFrame(GL10 gl) |
boolean |
onFling(MotionEvent arg0,
MotionEvent arg1,
float arg2,
float arg3) |
void |
onGLContextCreated(EGLContext glContext) |
void |
onGLContextDestroyed(EGLContext glContext) |
void |
onLongPress(MotionEvent arg0) |
void |
onNativeObjectCreated() |
void |
onNativeObjectDestroyed() |
void |
onPause() |
void |
onResume() |
boolean |
onScale(ScaleGestureDetector detector) |
boolean |
onScaleBegin(ScaleGestureDetector detector) |
void |
onScaleEnd(ScaleGestureDetector detector) |
boolean |
onScroll(MotionEvent arg0,
MotionEvent arg1,
float arg2,
float arg3) |
void |
onShowPress(MotionEvent arg0) |
boolean |
onSingleTapUp(MotionEvent arg0) |
void |
onSurfaceChanged(GL10 gl,
int width,
int height) |
void |
onSurfaceCreated(GL10 gl,
EGLConfig config) |
boolean |
onTouchEvent(MotionEvent event) |
void |
removeAllMaps(boolean clearCache)
Removes all maps currently displayed and optionally flushes the cache.
|
void |
removeArrowPulse(java.lang.String name)
Remove the arrow pulse
|
void |
removeDynamicMarkerFromMap(java.lang.String mapName,
java.lang.String markerName)
Remove a marker
|
void |
removeHaloPulse(java.lang.String name)
Remove the animated vector circle.
|
void |
removeMap(java.lang.String mapName,
boolean clearCache)
Remove a map layer from the current view and optionally clear the internal caches.
|
void |
setArrowPulseLocation(java.lang.String name,
Location location)
Set the position of an arrow pulse
|
void |
setArrowPulseLocation(java.lang.String name,
Location location,
double animationDuration)
Set the position of an arrow pulse
|
void |
setBackgroundColor(int color)
Update background color of map view
|
void |
setCameraOrientation(double heading,
double roll,
double pitch,
double animationDuration)
Sets the map view orientation
|
void |
setDynamicColorBarOffset(double offset) |
void |
setDynamicMarkerAnchorPoint(java.lang.String mapName,
java.lang.String markerName,
PointF anchorPoint)
Set a dynamic marker anchor point
|
void |
setDynamicMarkerImage(java.lang.String mapName,
java.lang.String markerName,
Bitmap bitmap)
Sets the image for the marker
|
void |
setDynamicMarkerLocation(java.lang.String mapName,
java.lang.String markerName,
Location location,
double animationDuration)
Set a dynamic marker location.
|
void |
setDynamicMarkerMapColorBar(java.lang.String mapName,
ColorBar colorBar)
A color bar applied to a marker map will multiply the color of the marker image by a color in the color map.
|
void |
setDynamicMarkerOffset(java.lang.String mapName,
java.lang.String markerName,
PointF offset)
Set a dynamic marker offset
|
void |
setDynamicMarkerRotation(java.lang.String mapName,
java.lang.String markerName,
double rotation,
double animationDuration)
Set a dynamic marker rotation.
|
void |
setDynamicTerrainColorBar(ColorBar colorBar) |
void |
setHaloPulseLocation(java.lang.String name,
Location location)
Set the position of the halo.
|
void |
setHaloPulseLocation(java.lang.String name,
Location location,
double animationDuration)
Set the position of the halo.
|
void |
setLicenseKey(java.lang.String licenseKey)
Set license key and disable BA3 watermark.
|
void |
setLineStyleOnVectorMap(java.lang.String mapName,
int shapeId,
LineStyle style)
Sets the vector style for a particular feature ID
|
void |
setLocation(Location location)
Sets the map view to center over the provided location.
|
void |
setLocation(Location location,
double animationDuration)
Sets the map view to animate to the the provided location.
|
void |
setLocation3D(Location3D location)
Sets the map view to center over the provided location
|
void |
setLocation3D(Location3D location,
double animationDuration)
Sets the map view to animate to the the provided location.
|
void |
setLocationThatFitsCoordinates(Location[] coordinates,
double horizontalBuffer,
double verticalBuffer)
Sets the map view to a location that contains all the coordinates
|
void |
setLocationThatFitsCoordinates(Location[] coordinates,
double horizontalBuffer,
double verticalBuffer,
double animationDuration)
Sets the map view to animate to a location that contains all the coordinates
|
void |
setLocationThatFitsCoordinates(Location locationA,
Location locationB,
double horizontalBuffer,
double verticalBuffer)
Sets the map view to a location that contains the 2 locations
|
void |
setLocationThatFitsCoordinates(Location locationA,
Location locationB,
double horizontalBuffer,
double verticalBuffer,
double animationDuration)
Sets the map view to animate to a location that contains the 2 locations
|
void |
setMapAlpha(java.lang.String mapName,
float alpha)
Set the alpha value of a map layer.
|
void |
setMapZOrder(java.lang.String mapName,
int zOrder)
Set the zorder value of a map layer
|
void |
setMarkerMapColorBar(java.lang.String mapName,
ColorBar colorBar)
A color bar applied to a marker map will multiply the color of the marker image by a color in the color map.
|
void |
setMaximumZoom(double maxZoom)
Update maximum zoom size of map view
|
void |
setMaxTileRenderSize(int tileSize)
Sets the maximum tile size on screen.
|
void |
setMaxVirtualMapParentSearchDepth(int levels)
When a virtual map is displayed some tiles may be already cached and the search depth is how many levels
lower than the target level to search for a tile in the cache to display when the target tile is not available.
|
void |
setMinimumZoom(double minZoom)
Update minimum zoom size of map view
|
void |
setMultithreaded(boolean multithreaded)
Toggles using single or multiple threads for threads managed by the map view
|
void |
setPanAcceleration(float panAcceleration)
After a pan gesture is complete this accleration is applied to the previous panVelocity
|
void |
setPanEnabled(boolean panEnabled)
Toggle whether or not panning gestures are processed.
|
void |
setPanVelocityScale(float panVelocityScale)
Scales pan velocity at small scales.
|
void |
setPolygonStyleOnVectorMap(java.lang.String mapName,
int shapeId,
PolygonStyle style)
Sets the vector style for a particular feature ID
|
void |
setRenderingThread(java.lang.Thread renderingThread) |
void |
setTerrainColorBar(ColorBar colorBar,
int waterColor)
This color bar affects the color of all terrain maps.
|
void |
setTesselationThresholdForMap(java.lang.String mapName,
float threshold)
Sets tesselation threshold for lines in nautical miles on dynamic vector maps.
|
void |
setTileLevelBias(float bias)
The tile level bias helps balance between a uniform level of tiles on screen vs maintaining the max tile specified by setMaxTileRenderSize.
|
void |
setTrackUp(boolean trackUpEnabled)
Enables or disables the map view to take into account the view heading.
|
void |
setTrackUpForwardDistance(double distance)
Set the point distance from the bottom of the view on which the virtual camera is centered in track-up mode.
|
void |
setTrackUpForwardDistance(double distance,
double animationDuration)
Set the point distance from the bottom of the view on which the virtual camera is centered in track-up mode.
|
void |
setZoomEnabled(boolean zoomEnabled)
Disable zooming.
|
void |
showDynamicMarker(java.lang.String mapName,
java.lang.String markerName)
Make a marker that was hidden now visible
|
boolean |
tileIsNeeded(TileProviderRequest tileRequest)
This function is reserved fo the TileFactor class.
|
void |
tileLoadComplete(TileProviderRequest request)
Called after a TileProvider tile request to add a tile to the mapView
|
void |
vectorTileLoadComplete(TileProviderRequest request,
GeometryGroup geometryGroup)
Called after a TileProvider tile request to add a tile to the mapView
|
public static boolean DEBUG
public static boolean PRESERVE_GLCONTEXT_ONPAUSE
public static int CACHESIZE
public static int TILESINFLIGHT
public static boolean CALL_EGL_DESTROYCONTEXT
public MapView(Context context)
public MapView(Context context, AttributeSet attrs)
public MapView(Context context, boolean translucent, int depth, int stencil)
public java.lang.String getVersionTag()
public java.lang.String getVersionHash()
public void onPause()
public void onResume()
public void onNativeObjectCreated()
public void onNativeObjectDestroyed()
public void createNativeObject()
public void destroyNativeObject(long nativeObjectHandle)
protected void finalize() throws java.lang.Throwable
java.lang.Throwable
public void onGLContextCreated(EGLContext glContext)
public void onGLContextDestroyed(EGLContext glContext)
public void onSurfaceChanged(GL10 gl, int width, int height)
public void onSurfaceCreated(GL10 gl, EGLConfig config)
public void onDrawFrame(GL10 gl)
public void addReadyListener(ReadyListener newListener)
public void setRenderingThread(java.lang.Thread renderingThread)
public int getterTest()
public Location getCenterCoordinate()
public double getAltitude()
public Location3D getLocation3D()
public void getLocationForPoint(PointF point, ConvertPointCallback callback)
point
- a point in view spacecallback
- called when the geographic location is computedpublic PointF convertCoordinate(Location coord)
coord
- Location coordinate to convertpublic boolean tileIsNeeded(TileProviderRequest tileRequest)
tileRequest
- public void setBackgroundColor(int color)
color
- Integer color in the format ARGB.public void setMinimumZoom(double minZoom)
minZoom
- Double closest point camera/viewer can get to the map in meterspublic void setMaximumZoom(double maxZoom)
maximum
- Double closest point camera/viewer can get to the map in meterspublic void setPanEnabled(boolean panEnabled)
panEnabled
- boolean whether or not to enable panningpublic void setZoomEnabled(boolean zoomEnabled)
zoomEnabled
- public void setMaxVirtualMapParentSearchDepth(int levels)
levels
- Default is 5public void setMultithreaded(boolean multithreaded)
multithreaded
- flag where true is multithreaded and false is singlethreaded.public void setMaxTileRenderSize(int tileSize)
tileSize
- size in dp. Default is 380.public void setTileLevelBias(float bias)
bias
- Default is 1public void setPanVelocityScale(float panVelocityScale)
panVelocityScale
- Default is 1public void setTerrainColorBar(ColorBar colorBar, int waterColor)
colorBar
- a map of height values to color valueswaterColor
- the color for all water in the terrain mappublic void setDynamicMarkerMapColorBar(java.lang.String mapName, ColorBar colorBar)
mapName
- name of a marker mapcolorBar
- a map of double values to color valuespublic void setMarkerMapColorBar(java.lang.String mapName, ColorBar colorBar)
mapName
- name of a marker mapcolorBar
- a map of double values to color valuespublic void setDynamicTerrainColorBar(ColorBar colorBar)
public void setDynamicColorBarOffset(double offset)
public void addMap(java.lang.String mapName, java.lang.String mapSqliteFileName, java.lang.String mapDataFileName, boolean compressTextures)
mapName
- Unique name of the map for this view.mapSqliteFileName
- The fully qualifed path/filename of the map's .sqlite file.mapDataFileName
- The fully qualified path/filename of the map's .map data file.compressTextures
- Whether or not raster data from the map should be compressed to 2-byte format internally.public void addVectorMap(java.lang.String mapName, java.lang.String mapSqliteFileName, java.lang.String mapDataFileName)
mapName
- Unique name of the map for this view.mapSqliteFileName
- The fully qualified path/filename of the map's .sqlite file.mapDataFileName
- The fully qualified path/filename of the map's .map data file.public void addMBTilesMap(java.lang.String mapName, java.lang.String fileName, java.lang.String defaultTileName, ImageDataType imageDataType, boolean compressTextures, int zOrder, MapLoadingStrategy mapLoadingStrategy)
mapName
- Unique name of the map layerfileName
- Fully qualified path to the mbtiles filenamedefaultTileName
- The name of a cached image to use if waiting for tiles to load.imageDataType
- Indicates whether the raster tiles are JPG or PNGcompressTextures
- YES to compress tile textures to a 2 byte formatzOrder
- Layer order for this mapmapLoadingStrategy
- Controls how tiles get loaded, kLowestDetailFirst will load tiles top down (less efficient but better user experience, kHighestDetailOnly will load only tiles at the current zoom level, faster)public void addInternetMap(java.lang.String mapName, java.lang.String urlTemplate, java.lang.String subDomains, int maxLevel, int zOrder, int numWorkers, boolean useCache, boolean enableAlpha)
mapName
- Unique name of the map for this view.urlTemplate
- A URL template that will be used to construct final URLs for image downloading.
For example: http://{s}.tiles.mapbox.com/v3/dxjacob.ho6k3ag9/{z}/{x}/{y}.jpg
Where {s} will be the subdomain (i.e. a, b, c, or d, etc.) and {z}, {x}, and {y} will be replaced with spherical
mercator tile tree numbers respectively.subDomains
- A comma separate list of sub-domains (i.e. "a,b,c,d")zOrder
- Layer order for the mapnumWorkers
- the number of parallel workers to create (don't make this high, try 3 or so)useCache
- If true try reading from the cache, if false, ignore the cache.enableAlpha
- If true, the map is comprised of tiles that may not be fully opaque (like a weather overlay)public void addMapUsingMapInfo(MapInfo mapInfo)
mapInfo
- An MapInfo object or MapInfo derived object that specifies the map type and properties.public void removeMap(java.lang.String mapName, boolean clearCache)
mapName
- The name of the map file (or layer name).clearCache
- A boolean value that indicates whether or not to flush the map's data from the cache.public void removeAllMaps(boolean clearCache)
clearCache
- True to clear cache.public void setMapAlpha(java.lang.String mapName, float alpha)
mapName
- The name of the map file wihout the file extension.alpha
- Value to set alpha to. Range is 0 to 1.public void setMapZOrder(java.lang.String mapName, int zOrder)
mapName
- The name of the map.zOrder
- Value to set the zorder to.public void addCachedPngImage(java.lang.String imageName, byte[] pngData, boolean compressTexture)
imageName
- Unique name of cached imagepngData
- Bytes that represent the png file.compressTexture
- Whether or not to internally compress the image data to a 2-byte format.public void addCachedImage(java.lang.String imageName, Bitmap bitmap, boolean compressTexture)
public void tileLoadComplete(TileProviderRequest request)
request
- must be an object from a previous TileProvider requestTile method callpublic void vectorTileLoadComplete(TileProviderRequest request, GeometryGroup geometryGroup)
request
- must be an object from a previous TileProvider requestTile method callgeometry
- polygons and lines for the tilespublic void addDynamicMarkerToMap(java.lang.String mapName, DynamicMarker dynamicMarker)
mapName
- Unique name of the dynamic marker map layer.dynamicMarker
- Object that fully describes the dynamic marker. Either uiImage or cachedImageName MUST be set.public void removeDynamicMarkerFromMap(java.lang.String mapName, java.lang.String markerName)
mapName
- Unique name of the dynamic marker map layer.markerName
- Unique name of the marker.public void setDynamicMarkerImage(java.lang.String mapName, java.lang.String markerName, Bitmap bitmap)
mapName
- Unique name of the dynamic marker map layer.markerName
- Unique name of the marker to be updated.bitmap
- public void setDynamicMarkerAnchorPoint(java.lang.String mapName, java.lang.String markerName, PointF anchorPoint)
mapName
- Unique name of the dynamic marker map layer.markerName
- Unique name of the marker to be updated.anchorPoint
- center of rotation in the marker image in pixels. An anchor point of (0,0) would rotate around the bottom left of the imagepublic void setDynamicMarkerOffset(java.lang.String mapName, java.lang.String markerName, PointF offset)
mapName
- Unique name of the dynamic marker map layer.markerName
- Unique name of the marker to be updated.offset
- offset in pixels to be applied after rotation. If the rotation is 0, and offset of (10,10) is equivalent to an anchor point of (10,10).public void setDynamicMarkerLocation(java.lang.String mapName, java.lang.String markerName, Location location, double animationDuration)
mapName
- Unique name of the dynamic marker map layer.markerName
- Unique name of the marker to be updated.location
- New location for the marker.animationDuration
- Amount of time to animate marker to new location.public void setDynamicMarkerRotation(java.lang.String mapName, java.lang.String markerName, double rotation, double animationDuration)
mapName
- Unique name of the dynamic marker map layer.markerName
- Unique name of the marker to be updated.rotation
- New rotation for the marker.animationDuration
- Amount of time to animate marker to new location.public void showDynamicMarker(java.lang.String mapName, java.lang.String markerName)
mapName
- Unique name of the dynamic marker map layer.markerName
- Unique name of the marker to be made visible.public void hideDynamicMarker(java.lang.String mapName, java.lang.String markerName)
mapName
- Unique name of the dynamic marker map layer.markerName
- Unique name of the marker to be hidden.public void addHaloPulse(HaloPulse pulse)
pulse
- Describes the style and animation properties of the halo.public void setHaloPulseLocation(java.lang.String name, Location location)
name
- The name of the halolocation
- location of the halo.public void setHaloPulseLocation(java.lang.String name, Location location, double animationDuration)
name
- The name of the halolocation
- location of the halo.animationDuration
- If non-zero, the number of seconds to make it to its new position.public void removeHaloPulse(java.lang.String name)
name
- The name of the vector circle.public void addArrowPulse(ArrowPulse arrowPulse)
arrowPulse
- Describes the style and animation propertiespublic void setArrowPulseLocation(java.lang.String name, Location location)
name
- The name of the pulse.location
- center positionpublic void setArrowPulseLocation(java.lang.String name, Location location, double animationDuration)
name
- The name of the pulse.location
- center positionanimationDuration
- If non-zero, the number of seconds to make it to its new position.public void removeArrowPulse(java.lang.String name)
name
- The name of the pulse.public void setLineStyleOnVectorMap(java.lang.String mapName, int shapeId, LineStyle style)
mapName
- name of the vector mapshapeId
- same id set in Line or Polygonstyle
- line style propertiespublic void setPolygonStyleOnVectorMap(java.lang.String mapName, int shapeId, PolygonStyle style)
mapName
- name of the vector mapshapeId
- same id set in Line or Polygonstyle
- polygon style propertiespublic void addPolygonToVectorMap(java.lang.String mapName, java.lang.String polygonId, Location[] coordinates, PolygonStyle style)
mapName
- The name of the dynamic vector map to add the polygon to.polygonId
- An identifier for the polygon which will be returned if polygon hit testing is enabled.coordinates
- Closed loop of coordinates.style
- Describes how to render the polygon.public void addPolygonToVectorMap(java.lang.String mapName, Location[] coordinates, PolygonStyle style)
mapName
- The name of the dynamic vector map to add the polygon to.coordinates
- Closed loop of coordinates.style
- Describes how to render the polygon.public void addLineToVectorMap(java.lang.String mapName, Location[] coordinates, LineStyle lineStyle)
mapName
- The name of the dynamic vector map to add the line to.coordiantes
- lineStyle
- Describes How to render the line.public void addDynamicLineToVectorMap(java.lang.String mapName, java.lang.String lineId, Location[] coordinates, LineStyle lineStyle)
mapName
- The name of the vector map.coordiantes
- style
- The style of the polygon.public void clearDynamicGeometryFromMap(java.lang.String mapName)
mapName
- The name of the vector map.public void setTesselationThresholdForMap(java.lang.String mapName, float threshold)
mapName
- The name of the vector map.threshold
- The minimum distance in nautical miles between vertices for computed lines.public void setLocation(Location location)
location
- public void setLocation(Location location, double animationDuration)
location
- animationDuration
- duration in secondspublic void setLocation3D(Location3D location)
location
- public void setLocation3D(Location3D location, double animationDuration)
location
- animationDuration
- duration in secondspublic void setLocationThatFitsCoordinates(Location[] coordinates, double horizontalBuffer, double verticalBuffer)
coordinates
- horizontalBuffer
- buffer in pixels from the left and right edge of the screen to the nearest provided coordinateverticalBuffer
- buffer in pixels from the top and bottom edge of the screen to the nearest provided coordinatepublic void setLocationThatFitsCoordinates(Location[] coordinates, double horizontalBuffer, double verticalBuffer, double animationDuration)
coordinates
- horizontalBuffer
- buffer in pixels from the left and right edge of the screen to the nearest provided coordinateverticalBuffer
- buffer in pixels from the top and bottom edge of the screen to the nearest provided coordinateanimationDuration
- duration in secondspublic void setLocationThatFitsCoordinates(Location locationA, Location locationB, double horizontalBuffer, double verticalBuffer)
locationA
- locationB
- horizontalBuffer
- buffer in pixels from the left and right edge of the screen to the nearest provided coordinateverticalBuffer
- buffer in pixels from the top and bottom edge of the screen to the nearest provided coordinatepublic void setLocationThatFitsCoordinates(Location locationA, Location locationB, double horizontalBuffer, double verticalBuffer, double animationDuration)
locationA
- locationB
- horizontalBuffer
- buffer in pixels from the left and right edge of the screen to the nearest provided coordinateverticalBuffer
- buffer in pixels from the top and bottom edge of the screen to the nearest provided coordinateanimationDuration
- duration in secondspublic void setCameraOrientation(double heading, double roll, double pitch, double animationDuration)
heading
- in degrees. Default is 0 (North)roll
- in degreespitch
- in degreesanimationDuration
- in secondspublic void setTrackUp(boolean trackUpEnabled)
trackUpEnabled
- public void setTrackUpForwardDistance(double distance)
distance
- in dp (Density-Independent Pixels)public void setTrackUpForwardDistance(double distance, double animationDuration)
distance
- in dp (Density-Independent Pixels)animationDuration
- in secondspublic void setLicenseKey(java.lang.String licenseKey)
licenseKeyString
- public void setPanAcceleration(float panAcceleration)
accleration
- Default is -1public float getDeviceScale()
public boolean onTouchEvent(MotionEvent event)
public boolean onDown(MotionEvent arg0)
public boolean onFling(MotionEvent arg0, MotionEvent arg1, float arg2, float arg3)
public void onLongPress(MotionEvent arg0)
public boolean onScroll(MotionEvent arg0, MotionEvent arg1, float arg2, float arg3)
public void onShowPress(MotionEvent arg0)
public boolean onSingleTapUp(MotionEvent arg0)
public boolean onScaleBegin(ScaleGestureDetector detector)
public boolean onScale(ScaleGestureDetector detector)
public void onScaleEnd(ScaleGestureDetector detector)