mapbox-query-features
TypeScript icon, indicating that this package has built-in type declarations

1.0.7 • Public • Published

mapbox-query-features

mapbox queryRenderedFeatures alternative for server use (node.js)

Example

import { queryFeatures } from 'mapbox-query-features'

const result: FeatureCollection = await queryFeatures(
    //bounding box from which we take the features 
    [30.255939960479733, 60.01106495448562, 30.272912979125973, 60.02215300039876],
    {
      zoom: 14,
      layers: ['building'],
      mapboxToken: "TOKEN"
    }
  )
/*
{
  type: 'FeatureCollection',
  features: [
    { type: 'Feature', geometry: [Object], properties: [Object] },
    ... more
   ]
}
*/
result

Installation

npm i --save mapbox-query-features

Package Sidebar

Install

npm i mapbox-query-features

Weekly Downloads

0

Version

1.0.7

License

ISC

Unpacked Size

37.3 kB

Total Files

31

Last publish

Collaborators

  • jeckyhit