Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make TileProvider an interface (or: maybe this is just an FYI rather than a PR...) #33

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

thisisaaronland
Copy link

I recently had to fork go-staticmaps and change the default TileProvider struct in to an interface (and update things accordingly) in order to it with so-called "rasterzen" tiles:

https://github.com/whosonfirst/go-rasterzen

These are (Nextzen) vector tiles by default that get rendered in SVG/PNG tiles in code so the default model of fetching a URL (in tile_fetcher.go) and decoding the bytes doesn't work for rasterzen tiles. It's also meant moving the actual HTTP request in the tile provider which is maybe messier than you'd like:

https://github.com/whosonfirst/go-whosonfirst-staticmaps/blob/rasterzen/provider/rasterzen.go

Anyway, I just wanted to mention that there was a need to do this. If there's a different/better way to accomplish the same thing then I am happy enough to change my code.

The end result is this:

https://github.com/whosonfirst/go-whosonfirst-staticmaps/tree/rasterzen#wof-staticmap

Also, thanks for writing go-staticmaps in the first place :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant