mapbox-gl-datascope
Scope your vector tile data in Mapbox GL JS.
Last updated 5 years ago by anandthakker .
Original npm · Tarball · package.json
$ cnpm install mapbox-gl-datascope 
SYNC missed versions from official npm registry.

js-standard-style

Scope your vector tile data.

Install

npm install mapbox-gl-datascope

Usage

mapboxgl.datascope(map, {
  layers: layers,
  properties: { 'road_density': 'Road Density (km/km2)' },
  popup: new mapboxgl.Popup({ closeButton: false }).addTo(map)
})

See also example.html.

API

datascope

Scope your data

Parameters

  • map Map Mapbox GL map instance
  • options object
    • options.layers Array.<string> List of layers to query for data.
    • options.properties object Object mapping feature property keys to { name, format } where format is an optional format function for the property value. Only these properties will be shown.
    • options.summaries object= Object mapping property keys to aggregation function name from geojson-polygon-aggregate or 'reducer' function (accumulator, clippedFeature) -> accumulator
    • options.popup Popup= A mapbox-gl-js Popup control; if supplied, the popup will be populated with the rendered property data.
    • options.event string= Mouse event to use (mousemove, click) (optional, default 'mousemove')
    • options.radius number= Feature query radius (optional, default 0)
    • options.filter Array= Optional feature filter.

Returns DOMNode DOM node that is kept updated with rendered property data.

Current Tags

  • 1.2.1                                ...           latest (5 years ago)

4 Versions

  • 1.2.1                                ...           5 years ago
  • 1.2.0                                ...           5 years ago
  • 1.1.0 [deprecated]           ...           5 years ago
  • 1.0.0 [deprecated]           ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 2
Dependencies (5)
Dev Dependencies (12)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |