Raster Maps (Online / Offline)
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.
You can also change the main source of maps from vector maps to online tiles.
Raster Mapsโ
Online maps in OsmAnd are raster data. Raster data is made up of pixels (also referred to as grid cells) - set of small images (tiles). In contrast to vector maps which consists of binary data like roads, points, polygons. Raster map tiles are usually regularly-spaced and square. They often look pixelated because each pixel has its own value or class.
Comparison to default vector maps.
Advantages:
- Display time is reasonably faster because maps are not rendered by the device.
- Raster maps could be loaded on the fly during map browse.
- Possibility to preload data partially i.e. create offline cache and be able to download missing tiles on the fly.
- Indefinite variety of external web-sources. Basically, each website with maps could be used as a source data.
- The data could be updated after expiration like traffic tiles are updated every 20-30 minutes (configurable).
Disadvantages:
- Significantly bigger comparing to Vector maps. City example: Vector Map - 15 MB, Online 15th Zoom - 50 MB, 16th - 200 MB, 17th - 800 MB, ...
- Places on raster maps are not clickable.
- Not possible to change map style or exclude certain objects.
- Pixelized on zoom (if no high-density tiles are not available).
- It is not possible to rotate a map with readable text (text will be rotated with the map itself, thus will not be easily readable).
How to use Raster mapsโ
Enable pluginโ
For iOS OsmAnd this feature works by default.
In order to use raster maps in OsmAnd you need to enable Online maps plugin:
Android Menu โ Plugins โ Online maps โ โฎ โ Enable
Change layer parametersโ
In order to mix raster map layers better, you can change layer transparency (by using a screen slider) and also you can change vector map style (hide polygons), so the underlay layers will be more visible, especially useful for satellite imagery.
Select Raster mapsโ
Raster maps can be used as map sources in OsmAnd (vector maps that work offline are enabled by default).
You can add one or two online tiles to the base layer maps, and all three will appear on the screen. For example, you can open OsmAnd's base vector maps offline, then add a satellite view as an overlay, and place a map of bike paths below the base map as an underlay. You can set the transparency of the base map for your layer, and you can choose whether or not to display the transparency slider on the main screen.
- Android
- iOS
Mainโ
You can choose a map style from the list or add your own.
- Android
- iOS
Menu โ Configure map โ Map sourceโฆ
Menu โ Configure map โ Map type
Overlay layerโ
- Android
- iOS
Menu โ Configure map โ Overlay mapโฆ
- Switch on/off the Overlay map.
- Overlay map source - you can choose a tile map to install or update.
- Overlay transparency.
- Show transparency slider - quick access to the setting.
- Show map symbols - such as text, road signs, and others.
Menu โ Configure map โ Overlay / Underlay โ Overlay
- Switch enable/disable the Overlay map.
- Transparency of the Overlay map.
- Show slider on the map - quick access to the transparency setting.
- Available layers - you can choose a tile map to install or update.
- Show map symbols - such as text, road signs, and others.
- Add online source.
- Import from documents.
Underlay layerโ
- Android
- iOS
Menu โ Configure map โ Underlay mapโฆ
- Switch on/off the Underlay map.
- Underlay map source - you can choose a tile map to install or update.
- Base map transparency.
- Show polygons.
- Show transparency slider - quick access to the setting.
Menu โ Configure map โ Overlay / Underlay โ Underlay
- Switch enable/disable the Underlay map.
- Base map transparency.
- Show slider on the map - quick access to the transparency setting.
- Available layers - you can choose a tile map to install or update.
- Hide polygons.
- Add online source.
- Import from documents.
Hillshade / Slopeโ
Hillshade / Slope are raster offline maps that are displayed as a special map layer - Terrain (2nd overlay). These maps are created from 1 source (global planet file) and divided into regions, but it is not needed to switch between maps cause it's been merged automatically. You can exclusively select Hillshade and Terrain layer, though you could be combined if you use as underlay or overlay.
To download and install Hillshade / Slope Maps, you need to purchase / enable Contour lines plugin.
Configure display optionsโ
- Android
- iOS
Android Menu โ Configure map โ Terrain
iOS Menu โ Configure map โ Terrain
Prepare / copy raster maps to deviceโ
There are multiple ways how to add new raster map, copy it from another device, prepare it on PC and predownloaded tiles to be used offline. For example, you can create your own map package on PC by using special software as MOBAC, OsmAndMapCreator and etc. Typically raster maps are distributed as files with .sqlitedb extension.
Here are the main methods how to add new raster map source which is not defined in OsmAnd yet:
- Copy a raster map to a tiles subfolder of base osmand storage (Android).
- 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 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โ
To create a raster map source you need to know the tile URL. This is URL that can distribute tiles in Mercator Projection. Here is a tile example URL https://tile.osmand.net/hd/6/55/25.png, where is the base part https://tile.osmand.net/hd/.
In order to add a new online raster map source go to:
- Android
- iOS
Menu โ Configure map โ Map sourceโฆ โ Add
Menu โ Configure map โ Overlay / Underlay โ Add online source
Parameter | Description |
---|---|
[Name] | Provide name for online source |
[URL] | Enter or copy and paste URL for online source |
[Zoom levels] | This parameters will affect the map display when used as a map type or overlay/underlay. Map type: the map will be limited to the selected zooms. Overlay / Underlay: Zoom levels at which tiles will be visible. Upscale or downscale will occur above or below the set values. |
[Expire time] | Expiration time in minutes. Cached tiles will be reloaded after specified time. Leave this field empty if you do not need to reload tiles for this source. One day is 1440 minutes. One week is 10 080 minutes. 30 days are 43 200 minutes. |
[Mercator Projection] | Pseudo-Mercator projection or Elliptic Mercator projection |
[Source format/Storage format] | SQLiteDB file or One image file per tile |
Click to "Save" button for adding a new online raster map to the list.
Magic URL to install map sourceโ
Online maps can be added with a special link to OsmAnd Raster map list. Click to this link and choose OsmAnd for opening:
Parameter of link | Example |
---|---|
[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 added Online map in the list of Main / Underlay / Overlay layer menu.
Manage raster mapsโ
Raster maps can take 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).
In order to change tile format you can choose Storage format in the edit menu of online maps:
- Android
- iOS
Menu โ Download maps โ Local โ Online and cached tile maps โ choose online maps โ
โฎ โ Edit โ Storage format โ SQLiteDB file / One image file per tile
Menu โ Maps & Resources โ Local โ Online raster maps โ i โ Edit โ Source format โ SQLiteDB file / One image file per tile
Clear raster map cacheโ
Tiles are saved in the cache during usage of Online Raster maps as Main / Overlay / Underlay layer, you can see only the size of your SQ Lite file under name of your Online map in the list. Sometimes a regular cleanup is needed to speedup tiles display or to refresh data.
In order to clear map tiles cache you need to do next:
- Android
- iOS
Menu โ Download maps โ Local โ Online and cached tile maps โ choose online maps โ
โฎ โ Clear all tiles
Menu โ Maps & Resources โ Local โ Online raster maps โ i โ Clear cache
Download / update tilesโ
If you want to access raster maps offline, you might need to predownload tiles. It's possible to do on a mobile device though be aware that some services might block a large batch download. Same feature can be used to update already downloaded tiles for selected areas, otherwise OsmAnd will continue display tiles that are already stored in the cache.
If you want the maps to automatically update the tiles after some time, you can set an expiration time, then OsmAnd will reload the tiles as soon as they are displayed.
- Android
- iOS
First of all, you need to choose your online source as Main Map source, Overlay/Underlay
For Android you need to select the area by the size of your screen device and to do a long click on the map, then Menu โ Actions โ Download map / Update map โ At this screen you need to choose zoom levels โ screen of downloading progress โ Download
First of all, you need to choose your online source as Main Map source.
For iOS you need to do a long tap on the map, then Actions โ Download map / Update map โ At this screen you can select the needed area, choose zoom levels. When you set all parameters you can see a number of tiles and download size. Next, click to Continue โ screen of downloading progress.
Change raster map parametersโ
You can use the raster maps as they are if the tiles are already packaged in maps. 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.
- Android
- iOS
Menu โ Download maps โ Local โ Online and cached tile maps โ choose online maps โ โฎ โ Edit
Menu โ Maps & Resources โ Local โ Online raster maps โ i โ Edit