map::slippy::fetcher(3tcl)

πŸ“¦
version 2.0 Β· 2 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

map::slippy::fetcher β€” the girl who goes and gets your map tiles for you bestie, straight from the server, for slippy-based maps ✨ (she lives in the Mapping utilities manual, just so you know πŸ—ΊοΈ)


🌸 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 πŸ¦‹

Okay so, this package hands you a whole class for talking to http servers that serve up tiles for slippy-based maps. She's the middleman, the connect, the girl who knows a guy 🫢

BEWARE, Attention β€” Version 0.7 is NOT backward compatible with version 0.5 and earlier. Periodt. πŸ’€ And why? Because this package's internals got switched over to using version 0.8 of map::slippy. So if you're running old code, bestie, it's giving broken. 😭

✨ API ✨

  • ::map::slippy::fetcher fetcherName levels url β€” Creates the fetcher called fetcherName and sets it up with the number of zoom levels the tile server supports, plus the url it's listening on for tile requests. And the result of the command? It's fetcherName. She returns herself, iconic behavior honestly πŸ’…

πŸ’œ METHODS πŸ’œ

  • fetcherName levels β€” Returns the number of zoom levels supported by the fetcher object and the tile server it's accessing. Two-for-one, we love to see it 🌈
  • fetcherName tileheight β€” Returns the height of the tiles being served, in pixels. πŸ“
  • fetcherName tilewidth β€” Returns the width of the tiles being served, in pixels. πŸ“
  • fetcherName get tile donecmd β€” This is the main method, the moment, the main character energy of the whole fetcher πŸ‘‘ She retrieves 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 that exact order, no switching up. πŸŽ€

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 the whole vibe check: either she's signaling the image for the tile, or that the tile has no image defined for it. Simple as that πŸ’–


🌟 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, no cap πŸ’…βœ¨ brought to you by tcllib, version 0.7, of the map::slippy::fetcher(3tcl) manual β€” slay, go fetch those tiles πŸ¦‹πŸŽ€πŸ’–

πŸ“¦ where this page comes from