I am using Laravel 5.6.12 and vue.js
I am implementtrying to implement Google Maps with the help of this github link
I following the guidelines mentioned in above link as below.
Installation
npm install vue2-google-maps
Then wrote below code in app.js
import * as VueGoogleMaps from 'vue2-google-maps'
Vue.component('vue2-google-maps', VueGoogleMaps);
Finally below code in the template
<GmapMap
:center="{lat:10, lng:10}"
:zoom="7"
map-type-id="terrain"
style="width: 500px; height: 300px"
></GmapMap>
I got the below error.
- did you register the component correctly? For recursive components, make sure to provide the "name" option.
I have already added below script in the html head.
<script src="https://maps.googleapis.com/maps/api/js?key=apikey&libraries=places"></script>
Am I missing anything in above code?