msc: basemap, points colors

v0.5
gtitov 3 years ago
parent 61190bed15
commit ae818080f1

@ -45,23 +45,17 @@ export default {
})); }));
map.value.on('load', () => { map.value.on('load', () => {
map.value.addSource('countries', { map.value.addSource('basemap-source', {
'type': 'vector', 'type': 'raster',
"tiles": [`https://api.mapbox.com/v4/ghermant.aq1p7k29/{z}/{x}/{y}.mvt?access_token=${apiKey}`] 'tiles': [`https://api.mapbox.com/styles/v1/ghermant/cl8vg2r97001m14o4c2qzw9t6/tiles/256/{z}/{x}/{y}@2x?access_token=${apiKey}`]
}); })
map.value.addLayer( map.value.addLayer(
{ {
'id': 'countries-layer', 'id': 'basemap-layer',
'type': 'line', 'type': 'raster',
'source': 'countries', 'source': 'basemap-source',
'source-layer': 'ne_110m_admin_0_countries-cz6wwp', 'paint': {}
'paint': {
"line-color": "blue",
"line-width": 3
},
'filter': ["==", ["get", "NAME"], "Russia"],
"maxzoom": 4
} }
); );
@ -83,11 +77,11 @@ export default {
'circle-color': [ 'circle-color': [
'case', 'case',
['boolean', ['feature-state', 'beenClicked'], false], ['boolean', ['feature-state', 'beenClicked'], false],
'#ffff00', '#fec44f',
'#1a9641' '#d95f0e'
], ],
'circle-opacity': 0.8, 'circle-opacity': 0.8,
'circle-radius': 16 'circle-radius': 8
}, },
filter: ["match", ["get", "internal_id"], props.idlist, true, false] filter: ["match", ["get", "internal_id"], props.idlist, true, false]
}); });

Loading…
Cancel
Save