Skip to content

JavaScript block files for Mapbox/GeoJSON manipulation usecases.

License

Notifications You must be signed in to change notification settings

dglux/dglux-mapbox-scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DGLux Mapbox Scripts

These are to be used with the DGLux JavaScript block. They don't belong in the core DGLux experience, but they fill usecases that others may be looking for.

If you have any scripts you'd like to share with the DGLux community, please follow the preset format and submit a pull request!

License information is in LICENSE.md.

polygon-circles

Script that transforms a DGLux table into GeoJSON with points represented as polygonal circles. Useful for needing to use extrude features with points, or for making circles of a fixed measurement (feet, miles, etc).

Inputs:

  • table: tabledata
  • latField: string
  • lngField: string
  • radiusField?: string
  • steps: number, default is 64
  • radius: number, default is 0.2
  • units: string, can be [miles, feet, kilometers, degrees, radians], default is kilometers
  • addProperties: bool

Outputs:

  • geojson: string

feature-area-sort

Script that sorts a GeoJSON FeatureCollection's features by relative area.

Inputs:

  • inputGeoJson: string
  • selectionProperty: string

Outputs:

  • outputGeoJson: string

About

JavaScript block files for Mapbox/GeoJSON manipulation usecases.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published