updateMapbox = {
let fc = {
type: "FeatureCollection",
features: datageo
};
if (map._loaded) {
if (!map.getSource("stories")) {
map.addSource("stories", {
type: "geojson",
data: fc
});
} else {
map.getSource("stories").setData(fc);
}
if (map.getLayer(hexbinLayer.id)) {
map.removeLayer(hexbinLayer.id);
}
map.addLayer(hexbinLayer);
return true;
}
return false;
}