Tiles@home/Layers

From OpenStreetMap Wiki
Jump to navigation Jump to search

Discussion on what is being done to serve multiple layers of tiles, with different map styles on each layer

Current status

Layers

Layer Upload as Tile URL Status Example
Main map tile_z_x_y.png tile.php/z/x/y.png Active Default map
Maplint maplint_z_x_y.png maplint.php/z/x/y.png Uploads started, official tiles@home support from current client "Essen" Karlsruhe in Maplint
Relief maps relief_z_x_y.png relief.php/z/x/y.png Discusion about Relief maps Maps-for-free.com



Original design questions

  1. Use same server software for all layers
  2. Install server software on multiple machines, each hosting one layer
  3. Install copies of server software in multiple directories on dev, using a different database and filesystem for each

System 1 is the only one currently implemented.


Website changes

Identifying layer on upload

Identified by filename of images within the uploaded zip file, previously tile_z_x_y.png was changed to layer_z_x_y.png where "tile" is still a valid layer name for backwards-compatibility.

Storage

Directory structure Tiles/tiles/zz/xxx/xxx/yyy/yyy.png - was changed to Tiles/layer/zz/xxx/xxx/yyy/yyy.png. Filenames are done in just one library file which was updated to take a layer parameter and default to "tile".

mod_rewrite rules have been added for 2 new layers, unfortunately these are cut/pasted for each layer at the moment, needs to be done more elegantly.

Database

Database structure already supports this information, no changes needed

Are there any partitioning effects available in MySQL which could benefit from knowing that each layer is likely to be accessed separately?

Alternatively, since most database access is from uploads, which will be multiple layers in a single area, is partitioning by layer undesirable?

Browsing tiles, URLs

URL previously Tile/tile.php/z/x/y.png - changed to Tile/layer.php/z/x/y.png for layers in (tile,cycle,maplint)

Query URLs

Meta-info URLs will work with the new layers - just add _exists or _details to the end of any tile URL


Client changes

TODO - can the proposers update this section with intended changes to the client

maplint rendering rules

See wiki page for Maplint development