map::slippy::fetcher(n)
π map::slippy::fetcher(n) β Mapping utilities π
okay bestie, sit DOWN, because this is the glow-up page for map::slippy::fetcher, living in the Mapping utilities section of the manual (manual name: map::slippy::fetcher(n), iykyk). it's the Tcl package that talks to HTTP servers handing out tiles for slippy-based maps. she's giving infrastructure. she's giving backstage pass. let's go π¦
β¨ NAME β¨
map::slippy::fetcher β accessing a server providing tiles for slippy-based maps.
like, literally the whole point is getting tiles off a server. no cap. π
β¨ SYNOPSIS β¨
package require Tcl 8.6 9
package require Tk 8.6
package require map::slippy
package require map::slippy::fetcher ?0.7?
::map::slippy::fetcher fetcherName levels url
fetcherName levels
fetcherName tileheight
fetcherName tilewidth
fetcherName get tile donecmd
β¨ DESCRIPTION β¨
this package hands you a class for accessing http servers that provide tiles for slippy-based maps. that's the whole vibe. server β tiles β map. periodt. πΊοΈ
BEWARE, Attention: Version 0.7 is NOT backward compatible with version 0.5 and earlier. and why?? because this package's internals got switched over to using version 0.8 of map::slippy. so if you were on 0.5, bestie, you are not just upgrading, you are moving. π
πΈ API πΈ
::map::slippy::fetcher fetcherName levels urlβ creates the fetcherfetcherNameand configures it with two things: 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. that's it, that's the return value, she gives herself back.
π METHODS π
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 character method of the fetcher π₯ β it retrieves the image for the specified tile.
the tile identifier is a list containing three elements, in this exact order: the zoom level, row, and column number of the tile.
the command refix donecmd will be invoked when the fetcher either knows the image for the tile, or knows that no image will be forthcoming. it gets 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. so likeβ¦ either "here's ur pic bestie β¨" or "there's literally nothing here, sorry π". both are valid, both are handled.
π REFERENCES π
π KEYWORDS π
http, location, map, server, slippy, tile, url, zoom
and that's the whole page, bestie π«Ά this came to you from tcllib, version 0.7, dated right there in the footer next to map::slippy::fetcher(n). slay, go fetch some tiles, drink water, ily πβ¨ππ
π¦ where this page comes from
- fedora 43: tcllib 2.0-3.fc43 Β· TCL
- fedora 44: tcllib 2.0-4.fc44 Β· TCL
- nixos 26.05: tcllib 2.0
- nixpkgs unstable: tcllib 2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms