Add Punch Pizza
This commit is contained in:
parent
78f9830400
commit
645aa85751
4 changed files with 132 additions and 0 deletions
24
layers/chains/punch-pizza/layer.js
Normal file
24
layers/chains/punch-pizza/layer.js
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
import VectorLayer from 'ol/layer/Vector';
|
||||
import {Vector as VectorSource} from 'ol/source.js';
|
||||
import GeoJSON from 'ol/format/GeoJSON.js';
|
||||
|
||||
import {Style} from 'ol/style.js';
|
||||
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`?
|
||||
|
||||
const vectorLayer = new VectorLayer({
|
||||
source: new VectorSource({
|
||||
url: url,
|
||||
format: new GeoJSON,
|
||||
}),
|
||||
style: new Style({
|
||||
image: new Icon({
|
||||
anchor: [0.5, 1],
|
||||
src: pin, // or https://punchpizza.com/wp-content/themes/sprung-total/img/mappoint-punch.png
|
||||
}),
|
||||
}),
|
||||
});
|
||||
|
||||
export default vectorLayer;
|
||||
Loading…
Add table
Add a link
Reference in a new issue