Skip to main content

Tiles Directory Format - .metainfo

The Metainfo format used in OsmAnd to store the tile layers preferences. In OsmAnd we add a number of tables extending the format:

FieldSpec and Purpose
[url\_template]String. URL template to download tiles with:
zoom: {0} or {$z}
x: {1} or {$x} , y: {2} or {$y}.
Watch the order of x / y, it could be different in the url
server name - {rnd} taken from [randoms]
some servers expects quadkey - {q} that should be used instead of XYZ
{bbox} - bounding box, in degrees, with format minLongitude,minLatitude,maxLongitude,maxLatitude, such as -111.02783203,35.01200204,-111.00585938,35.02999637
examples:
http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{$z}/{$y}/{$x}
http://a{rnd}.ortho.tiles.virtualearth.net/tiles/a{q}.jpeg?g=700
https://encdirect.noaa.gov/arcgis/services/encdirect/enc_harbour/MapServer/WmsServer?bbox={bbox}&format=image/png&service=WMS&version=1.1.1&request=GetMap&srs=EPSG:4326&width=256&height=256&layers=0,6,11&map=&styles=
[randoms]String. The names of the mirrors of server. Comma-separated. One of these values will randomly replace the placeholder {rdn} in "url" field.
[minzoom]Integer. Min zoom level. In regular format (OSM, Google maps).
[maxzoom]Integer. Max zoom level. In regular format (OSM, Google maps).
[ellipsoid]Bool "true" or "false". True for Elliptic Mercator (Yandex tiles). False for regular Spheric Web Mercator (OSM, Google maps)
[inverted\_y]Bool "true" or "false". True for inverted Y tile number (Nakarte.me tiles).
[tile\_size]Integer 256 or 512. Side size of downloading tile in px.
[img\_density]Integer. Tile image density.
[avg\_img\_size]Integer.Average tile image size.
[expiration\_time\_minutes]Integer. Specifies if tiles shall expire after the given number of minutes. They would still be displayed, but also re-downloaded.

The class supporting this tile source is at or near View.