Skip to main content

Map Layers Rendering

The OsmAnd map is rendered by layers from bottom to top. Some layers cover the entire map screen, while others are rendered with transparency. The order of the layers is always the same, so it is important to keep track of what is displayed and in which order.

Order of Layers​

OsmAnd uses three types of layers: raster, symbols, and controls. First, raster layers are rendered in OpenGL, followed by symbol layers. Control layers are rendered independently from OpenGL in the UI of Android or iOS devices, on top of the map.

Android:
Most layers on Android are instantiated in the createLayers method of the MapLayers class.

The order of each layer depends on its zOrder property during instantiation and is set in the getBaseOrder method of the OsmAndMapLayer class.
Other layers may be instantiated in plugins.

iOS:
Most layers on iOS are instantiated in the createLayers method of OAMapLayers.

The order of each layer is set directly by the baseOrder property in createLayers.
Other layers may be instantiated in plugins.

Android Order Tables​

Android. Raster layers​

LayerOrder/RangeTypeDescription
MapTileLayer (underlay)-50 000MapRaster tiles underlay
MapTileLayer (main layer)5 000MapMap raster tiles
ContourLinesLayer6 000MapDoesn't have its own layer class; managed by main MapTileLayer
TerrainLayer60 000MapHillshade and slope
MapTileLayer (overlay)70 000MapRaster tiles overlay

Android. Symbols layers​

Layer / symbolsOrder/RangeTypeDescription
DownloadedRegionsLayer-1 100 000PolygonsShows downloaded regions
Icons (MapVectorLayer)-1 000 000PointsVector map, iconOrder in style with adding 1 000 000
GPXLayer (lines)-500 000LinesTrack lines
RouteLayer (chart highlight point)-197 900PointNavigation route analysis on map
RouteLayer (chart x-axis points)-198 000PointsNavigation route analysis on map
RouteLayer (turn arrows)-199 000LinesNavigation route
RouteLayer-200 000LinesNavigation route
Text (MapVectorLayer)1 - 255TextVector map, textOrder in style, 100 by default
Shields (MapVectorLayer)1 - 255ShieldsVector map, textOrder in style for shields, 100 by default
GPX track start, finish90 101PointsGPXLayer
GPX track waypoint90 300PointsGPXLayer
GPXLayer (wpt name)90 300TextWaypoints name
GPX track chart icon90 500PointsGPXLayer
GPX track selected icon90 600PointsGPXLayer
OSM notes (OsmBugsLayer)200 000PointsOSM notes
Fixme icon (OsmBugsLayer)200 000PointsOSM fixme icons
Fixme text (OsmBugsLayer)200 000TextOSM fixme text
POIMapLayer (icon)300 000PointsPOI overlay
POIMapLayer (name)300 000TextPOI overlay name
AudioNotesLayer350 000PointsAudio/video notes plugin
OsmEditsLayer350 000PointsOSM edit plugin
FavoritesLayer400 000PointsFavorites overlay
TransportStopsLayer500 000LinesPublic transport lines
TransportStopsLayer500 001PointsPublic transport stops
MapTextLayer595 000TextText for different layers, canvas rendering
PointLocationLayer600 000PointsMy location
PointNavigationLayer700 000PointsStart/finish points in navigation
PointNavigationLayer700 600PointsSelected point in navigation
MapMarkersLayer (line)729 999LinesDashed line to map markers
MapMarkersLayer (text)730 000TextText on line. Canvas rendering
MapMarkersLayer (markers)730 000PointsMap markers
ImpassableRoadsLayer750 000PointsAvoid roads
ContextMenuLayer800 000PointsPin of context menu
MapillaryVectorLayer (lines)1 000 000LinesMapillary lines between points
MapillaryVectorLayer (points)1 000 000PointsMapillary points

Android. Controls layers​

Control layerOrder/RangeDescription
PreviewRouteLineLayer150 000Preview route options
MeasurementToolLayer460 000
RadiusRulerControlLayer780 000Radius ruler
DistanceRulerControlLayer790 000Distance ruler
MapInfoLayer900 000Widgets
MapControlsLayer1 100 000
MapQuickActionLayer1 200 000

iOS Order Tables​

iOS. Raster layers​

LayerLayer indexDescription
OAUnderlayMapLayer-5Raster tiles underlay
Raster layer (MapRasterLayerProvider)0Map raster tiles
OATerrainMapLayer4Contour lines, hillshade and slope
OAOverlayMapLayer5Raster tiles overlay
OAMapillaryLayer10Mapillary layer
OAWeatherRasterLayer20Weather
OAWeatherRasterLayer25Weather
OAWeatherContourLayer30Weather

iOS. Symbols layers​

Layer / symbolsOrder/RangeTypeDescription
Icons-1 000 000PointsVector map, iconOrder in style with adding 1 000 000
Text1 - 255TextVector map, textOrder in style, 100 by default
Shields1 - 255ShieldsVector map, textOrder in style for shields, 100 by default
OADownloadedRegionsLayer10 000PolygonsShows downloaded green regions
POI icon (OAPOILayer)90 000PointsPOI overlay
POI name (OAPOILayer)90 000TextPOI overlay name
GPX track lines (OAGPXLayer)100 000LinesTrack lines
GPX waypoint name100 000TextGPX waypoints name
GPX waypoint icon100 003PointsGPX waypoints
GPX track start, finish120 000PointsOAGPXLayer
OSM notes (OAOsmBugsLayer)120 000TextOSM notes
Fixme text (OAOsmBugsLayer)120 000TextOSM fixme text
Fixme icon (OAOsmBugsLayer)120 000PointsOSM fixme icon
OAOsmEditsLayer120 000PointsEdit OSM plugin
OAPreviewRouteLineLayer120 000LinesPreview route options
OATransportStopsLayer (lines)120 000LinesPublic transport ines
OATransportStopsLayer (icons)121 000PointsPublic transport stops
OARouteLayer150 000LinesNavigation route
OAFavoritesLayer160 000PointsFavorites overlay
Avoid roads (OAImpassableRoadsLayer)205 998PointsAvoid roads
My location (OAMyPositionLayer)206 001PointsMy location
Map markers (OADestinationsLayer)207 000PointsMap markers
Map markers (text on line)207 000TextText on line to map markers
Navigation (points)207 015PointsOARouteLayer
Navigation (my location)207 025PointsOARouteLayer
Navigation (arrows on route)208 000PointsOARouteLayer
OARoutePointsLayer209 000PointsNavigation points

iOS. Controls layers​

Control layerOrder/RangeDescription
OAGPXRecLayer110 000Editing GPX
OAMeasurementToolLayer160 000
OARulerByTapControlLayer170 000Distance ruler
OAContextMenuLayer210 000