From 87366362d8fad3fd2d1bf9a0db1e4e68daec4524 Mon Sep 17 00:00:00 2001 From: Chandler Swift Date: Sat, 20 Dec 2025 19:11:07 -0600 Subject: [PATCH] Costco: Add business center pin for visual differentiation --- layers/chains/costco/business-center-pin.svg | 18 ++++++++++++++++++ layers/chains/costco/layer.js | 15 +++++++++------ 2 files changed, 27 insertions(+), 6 deletions(-) create mode 100644 layers/chains/costco/business-center-pin.svg diff --git a/layers/chains/costco/business-center-pin.svg b/layers/chains/costco/business-center-pin.svg new file mode 100644 index 0000000..659740d --- /dev/null +++ b/layers/chains/costco/business-center-pin.svg @@ -0,0 +1,18 @@ + + + + + + + diff --git a/layers/chains/costco/layer.js b/layers/chains/costco/layer.js index af140b4..d7bf5d1 100644 --- a/layers/chains/costco/layer.js +++ b/layers/chains/costco/layer.js @@ -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;