Knowledgebase: Maverick
Setting up custom map servers
Posted by Oleg Smirnov on 19 February 2012 08:21 PM

In Maverick 2.x after adding a custom folder to maverick/tiles directory, you can also specify a map server.

Location:

/maverick/tiles/your custom map/mapserver.txt

File format:

server_url|extension|max_zoom|projection

Example:

http://tile.openstreetmap.org/{z}/{x}/{y}.png|png|18|1

Server URL:

Complete url of map tile server. 

{z} - Zoom

{x},{y} - Tile number

{stripe} - Cycle server number (1..4)

{server} - Cycle server char (a,b..c)

{quadkey} - Quadkey numbering system

{ln} - Map language (en,it,fr...)

Extension

Use png or jpg.

Max zoom

Maximum zoom level of this map.

Projection

Use 1 for Spheroid (most maps) and 2 for Ellipsoid projection.

 

How to get URL of a map server 

Disclaimer:  Persisting map tiles locally breaks the terms of service for many popular basemap providers like Google. If you start storing tiles offline without permission, then you do so at your own risk.

In Google Chrome, right click on a map you want to add to Maverick and select Inspect Element from menu. 

Select Resources tab and find a map tiles:

Inspect Element

Please notice changing number after 'otile' part, you need to replace it with {stripe}. The last part of the url is zoom, x and y parameters. The configuration for MapQuest map would be like this:

http://otile{stripe}.mqcdn.com/tiles/1.0.0/osm/{z}/{x}/{y}.png,png,18,1

Now just put this line to /maverick/tiles/your custom map/mapserver.txt


Comments (0)