map::slippy::fetcher(n)

πŸ“¦
version 2.0 Β· 2 versions
, in fedora 43, fedora 44, nixos 26.05, nixpkgs unstable

πŸ’– 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 fetcher fetcherName and 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.

  1. the string set, the tile, and the image.
  2. 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 πŸ“š

  1. http://wiki.openstreetmap.org/wiki/Main_Page

πŸŽ€ 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