Skip to main content

Raster Maps (Online / Offline)

๐Ÿšงย This article is incomplete

This article is incomplete & needs to be reviewed. You can help by creating a pull request.

Overviewโ€‹

Raster maps are significant and useful additions to OsmAnd vector maps. They allow you to combine various map sources with vector maps. For example, information about hills and slopes is displayed as a raster layer. You can display an overlay of hiking trails, rain maps, real-time traffic data, and an overlay of satellite imagery on a translucent base vector map. You can also switch the default maps to raster tiles on the web.

Use Casesโ€‹

Raster maps have a wide range of uses. Here are some of the most popular:

  • Satellite images as an underlay.
  • Real-time traffic information.
  • Rain forecast as an overlay.
  • Topographic maps with the shading of hills and slopes.
  • Active cycling and running routes as an overlay.
  • Real-time vessel information.
  • Online OpenStreetMap tiles for OSM editing.

Online maps overview

tip

You can also change the main source of maps from vector maps to online tiles.

Raster Mapsโ€‹

Online maps in OsmAnd are composed of raster data, which consists of pixels (also referred to as grid cells) - essentially a set of small images known as tiles. Unlike vector maps, which represent data like roads, points, and polygons using binary information, raster map tiles are arranged in a grid and can appear pixelated at high zoom levels because each pixel has a fixed value or class.

Comparison to default vector mapsโ€‹

Advantages:

  • Since raster maps are pre-rendered, they load faster, eliminating the need for the device to process and render data in real-time.
  • Raster maps can be loaded dynamically while browsing.
  • You can create an offline cache and download only missing tiles as needed.
  • You can use an unlimited number of external web sources for raster maps, making it flexible for different map types, like satellite views or specialized maps.
  • Raster data, such as traffic information, can be updated regularly after expiration (e.g., every 20-30 minutes, depending on the configuration).

Disadvantages:

  • Raster maps take up significantly more space than vector maps. For example, a city map might be 15 MB as a vector map, but increase to 50 MB at zoom level 15, 200 MB at zoom level 16, and up to 800 MB at zoom level 17.
  • You cannot tap specific places or objects on raster maps to get more information.
  • Raster maps cannot be styled or modified to exclude specific objects.
  • Zooming in too far can cause the image to appear pixelated, especially if high-resolution tiles are unavailable.
  • Itโ€™s not possible to rotate the map without rotating the text, which can make reading labels difficult.

How to Use Raster Mapsโ€‹

  1. Enable plugin.
    • For iOS, this feature works by default.
    • For Android, to use raster maps in OsmAnd you need to enable Online maps plugin. Follow these steps: Menu โ†’ Plugins โ†’ Online maps โ†’ โ‹ฎ โ†’ Enable
  2. Change layer parameters. To improve the visibility and mix of raster map layers, you can adjust the layer transparency using the screen slider. Additionally, you can modify the vector map style by hiding polygons, making the underlay layers more visible. This is especially useful when viewing satellite imagery.

Select Raster Mapsโ€‹

Show maps

In OsmAnd, raster maps can serve as an additional map source alongside the default vector maps, which are optimized for offline use.

You have the flexibility to add one or two online tile layers to complement your base map. This allows you to view up to three map layers simultaneously on your screen. For instance, you can have OsmAnd's offline vector map as the base, overlay it with a satellite view, and place a bike path map as the underlay for added detail.

You can also adjust the transparency of the base map to blend it with your layers. If needed, you can enable a transparency slider on the main screen for quick adjustments.

Mainโ€‹

Menu โ†’ Configure map โ†’ Map sourceโ€ฆ

Show maps

You can choose a map style from the list or add your own.

Overlay Layerโ€‹

Menu โ†’ Configure map โ†’ Overlay mapโ€ฆ

Configure underlay / overlay Android

  1. Switch on/off the Underlay map.
  2. Overlay transparency (Android)/ Transparency of the Overlay map (iOS).
  3. Show transparency slider (Android) / Show slider on the map (iOS). Quick access to the transparency setting.
  4. Overlay map source (Android) / Available layers (iOS). You can choose a tile map to install or update.
  5. Show map symbols - such as text, road signs, and others.
  6. Add online source (iOS).
  7. Import from documents (iOS).

Underlay Layerโ€‹

Menu โ†’ Configure map โ†’ Underlay mapโ€ฆ

Configure underlay / overlay Android

  1. Switch on/off the Underlay map.
  2. Base map transparency.
  3. Show transparency slider (Android) / Show slider on the map (iOS). Quick access to the transparency setting.
  4. Underlay map source (Android) / Available layers (iOS). You can choose a tile map to install or update.
  5. Show/Hide polygons.
  6. Add online source (iOS).
  7. Import from documents (iOS).

Hillshade / Slopeโ€‹

Terrain layers

Hillshade and Slope are offline raster maps that show terrain relief. They are displayed as a special map layer, a second overlay on the base map. The maps contain additional elevation information to help you more accurately understand the slope and shadows of the landscape. Hillshade and Slope information is based on data from a single source, the Global planet file, and is divided into regions.

You don't need to switch between Hillshade and Slope layers, as they are merged automatically. You can select only one of these layers to display on the map, but you also have the option to combine them both as an underlay or overlay on other layers for a more visual representation of the terrain.

To get started with Hillshade and Slope you need to:

  1. Purchase the Topography plugin:
  2. Enable the Topography plugin:
    Menu โ†’ Plugins โ†’ ๏ธ™ โ†’ Enable
  3. Select your required region, and download Terrain map (3D).
  4. The download process may take some time, depending on the size of the selected region and the speed of your Internet connection.

Hillshade and 3D Reliefโ€‹

Hillshade3D Relief
Terrain layersTerrain layers

The difference of relief display on the map when applying these settings is described in the Topography article in the corresponding section Hillshade and 3D Relief.

Configure Display Optionsโ€‹

Android Menu โ†’ Configure map โ†’ Terrain

Terrain layers

You can customize the zoom level to display and the transparency for Hillshade and Slope. You can read more in the Topography article.

3D Reliefโ€‹

note

3D Relief is an OsmAnd Pro paid feature

.

Terrain layers

The 3D Relief feature is a mapping technology that allows the visualization of terrain on a map using three-dimensional models. This feature adds elevation information to a normal two-dimensional map, which creates a 3D and depth effect and allows you to better visualize the terrain.

To start using 3D Relief:
You need to purchase OsmAnd Pro purchase plan, enable the Topography plugin, and switch on the 3D Relief item in Menu โ†’ Configure map.

How the 3D Relief feature works:
1. To create a 3D relief, OsmAnd receives information about the terrain elevation.
2. Based on the elevation data, a 3D model is created to display mountains, hills, valleys, and other terrain elements on the map.
3. OsmAnd then displays these three-dimensional models on a flat map. The map can be zoomed in, zoomed out, and rotated to view the terrain from different angles and perspectives.
4. The display of contour lines on the map does not depend on whether the map source is online or offline.

Prepare/Copy Raster Maps to Deviceโ€‹

There are multiple ways how to add a new raster map, copy it from another device, prepare it on a PC, and pre-download tiles to be used offline. For example, you can create your map package on a PC by using special software such as MOBAC, OsmAndMapCreator, etc. Typically raster maps are distributed as files with .sqlitedb extension.

Here are the main methods how for adding a new raster map source which is not defined in OsmAnd yet:

  • Open ready to use .sqlitedb file with OsmAnd.
  • Import package with prepared online maps from another OsmAnd application as a special osf package via Import / export functionality.
  • Create a new online map source on a mobile device itself.
  • Prepare a magic URL with online map source parameters and open it with OsmAnd.

Add New Online Raster Map Sourceโ€‹

Menu โ†’ Configure map โ†’ Map sourceโ€ฆ โ†’ Add

Add online source

To create a raster map source you need to know the URL of a tile, which is a specific URL that distributes map tiles in the Mercator Projection. For example, a tile URL might look like this: https://tile.osmand.net/hd/6/55/25.png, where tile.osmand.net/hd/ is the base URL.

Here are the key parameters to configure when setting up a new online map source:

ParameterDescription
NameProvide a name for the new online map source.
URLEnter or paste the URL for the online tile source. Make sure it follows the tile URL format.
Zoom levelsThis parameter affects how the map is displayed.
  • As a map type, the map will be limited to the selected zoom levels.
  • As an overlay/underlay, the map will appear at the selected zoom levels, with upscaling or downscaling applied outside those levels.
Expire timeSet the duration (in minutes) after which cached tiles will refresh. You can leave this field blank if you donโ€™t want tiles to reload automatically.
  • 1 day = 1440 minutes
  • 1 week = 10,080 minutes
  • 30 days = 43,200 minutes
Mercator ProjectionChoose between Pseudo-Mercator projection and Elliptic Mercator projection, depending on the source.
Source format / Storage formatSelect how tiles should be stored: either in an SQLiteDB file or as one image file per tile.

Magic URL to Install Map Sourceโ€‹

Online maps can be added with a special link to the OsmAnd Raster map list. Click on this link and choose OsmAnd for opening:

http://osmand.net/add-tile-source?name=TEST&min_zoom=9&max_zoom=15&url_template=https://a.tile.opentopomap.org/{0}/{1}/{2}.png

Parameter of linkExample
[Constant part]http://osmand.net/add-tile-source
[Separators]? &
[Name]name=TEST
[URL]url_template=https://a.tile.opentopomap.org/{0}/{1}/{2}.png
[Zoom levels]min_zoom=9 / max_zoom=15

You find an added Online map in the list of the Main / Underlay / Overlay layer menu.

Manage Raster Mapsโ€‹

Raster maps can take up a significant amount of disk space, so you might need to regularly check it. For large datasets, it's recommended to use SQLite raster source cause it will store all tiles in 1 large file (SQLite database).

To change tile format, you can choose Storage format in the edit menu of online maps:

  • Android: Menu โ†’ Maps & Resources โ†’ Local โ†’ Online and cached tile maps โ†’ choose online maps โ†’
    โ‹ฎ โ†’ Edit โ†’ Storage format โ†’ SQLiteDB file / One image file per tile
  • iOS: Menu โ†’ Maps & Resources โ†’ Local โ†’ Online raster maps โ†’ i โ†’ Edit โ†’ Source format โ†’ SQLiteDB file / One image file per tile

Clear Raster Map Cacheโ€‹

Online sources list

Tiles are stored in the cache when using Online raster maps as a Main / Overlay / Underlay layer. You can see the size of your SQ Lite file under your Online map name in the list. Sometimes regular cleansing is required to speed up the display of the tiles or to update the data.

To clear the map tile cache, you need to do the following:

  • Android: Menu โ†’ Maps & Resources โ†’ Local โ†’ Online and cached tile maps โ†’ choose online maps โ†’
    โ‹ฎ โ†’ Clear all tiles
  • iOS: Menu โ†’ Maps & Resources โ†’ Local โ†’ Online raster maps โ†’ i โ†’ Clear cache

Download / Update Tilesโ€‹

If you want to access raster maps offline, you may need to preload tiles. This can be done on your mobile device, but be aware that some services may block large packet downloads. You can also use the same feature to update already downloaded tiles for selected areas, otherwise, OsmAnd will continue to display tiles that are already stored in the cache.

For the maps to automatically update the tiles after a while, you can set an Expiry time, then OsmAnd will reload the tiles as soon as they are displayed.

raster-mapsraster-mapsraster-mapsraster-maps
  • To download or update raster tiles, you need to select the source of the online map as the Main map source. You can also select online tiles separately for the Overlay map or for the Underlay.

  • For the Android version of the OsmAnd app, you need to select an area according to the screen size of your device and make a long tap on the map. Then select Actions in the map context menu and the Download map or Update map option. On the Download Map screen, make changes to the necessary settings and tap Download.

  • In the iOS version of the OsmAnd app, you need to long tap the map, then select Actions and the Download map or Update map option from the map context menu. On the Download Map screen, you can select the required area and modify the necessary settings. After you set all the parameters, you can see the number of tiles and the download size.

Change Raster Map Parametersโ€‹

Menu โ†’ Maps & Resources โ†’ Local โ†’ Online and cached tile maps โ†’ choose online maps โ†’ โ‹ฎ โ†’ Edit

Raster maps can be used as they already exist if the tiles are already mapped. If the raster maps are provided online, there is always a base URL that needs to be configured. There are a few more basic parameters that can be changed for raster maps, you can read about that in this section of the article. More complex parameters are encoded in the internal components of the SQ Lite format.

This article was last updated in October 2024