CacheStart map shows marker for startstation again
This commit is contained in:
parent
96d3a3836d
commit
5626c52537
@ -9,7 +9,7 @@
|
||||
|
||||
<vl-geom-point :coordinates="[lon, lat]"></vl-geom-point>
|
||||
<vl-style-box>
|
||||
<vl-style-icon src="./statics/map-marker.svg" :scale="2.0" :anchor="[0.5, 1]"></vl-style-icon>
|
||||
<vl-style-icon src="./statics/map-marker_red.svg" :scale="2.0" :anchor="[0.5, 1]"></vl-style-icon>
|
||||
</vl-style-box>
|
||||
</template>
|
||||
</vl-feature>
|
||||
|
||||
@ -57,7 +57,7 @@ Vue.use(VueLayers);
|
||||
stationen: [],
|
||||
},
|
||||
station: {},
|
||||
markercolor: "red",
|
||||
markercolor: "grey",
|
||||
cameraActive: false,
|
||||
result: null,
|
||||
zoom: 15,
|
||||
@ -121,8 +121,15 @@ Vue.use(VueLayers);
|
||||
},
|
||||
|
||||
getMarkerURL(station) {
|
||||
console.log(station);
|
||||
return `./statics/map-marker_${this.markercolor}.svg`
|
||||
return `./statics/map-marker_${this.setMarkercolor(station)}.svg`
|
||||
},
|
||||
setMarkercolor(station){
|
||||
if(this.station === cache.stationen.find(station => station.id === Number(this.$route.params.id))) {
|
||||
this.markercolor = "red";
|
||||
} else if (this.station) {
|
||||
this.markercolor = "grey";
|
||||
}
|
||||
return this.markercolor
|
||||
},
|
||||
|
||||
updateResult(event) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user