I'm trying to extend a map built in Mapbox with advanced filtering options (e.g., display data with zoom) with Mapbox GL JS for a web-based application.
The available examples (https://docs.mapbox.com/mapbox-gl-js/example/filter-features-within-map-view/) use imported GeoJSON "ne_10m_airports" data but my data is provided by MySQL database.
My JavaScript skills are limited so I'm having trouble updating the filter code to work with my dataset. Any recommendations or relevant samples of this type of interaction?
Example: http://www.scubacentral.net/map2.html
map.addLayer({
'id': 'airport',
'source': {
'type': 'vector',
'url': 'mapbox://mapbox.04w69w5j'
},
'source-layer': 'ne_10m_airports',
'type': 'symbol',
'layout': {
'icon-image': 'airport-15',
'icon-padding': 0,
'icon-allow-overlap': true
}
});