I'm trying to make a map using Mapbox GL that is basically identical to this example: https://www.mapbox.com/mapbox-gl-js/example/filter-markers/.
The main difference that source I'm using is a vector tileset (that I've uploaded to mapbox.com) with a specific source-layer that needs to be split up.
The problem is the first line of this part:
markers.features.forEach(function(feature) {
var symbol = feature.properties['marker-symbol'];
var layerID = 'poi-' + symbol;
if (!map.getLayer(layerID)) {
map.addLayer({
Since my data isn’t stored in a variable what do I put in place of markers.features
?
Do I have to create a variable that references my source, source-layer, and map ID and use that? How would that be structured?
Apologies if this is a total noob question, I tend to over think these things.