3.1.0 • Published 7 years ago

@mapbox/whoots-js v3.1.0

Weekly downloads
373,262
License
ISC
Repository
github
Last release
7 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-gltest-map-azsftwrx-mapbox-glswsk-mapboxglthinknetmapsvnmapvizzuality-mapbox-glvicapow-mapbox-glvietmap-glvietmaps-gl@curio/mapbox-glkarn-mapkarn-mapbox-glkt-maplibre-gl@openmapvn/maplibre-gltrackasia-gl@americana/maplibre-gl@appearhere/mapbox-gl@ark-org/map@autoxing/mapbox-gl@alantgeo/mapbox-gl@bcherny/mapbox-gl@bewithjonam/mapbox-gl@carto/mapbox-gl@cczbby/mapbox-gl@cczbby/maplibre-gl@3drobotics/mapbox-gl@0xfa11/maplibre-gl@dfw810/mapbox-glxyd-mapbox-glxtal-gl@felix5/mapbox-webgl2@gvol-org/mapbox-gl@hansdo/maplibre-gl@goongmaps/goong-js@geops/maplibre-gl@geomatico/mapbox-gl@globalfishingwatch/mapbox-gl@globalfishingwatch/maplibre-gl@infinitebrahmanuniverse/nolb-_map@krisdages/mapbox-gl@koordinates/maplibre-gl@maps-gl/maps-gl@mapcat/mapbox-gl@mapgis/mapbox-gl@emuanalytics/maplibre-gl@mapeo/map-server@jingsam/mapbox-gl@inelo/maplibre-gl@kantas/vector-js@ogix/mapbox-gl@rczobor/maplibre-gl@plotly/mapbox-gl@sakitam-gis/mapbox-gl@openmapvn/openmapvn-gl@onthegomap/mapbox-gl@porsager/mapbox-gl@pirxpilot/mapbox-glp-mapbox-glpbf-basic-renderrpd-mapbox-glpetr-maplibre-glrif-mapbox-gllg-mapbox-glmapbox-glmapbox-gl--custom-stretchmapbox-gl-ahtmapbox-gl-custom-layermapbox-gl-testmapbox-gl-testingmapbox-gl-tultmapbox-gl_wstdmapbox-gl-encryptedmapbox-gl-epsg4490mapbox-gl-js-with-shapesmapbox-gl-kyemapglvmapmetrics-glmapmetrics-gl-testmaplibre-gl-reduce-functionalitiesmaplibre-glmaplibre-gl-ashmapbox-gl-mdorymapbox-gl-mapmagicmapbox-gl-mbtilesmapbox-with-shapesmapbox-gl-htmapbox-gl-hxmapmagic-glmapsi-gl@windycom/maplibre-gl@webdeb/mapbox-gl@xbcx/mapbox-gl@tssu/mapbox-gl@tommy2gis/maplibre-gl@vitaly.varyvdin/maplibre-gl
3.1.0

7 years ago

3.0.0

8 years ago