8000 Map Definition · ffalt/tileit Wiki · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Mar 9, 2023. It is now read-only.

Map Definition

ffalt edited this page Feb 22, 2015 · 12 revisions

Map definitions will be loaded from the configpath eg. /maps/map-enabled/ (maybe linked there from /maps/map-available)

see /maps/map-examples/ for examples

json file in "configpath"

You can specify one or more maps

	{
		"[mapname]": {                    //mandatory, mapname is used in tile-url
			"[map-option]": ...
			"sources": [
	    			{"plug": "[name of plug 1]",  map related options for the source },
	    			{"plug": "[name of plug 2]",  map related options for the source }
	    	]
		},
		"[other_mapname]": {
			"[map-option1]": ...
			"[map-option2]": ...
			"sources": [
	    			{"plug": "[name of plug]",  map related options for the source }
	    	]
		}
	}

js file in "configpath"

Or build the map definition in javascript

var maps = {};

function wmsDemo(name, path, minz, maxz) {
	maps[name] = {
		"minz": minz || 11,
		"maxz": maxz || 18,
		"sources": [
			{
				"plug": "wms",
				"url": "http://fbinter.stadt-berlin.de/fb/wms/senstadt/" + path + "?",
				"layers": "0",
				"crs": "EPSG:4326"
			}
		]
	};
}


maps[] = wmsDemo("ber_luft_2011", "k_luftbild2011_20");
maps[] = wmsDemo("ber_luft_2009", "k_luftbild2009", 11, 14);

exports.maps = maps;

General Map Settings

{
	"minz": 0,                  //optional, default: "0"
	"maxz": 18,                 //optional, default: "18"
	"format": "png",            //optional, default: "png"
	"bounds": [ -180, -85.05112877980659, 180, 85.05112877980659 ], //optional, default see left values
	"tms": false,  //optional: default: false, swap y for tms-like files http://en.wikipedia.org/wiki/Tile_Map_Service
	"sources": [...]
}

Map Source Settings

You can specify one or more map sources (and storage) Please note: The order is important.

"sources": [
	{"plug": "memcached", ...},
	{"plug": "file", ...},
	{"plug": "mapnik", ...}
]

In this example, tileit would

look in memcached for the tile,
-available: serve tile
-not available:

    look on the disk
    -available: save to memcached, serve tile
    -not available:

        render with mapnik
        -available: save to memcached and disk, serve tile
        -not available: give up

look for source specific settings in File, Mapnik, Memcached, Tiles, Tirex, WMS Composite

Clone this wiki locally
0