mirror of
https://github.com/KevinMidboe/nova-map-fields.git
synced 2025-10-29 17:50:27 +00:00
Remove last & all marker buttons
This commit is contained in:
@@ -6,8 +6,11 @@
|
||||
</field-map>
|
||||
|
||||
<l-control position="bottomleft" >
|
||||
<button @click="clickHandler">
|
||||
I am a useless button!
|
||||
<button @click="removeLastMarker">
|
||||
Slett forrige
|
||||
</button>
|
||||
<button @click="removeAllMarkers">
|
||||
Slett alle
|
||||
</button>
|
||||
</l-control>
|
||||
</div>
|
||||
@@ -79,13 +82,14 @@ export default {
|
||||
this.markers.splice(-1,1);
|
||||
this.triggerChange();
|
||||
},
|
||||
removeAllMarkers() {
|
||||
this.markers = [];
|
||||
this.triggerChange();
|
||||
},
|
||||
createMarker(evt) {
|
||||
this.markers.push(evt.latlng);
|
||||
this.triggerChange();
|
||||
},
|
||||
clickHandler() {
|
||||
alert('clicked');
|
||||
},
|
||||
},
|
||||
|
||||
components: {
|
||||
|
||||
Reference in New Issue
Block a user