Initialize (TakeKeyFromManifest AsBoolean) AsBingMapTileSource If you set TakeKeyFromManifest to True then add next line to manifest. Replace 'YOUR KEY' with your valid BingMaps key.
AddApplicationText()
Initialize2 (TakeKeyFromManifest AsBoolean, Locale AsString) AsBingMapTileSource If you set TakeKeyFromManifest to True then add next line to manifest. Replace 'YOUR KEY' with your valid BingMaps key.
AddApplicationText()
Visit link for supported locale strings.|https://learn.microsoft.com/en-us/bingmaps/rest-services/common-parameters-and-types/supported-culture-codes
Initialize3 (Key AsString) AsBingMapTileSource Enter BingMaps ApiKey as String.
Initialize4 (Key AsString, Locale AsString) AsBingMapTileSource Enter BingMaps ApiKey as String.
Visit link for supported locale strings.|https://learn.microsoft.com/en-us/bingmaps/rest-services/common-parameters-and-types/supported-culture-codes
IsInitializedAsBoolean
Release
SetBingKey (Key AsString) AsBingMapTileSource
SetStyle (Style AsString) AsBingMapTileSource Default style is ROAD_ON_DEMAND.
Use BingMapsMapStyles static module to choose another style.
Example: BingMap1.SetStyle(BingMapTileSourceStyles.AERIAL)
Properties:
BaseUrlAsString [read only]
CopyrightNoticeAsString [read only]
ImageFilenameEndingAsString [read only]
MaximumZoomLevelAsInt [read only]
MinimumZoomLevelAsInt [read only]
NameAsString [read only]
PathBaseAsString [read only]
TileSizePixelsAsInt [read only]
TileSourcePolicyAsTileSourcePolicy [read only]
BingMapsMap_Styles
Fields:
AERIALAsString Aerial imagery mode
AERIAL_WITH_LABELSAsString (Deprecated): Aerial imagery with a road overlay, using the legacy static tile service. This service is deprecated and current data will not be refreshed. New applications should instead use AerialWithLabelsOnDemand.
AERIAL_WITH_LABELS_ON_DEMANDAsString Aerial imagery with a road overlay, using the dynamic tile service.
BIRDSEYE_V2AsString The second generation Bird’s eye (oblique-angle) imagery.
BIRDSEYE_V2_WITH_LABELSAsString The second generation Bird’s eye (oblique-angle) imagery with a road overlay.
BIRDSEYE_WITH_LABELSAsString Bird’s eye imagery with a road overlay.
CANVAS_DARKAsString A dark version of the road maps.
CANVAS_GRAYAsString A grayscale version of the road maps.
CANVAS_LIGHTAsString A lighter version of the road maps which also has some of the details such as hill shading disabled.
ORDINANCE_SURVEYAsString Ordnance Survey imagery. This imagery is visible only for the London area.
ROADAsString (Deprecated): Roads without additional imagery, using the legacy static tile service. This service is deprecated and current data will not be refreshed. New applications should instead use RoadOnDemand.
ROAD_ON_DEMANDAsString Roads without additional imagery, using the dynamic tile service.
STREETSIDEAsString Street-level Imagery.
BitmapTileSourceBase
This is an internal supertype class and cannot be initialized by the user.
GetCenterLongitude (West AsDouble, East AsDouble) AsDouble Compute the center of two longitudes.
Taking into account the case when "west is on the right and east is on the left".
GetRelativePositionOfGeoPointInBoundingBoxWithLinearInterpolation (Latitude AsDouble, Longitude AsDouble, Reuse AsPointF) AsPointF Return relative position determined from the upper left corner.
{0,0} would be the upper left corner. {1,1} would be the lower right corner. {1,0} would be the lower left corner. {0,1} would be the upper right corner.
IncreaseByScale (BoundingboxPaddingRelativeScale AsFloat) AsBoundingBox Scale this bounding box by a given factor.
Return scaled bounding box.
InitializeAsBoundingBox
Initialize2 (North AsDouble, East AsDouble, South AsDouble, West AsDouble) AsBoundingBox
Overlaps (BoundingBox1 AsBoundingBox, ZoomLevel AsDouble) AsBoolean Returns true if there is any overlap from this to the input bounding box.
Edges includes of a match.
Sensitive to vertical and horiztonal map wrapping.
Set (North AsDouble, East AsDouble, South AsDouble, West AsDouble) AsBoundingBox
SetLatNorth (LatNorth AsDouble) AsBoundingBox
SetLatSouth (LatSouth AsDouble) AsBoundingBox
SetLonEast (LonEast AsDouble) AsBoundingBox
SetLonWest (LonWest AsDouble) AsBoundingBox
Properties:
ActualNorthAsDouble [read only]
ActualSouthAsDouble [read only]
CenterAsGeoPoint [read only]
CenterLatitudeAsDouble [read only]
CenterLongitudeAsDouble [read only]
CenterWithDateLineAsGeoPoint [read only]
DiagonalLengthInMetersAsDouble [read only]
LatitudeSpanAsDouble [read only]
Determines the height of the bounding box.
Return latitude span in degrees.
LongitudeSpanWithDateLineAsDouble [read only]
Determines the width of the bounding box.
Return longitude span in degrees.
SetOffset (X AsInt, Y AsInt) AsCopyrightOverlay Sets the screen offset. Values are in real pixels, not dip
X - horizontal screen offset, if align right is set, the offset is from the right, otherwise lift
Y - vertical screen offset, if align bottom is set, the offset is pixels from the bottom (not the top)
Initialize (TakeCredentialsFromManifest AsBoolean) AsHEREWeGoTileSource Pass True to load the access token and mapID from the manifest.
Add next lines to manifest. Replace android values with your valid parameters. AddApplicationText()
AddApplicationText()
AddApplicationText()
AddApplicationText()
If you pass False you won't be able to use it until you set the access token and map id.
Initialize2 (HEREWeGoMapId AsString, AccessToken AsString, AppCode AsString) AsHEREWeGoTileSource Creates a new tile source, using the specified map ID, access token and app code.
Initialize3 (Name AsString, ZoomMinLevel AsInt, ZoomMaxLevel AsInt, TileSizePixels AsInt, ImageFilenameEnding AsString) AsHEREWeGoTileSource TileSource allowing majority of options to be user selected.
Initialize4 (Name AsString, ZoomMinLevel AsInt, ZoomMaxLevel AsInt, TileSizePixels AsInt, ImageFilenameEnding AsString, HEREWeGoMapId AsString, VersionBaseUrl AsString) AsHEREWeGoTileSource TileSource allowing all options to be user selected.
IsInitializedAsBoolean
Release
RetrieveAppCodeAsHEREWeGoTileSource Reads the app code from the manifest.
RetrieveAppIdAsHEREWeGoTileSource Reads the access token from the manifest.
RetrieveHEREWeGoMapIdAsHEREWeGoTileSource Reads the map id from the manifest.
SetMultiplier (Multiplier AsFloat) AsLatLonGridlineOverlay Default is 1, larger number = more lines on screen. This comes at a performance penalty though.
SetTextLabelsBackgroundColor (TextLabelsBackgroundColor AsInt) AsLatLonGridlineOverlay Background color for the text labels.
Initialize (TakeCredentialsFromManifest AsBoolean) AsMapBoxTileSource Pass True to load the access token and mapID from the manifest.
Add next lines to manifest. Replace 'YOUR KEY' and 'YOUR TOKEN' with your valid parameters. AddApplicationText()
AddApplicationText()
If you pass False you won't be able to use it until you set the access token and map id.
Initialize2 (MapBoxId AsString, AccessToken AsString) AsMapBoxTileSource Creates a new tile source, using the specified access token and ID.
Initialize3 (Name AsString, ZoomMinLevel AsInt, ZoomMaxLevel AsInt, TileSizePixels AsInt, ImageFilenameEnding AsString) AsMapBoxTileSource TileSource allowing majority of options to be user selected.
Initialize4 (Name AsString, ZoomMinLevel AsInt, ZoomMaxLevel AsInt, TileSizePixels AsInt, ImageFilenameEnding AsString, MapBoxMapId AsString, MapBoxVersionBaseUrl AsString) AsMapBoxTileSource TileSource allowing all options to be user selected.
InitializeAsMapQuestTileSource Add next lines to manifest. Replace 'YOUR KEY' and 'YOUR TOKEN' with your valid parameters. AddApplicationText()
AddApplicationText()
Initialize2 (MapQuestId AsString, AccessToken AsString) AsMapQuestTileSource Creates a new tile source, using the specified access token and ID.
Initialize3 (Name AsString, ZoomMinLevel AsInt, ZoomMaxLevel AsInt, TileSizePixels AsInt, ImageFilenameEnding AsString) AsMapQuestTileSource TileSource allowing majority of options to be user selected.
Initialize4 (Name AsString, ZoomMinLevel AsInt, ZoomMaxLevel AsInt, TileSizePixels AsInt, ImageFilenameEnding AsString, MapQuestMapId AsString, MapQuestVersionBaseUrl AsString) AsMapQuestTileSource TileSource allowing all options to be user selected.
SetLayout (Left AsInt, Top AsInt, Width AsInt, Height AsInt)
Changes the view position and size.
SetLayoutAnimated (Duration AsInt, Left AsInt, Top AsInt, Width AsInt, Height AsInt)
Similar to SetLayout. Animates the change. Note that the animation will only be applied when running on Android 3+ devices.
Duration - Animation duration measured in milliseconds.
SetScrollableAreaLimitLatitude (North AsDouble, South AsDouble, ExtraPixelHeight AsInt)
SetScrollableAreaLimitLongitude (West AsDouble, East AsDouble, ExtraPixelWidth AsInt)
SetVisibleAnimated (Duration AsInt, Visible AsBoolean)
Changes the view visibility with a fade-in or fade-out animation.
You must
Note that the animation will only be applied when running on Android 3+ devices.
Duration - Animation duration measured in milliseconds.
Visible - New visibility state.
NewBingMapTileSource (TakeKeyFromManifest AsBoolean) AsBingMapTileSource If you set TakeKeyFromManifest to True then add next line to manifest. Replace 'YOUR KEY' with your valid BingMaps key.
AddApplicationText()
NewBingMapTileSource2 (TakeKeyFromManifest AsBoolean, Locale AsString) AsBingMapTileSource If you set TakeKeyFromManifest to True then add next line to manifest. Replace 'YOUR KEY' with your valid BingMaps key.
AddApplicationText()
Visit link for supported locale strings.|https://learn.microsoft.com/en-us/bingmaps/rest-services/common-parameters-and-types/supported-culture-codes
NewBingMapTileSource3 (Key AsString) AsBingMapTileSource Enter BingMaps ApiKey as String.
NewBingMapTileSource4 (Key AsString, Locale AsString) AsBingMapTileSource Enter BingMaps ApiKey as String.
Visit link for supported locale strings.|https://learn.microsoft.com/en-us/bingmaps/rest-services/common-parameters-and-types/supported-culture-codes
NewBoundingBoxAsBoundingBox
NewBoundingBox2 (North AsDouble, East AsDouble, South AsDouble, West AsDouble) AsBoundingBox
NewHEREWeGoTileSource (TakeCredentialsFromManifest AsBoolean) AsHEREWeGoTileSource Pass True to load the access token and mapID from the manifest.
Add next lines to manifest. Replace android values with your valid parameters. AddApplicationText()
AddApplicationText()
AddApplicationText()
AddApplicationText()
If you pass False you won't be able to use it until you set the access token and map id.
NewHEREWeGoTileSource2 (HEREWeGoMapId AsString, AccessToken AsString, AppCode AsString) AsHEREWeGoTileSource Creates a new tile source, using the specified map ID, access token and app code.
NewHEREWeGoTileSource3 (Name AsString, ZoomMinLevel AsInt, ZoomMaxLevel AsInt, TileSizePixels AsInt, ImageFilenameEnding AsString) AsHEREWeGoTileSource TileSource allowing majority of options to be user selected.
NewHEREWeGoTileSource4 (Name AsString, ZoomMinLevel AsInt, ZoomMaxLevel AsInt, TileSizePixels AsInt, ImageFilenameEnding AsString, HEREWeGoMapId AsString, VersionBaseUrl AsString) AsHEREWeGoTileSource TileSource allowing all options to be user selected.
NewMapBoxTileSource (TakeCredentialsFromManifest AsBoolean) AsMapBoxTileSource Pass True to load the access token and mapID from the manifest.
Add next lines to manifest. Replace 'YOUR KEY' and 'YOUR TOKEN' with your valid parameters. AddApplicationText()
AddApplicationText()
If you pass False you won't be able to use it until you set the access token and map id.
NewMapBoxTileSource2 (MapBoxId AsString, AccessToken AsString) AsMapBoxTileSource Creates a new tile source, using the specified access token and ID.
NewMapBoxTileSource3 (Name AsString, ZoomMinLevel AsInt, ZoomMaxLevel AsInt, TileSizePixels AsInt, ImageFilenameEnding AsString) AsMapBoxTileSource TileSource allowing majority of options to be user selected.
NewMapBoxTileSource4 (Name AsString, ZoomMinLevel AsInt, ZoomMaxLevel AsInt, TileSizePixels AsInt, ImageFilenameEnding AsString, MapBoxMapId AsString, MapBoxVersionBaseUrl AsString) AsMapBoxTileSource TileSource allowing all options to be user selected.
NewMapQuestTileSourceAsMapQuestTileSource Add next lines to manifest. Replace 'YOUR KEY' and 'YOUR TOKEN' with your valid parameters. AddApplicationText()
AddApplicationText()
NewMapQuestTileSource2 (MapQuestId AsString, AccessToken AsString) AsMapQuestTileSource Creates a new tile source, using the specified access token and ID.
NewMapQuestTileSource3 (Name AsString, ZoomMinLevel AsInt, ZoomMaxLevel AsInt, TileSizePixels AsInt, ImageFilenameEnding AsString) AsMapQuestTileSource TileSource allowing majority of options to be user selected.
NewMapQuestTileSource4 (Name AsString, ZoomMinLevel AsInt, ZoomMaxLevel AsInt, TileSizePixels AsInt, ImageFilenameEnding AsString, MapQuestMapId AsString, MapQuestVersionBaseUrl AsString) AsMapQuestTileSource TileSource allowing all options to be user selected.
NewSimpleFastPointOverlayOptions (UseDefaultStyleOptions AsBoolean) AsSimpleFastPointOverlayOptions UseDefaultStyleOptions: True to initialize with default style options, False to initialize without predefined options.
NewSpeechBalloonOverlayAsSpeechBalloonOverlay
NewSpeechBalloonOverlay2 (mGeoPoint AsGeoPoint, Title AsString) AsSpeechBalloonOverlay
NewThunderforestTileSource (MapType AsInt) AsThunderforestTileSource Add next line to manifest. Replace 'YOUR KEY' with your valid key. AddApplicationText()
Use ThunderforestMapTypes static module to choose a map type.
Example: Thunder=OSMDroid6.NewThunderforestTileSource(ThunderforestMapTypes.CYCLE)
NewTileSourcePolicyAsTileSourcePolicy
NewTileSourcePolicy2 (MaxConcurrent AsInt, Flags AsInt) AsTileSourcePolicy Use TileSourcePolicyFlags static module to choose flags.
Example: TileSourcePolicyFlags.FLAG_NO_BULK
AdditionalHttpRequestPropertiesAsMap [read only]
Enables you to set and get additional HTTP request properties. Used when downloading tiles. Mustn't be null, but will be empty in most cases.
AnimationSpeedDefaultAsInt Used during zoom animations. Durations is in milliseconds.
AnimationSpeedShortAsInt Used during zoom animations. Durations is in milliseconds.
CacheMapTileCountAsShort Initial tile cache size (in memory).
CacheMapTileOvershootAsShort In memory tile count, used by the tiles overlay
DebugMapTileDownloaderAsBoolean
DebugMapViewAsBoolean Typically used to enable additional debugging.
DebugModeAsBoolean Typically used to enable additional debugging.
DebugTileProvidersAsBoolean Typically used to enable additional debugging.
EnforceTileSystemBoundsAsBoolean
ExpirationExtendedDurationAsLong Returns the amount of time in ms added to server specified tile expiration time.
ExpirationOverrideDurationAsLong Optional period of time in ms that will override any downloaded tile's expiration timestamp.
GpsWaitTimeAsLong The time we wait after the last GPS location before using a non-GPS location. Time is in milliseconds.
Default is 20 seconds.
MapTileDownloaderFollowRedirectsAsBoolean
MapViewHardwareAcceleratedAsBoolean Default is false.
MapViewRecyclerFriendlyAsBoolean If true, the map view will set .setHasTransientState(true) for API 16+ devices. This is now the default setting. Set to false if this is causing you issues.
NormalizedUserAgentAsString [read only]
OsmdroidBasePathAsString Base path for osmdroid files. Zip/sqlite/mbtiles/etc files are in this folder. Note: also used for offline tile sources.
OsmdroidTileCachePathAsString By default, maps to getOsmdroidBasePath() & "/tiles" By default, it is defined in SD card, osmdroid directory. Sets the location where the tile cache is stored. Changes are only in effect when the MapView is created. Changes made after it's creation (either pogrammatic or via layout inflator) have no effect until the map is restarted or the MapView.setTileProvider(MapTileProviderBase) is changed or recreated.
TileDownloadMaxQueueSizeAsShort
TileDownloadThreadsAsShort Number of tile download threads. Default is 2.
TileFileSystemCacheMaxBytesAsLong Default is 600 Mb.
TileFileSystemCacheTrimBytesAsLong When the cache size exceeds maxCacheSize, tiles will be automatically removed to reach this target. In bytes. Default is 500 Mb.
TileFileSystemMaxQueueSizeAsShort
TileFileSystemThreadsAsShort Used for both file system cache and the sqlite cache.
TileGCBulkPauseInMillisAsLong Pause during tile garbage collection bulk deletions.
TileGCFrequencyInMillisAsLong Delay between tile garbage collection calls.
UserAgentHttpHeaderAsString "User-Agent" is the default value and standard used throughout all http servers. It is set to Context.getPackageName() which is defined your manifest file.
SetSelectedPoint (ToSelect AsInt) AsSimpleFastPointOverlay Sets the highlighted point. App must invalidate the MapView.
Properties:
BoundingBoxAsBoundingBox [read only]
IsLabelledAsBoolean [read only]
Whether this overlay has labelled Points.
IsStyledAsBoolean [read only]
Whether the overlay's points are individually styled.
PointsAsListOfGeoPoints [read only]
SelectedPointAsInt [read only]
StyleAsSimpleFastPointOverlayOptions [read only]
SimpleFastPointOverlayOptions
Functions:
GetAlgorithmAsObject
GetCellSizeAsInt
GetCircleRadiusAsFloat
GetLabelPolicyAsObject
GetMaxNShownLabelsAsInt
GetMinZoomShowLabelsAsInt
GetPointStyleAsPaint
GetSelectedCircleRadiusAsFloat
GetSelectedPointStyleAsPaint
GetSymbolAsObject
GetTextStyleAsPaint
Initialize (UseDefaultStyleOptions AsBoolean) AsSimpleFastPointOverlayOptions UseDefaultStyleOptions: True to initialize with default style options, False to initialize without predefined options.
IsClickableAsBoolean
IsInitializedAsBoolean
SetAlgorithm (RenderingAlgorithm AsObject) AsSimpleFastPointOverlayOptions Sets the rendering algorithm. There are three options:
1. NO_OPTIMIZATION: Slowest option. Draw all points on each draw event.
2. MEDIUM_OPTIMIZATION: Faster. Recalculates the grid index on each draw event. Not recommended for >10k points. Better UX, but may be choppier.
3. MAXIMUM_OPTIMIZATION: Fastest. Only recalculates the grid on touch up and animation end , hence much faster display on move. Recommended for >10k points.
Use SimpleFastPointOverlayOptions_RenderingAlgorithm static class module to select rendering algorithm.
SetCellSize (CellSize AsInt) AsSimpleFastPointOverlayOptions Sets the grid cell size used for indexing, in pixels. Larger cells result in faster rendering speed, but worse fidelity. Default is 10 pixels, for large datasets (>10k points), use 15.
SetCircleRadius (Radius AsFloat) AsSimpleFastPointOverlayOptions Sets the radius of the circles to be drawn.
SetIsClickable (IsClickable AsBoolean) AsSimpleFastPointOverlayOptions Sets whether this overlay is clickable or not. A clickable overlay will automatically select the nearest point.
SetLabelPolicy (LabelPolicy AsObject) AsSimpleFastPointOverlayOptions Sets the policy for displaying point labels. Can be:
1. ZOOM_THRESHOLD: Labels are not displayed is current map zoom level is lower than MinZoomShowLabels.
2. DENSITY_THRESHOLD: Labels are not displayed when the number of visible points is larger than MaxNShownLabels. This only works for MAXIMUM_OPTIMIZATION.
Use SimpleFastPointOverlayOptions_LabelPolicy static class module to select policy for displaying point labels.
SetMaxNShownLabels (MaxNShownLabels AsInt) AsSimpleFastPointOverlayOptions Sets the threshold (nr. of visible points) after which labels will not be drawn. This option only works when LabelPolicy is DENSITY_THRESHOLD and the algorithm is MAXIMUM_OPTIMIZATION.
SetMinZoomShowLabels (MinZoomShowLabels AsInt) AsSimpleFastPointOverlayOptions Sets the minimum zoom level at which the labels should be drawn. This option is ignored if LabelPolicy is DENSITY_THRESHOLD.
SetPointStyle (Style AsPaint) AsSimpleFastPointOverlayOptions Sets the style for the point overlay, which is applied to all circles. If the layer is individually styled, the individual style overrides this.
SetSelectedCircleRadius (Radius AsFloat) AsSimpleFastPointOverlayOptions Sets the radius of the selected point's circle.
SetSelectedPointStyle (Style AsPaint) AsSimpleFastPointOverlayOptions Sets the style for the selected point.
SetSymbol (SymbolShape AsObject) AsSimpleFastPointOverlayOptions Sets the symbol shape for this layer. Hint: circle shape is less performant, avoid for large N.
Use SimpleFastPointOverlayOptions_Shape static class module to select symbol shape for this layer.
SetTextStyle (TextStyle AsPaint) AsSimpleFastPointOverlayOptions Sets the style for the labels. If the layer is individually styled, the individual style overrides this.
SimpleFastPointOverlayOptions_LabelPolicy
Fields:
DENSITY_THRESHOLDAsObject
ZOOM_THRESHOLDAsObject
SimpleFastPointOverlayOptions_RenderingAlgorithm
Fields:
MAXIMUM_OPTIMIZATIONAsObject
MEDIUM_OPTIMIZATIONAsObject
NO_OPTIMIZATIONAsObject
SimpleFastPointOverlayOptions_Shape
Fields:
CIRCLEAsObject
SQUAREAsObject
SpeechBalloonOverlay
Functions:
GetBackgroundFillAsPaint
GetBackgroundRoundedCornersAsBoolean
GetBackgroundStrokeAsPaint
GetDragBackgroundAsPaint
GetDragForegroundAsPaint
GetDraggableAsBoolean
GetEnabledAsBoolean
GetForegroundAsPaint
GetGeoPointAsGeoPoint
GetMarginAsDouble
GetRadiusAsDouble
GetTitleAsString
InitializeAsSpeechBalloonOverlay
Initialize2 (mGeoPoint AsGeoPoint, Title AsString) AsSpeechBalloonOverlay
Initialize (MapType AsInt) AsThunderforestTileSource Add next line to manifest. Replace 'YOUR KEY' with your valid key. AddApplicationText()
Use ThunderforestMapTypes static module to choose a map type.
Example: Thunder.Initialize(ThunderforestMapTypes.CYCLE)