[ Main Table Of Contents | Table Of Contents | Keyword Index | Categories | Modules | Applications ]
map::slippy::fetcher(n) 0.4 tcllib "Mapping utilities"
map::slippy::fetcher - Accessing a server providing tiles for slippy-based maps
This package provides a class for accessing http servers providing tiles for slippy-based maps.
- ::map::slippy::fetcher fetcherName levels url
Creates the fetcher fetcherName and configures it with the number of zoom levels supported by the tile server, and the url it is listening on for tile requests.
The result of the command is fetcherName.
- fetcherName levels
This method returns the number of zoom levels supported by the fetcher object, and the tile server it is accessing.
- fetcherName tileheight
This method returns the height of tiles served, in pixels.
- fetcherName tilewidth
This method returns the width of tiles served, in pixels.
- fetcherName get tile donecmd
This is the main method of the fetcher, retrieving the image for the specified tile. The tile identifier is a list containing three elements, the zoom level, row, and column number of the tile, in this order.
The command refix donecmd will be invoked when the fetcher either knows the image for the tile or that no image will forthcoming. It will be invoked with either 2 or 3 arguments, i.e.
The string set, the tile, and the image.
The string unset, and the tile.
These two possibilities are used to either signal the image for the tile, or that the tile has no image defined for it.