terracotta icon indicating copy to clipboard operation
terracotta copied to clipboard

Write a client library

Open dionhaefner opened this issue 6 years ago • 3 comments

Terracotta would only be a complete A-Z solution if we also provided a client library in Javascript to do some of the heavier lifting.

I don't see this happen anytime soon, since we would need someone who is way way better at Javascript than me.

dionhaefner avatar Oct 26 '18 13:10 dionhaefner

Perhaps just write some docs for use with an existing solution e.g. https://terria.io/

robmarkcole avatar Dec 13 '18 13:12 robmarkcole

Great point, thanks!

dionhaefner avatar Dec 13 '18 13:12 dionhaefner

For the record, it's really easy to do on something like geojson.io:

  • Click Meta -> Add Map Layer
  • Enter URL to dataset in the form http://localhost:5000/singleband/key1/.../keyN/{z}/{x}/{y}.png (with Terracotta serving on localhost:5000 in this case; you can get the keys from http://localhost:5000/datasets)

Works similarly on everything that uses Leaflet.JS, via map.addLayer.

I didn't know terria.io, but it looks really interesting, so thanks for the pointer.

dionhaefner avatar Dec 14 '18 09:12 dionhaefner