Costco: Add business center pin for visual differentiation

This commit is contained in:
Chandler Swift 2025-12-20 19:11:07 -06:00
parent 584b41c2a4
commit 87366362d8
Signed by: chandlerswift
GPG key ID: A851D929D52FB93F
2 changed files with 27 additions and 6 deletions

View file

@ -7,18 +7,21 @@ import Icon from 'ol/style/Icon.js';
import url from './data.geojson?url'; // TODO: remove `?url`?
import pin from './pin.svg?url'; // TODO: remove `?url`?
import bcPin from './business-center-pin.svg?url'; // TODO: remove `?url`?
const vectorLayer = new VectorLayer({
source: new VectorSource({
url: url,
format: new GeoJSON,
}),
style: new Style({
image: new Icon({
anchor: [0.5, 1],
src: pin,
}),
}),
style: function(feature){
return new Style({
image: new Icon({
anchor: [0.5, 1],
src: feature.get("type") === "Business Center" ? bcPin : pin,
}),
});
},
});
export default vectorLayer;