Skip to content

Instantly share code, notes, and snippets.

@nicdford
Last active June 7, 2022 18:50
Show Gist options
  • Save nicdford/f6d004bd385dd91c07f18d58f7ccb645 to your computer and use it in GitHub Desktop.
Save nicdford/f6d004bd385dd91c07f18d58f7ccb645 to your computer and use it in GitHub Desktop.
Quick snippet for adding turf features as mapbox layers on a map for testing
map.addSource('debugging', {
type: 'geojson',
data: intersectFeature,
})
map.addLayer({
id: 'debugging',
type: 'fill',
source: 'debugging',
layout: {},
paint: {
'fill-color': 'red',
'fill-opacity': 0.4,
'fill-outline-color': 'green',
},
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment