November 2017
Beginner to intermediate
398 pages
8h 42m
English
We also need to handle the clicks on the map to create a new blog post.
<googlemaps-map :center="center" :zoom="zoom" :options="mapOptions" @update:center="setCenter" @update:zoom="setZoom" @click="onMapClick" >
onMapClick (event) { this.setDraftLocation({ position: event.latLng, placeId: event.placeId, }) },
You can now try to click on the map--two mutations (one to create the draft and one to update its location) should be recorded in the dev tools.
Read now
Unlock full access