3.1.0 • Published 6 years ago

@mapbox/whoots-js v3.1.0

Weekly downloads
373,262
License
ISC
Repository
github
Last release
6 years ago

npm version Build Status Coverage Status

whoots-js

Request tiles from WMS servers that support EPSG:3857.

This project is a JavaScript port of https://github.com/timwaters/whoots by Tim Waters.

What is it?

Given a z/x/y tile coordinate like 19/154308/197167, whoots-js can request imagery from an EPSG:3857 supporting WMS server like this:

http://geodata.state.nj.us/imagerywms/Natural2015?
  bbox=-8242663.382160267,4966572.349857613,-8242586.945131982,4966648.786885899
  &format=image/png&service=WMS&version=1.1.1&request=GetMap&srs=EPSG:3857
  &width=256&height=256&layers=Natural2015

Usage

var WhooTS = require('@mapbox/whoots-js');

// Get an image url for a given tile coordinate
var baseUrl = 'http://geodata.state.nj.us/imagerywms/Natural2015';
var layer = 'Natural2015';
var url = WhooTS.getURL(baseUrl, layer, 154308, 197167, 19);

Server

This project includes a sample redirecting wms proxy server in server.js.

npm run server will start a local server on port 8080 that redirects tile requests.

Valid tile requests look like:

http://localhost:8080/tms/{z}/{x}/{y}/{layer}/{endpoint}
http://localhost:8080/tms/19/154308/197167/Natural2015/http://geodata.state.nj.us/imagerywms/Natural2015

Documentation

Complete API documentation is here: http://mapbox.github.io/whoots-js/

@simosol/mapbox-gl-js-offlinebst-map-gl@mapcreator/mapbox-gl@everything-registry/sub-chunk-579@langge-data/mapbox-glp-mapbox-glpbf-basic-renderpetr-maplibre-gl@carto/mapbox-gl@cczbby/mapbox-gl@cczbby/maplibre-gl@dfw810/mapbox-gl@curio/mapbox-glcheaper-mapbox-gl-with-referrer-policy@tssu/mapbox-gl@appearhere/mapbox-gl@ark-org/map@bewithjonam/mapbox-gl@autoxing/mapbox-gl@bcherny/mapbox-gl@geomatico/mapbox-gl@geops/maplibre-glanthonyhull-mapbox-gl@shitao1988/swsk-mapbox-glxtal-glxyd-mapbox-glanother-mapmagic-glark-mapvietmap-glvietmaps-gl@xbcx/mapbox-glvnmap@goongmaps/goong-js@globalfishingwatch/mapbox-gl@globalfishingwatch/maplibre-gl@mapcat/mapbox-gl@mapgis/mapbox-gl@mapeo/map-server@maps-gl/maps-glkt-maplibre-glkarn-mapkarn-mapbox-glmapbox-gl-js-with-shapesmapbox-gl-kyemapbox-gl-mapmagicmapbox-gl-mbtilesmapbox-gl-mdorymapbox-gl-testmapbox-gl-testingmapbox-gl-tultmapbox-gl-htmapsi-glmapbox-glmapbox-gl--custom-stretchmapbox-gl-ahtmapbox-gl-custom-layermapbox-gl-encryptedmapbox-gl-epsg4490mapbox-with-shapesmaplibre-gl-reduce-functionalitiesmapmagic-glmaplibre-glmaplibre-gl-ashrif-mapbox-gltrackasia-gl@sakitam-gis/mapbox-glrpd-mapbox-glthinknetmaps@felix5/mapbox-webgl2@emuanalytics/maplibre-glswsk-mapboxglvicapow-mapbox-glvizzuality-mapbox-gl@yongju/maplibre-gl@3drobotics/mapbox-gl@webdeb/mapbox-gl@windycom/maplibre-glx-mapbox-gl@krisdages/mapbox-gl@kantas/vector-jsdingi-gl@ogix/mapbox-gl@onthegomap/mapbox-glf-mapbox-gl@inelo/maplibre-gl@infinitebrahmanuniverse/nolb-_map@jingsam/mapbox-gldmap-gl@hansdo/maplibre-glcomments-map@porsager/mapbox-gl@pirxpilot/mapbox-gl@plotly/mapbox-gl
3.1.0

6 years ago

3.0.0

7 years ago