Costco: Add business center pin for visual differentiation
This commit is contained in:
parent
584b41c2a4
commit
87366362d8
2 changed files with 27 additions and 6 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue