'Trying to import vue2-google-maps in blade.php file
I'm was trying to import vue2-google-maps in my blade.php file but failed. Is there any possibility to to import vue2-google-maps in blade.php file. Following is my code.
<!DOCTYPE html>
<html>
<head>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.js"></script>
</head>
<body>
<div id="app">
<GmapMap :center="{lat:1.38, lng:103.8}" :zoom="12" :ref="gmap">
<GmapMarker :position="{lat:1.38, lng:103.8}">
</GmapMarker>
<gmap-info-window :position="{lat:1.38, lng:103.8}">
Hello world!
</gmap-info-window>
</GmapMap>
</div>
<script type="module" >
import * as VueGoogleMaps from '../node_modules/vue2-google-maps'
Vue.use(VueGoogleMaps, {
load: {
key: "key goes here",
libraries: 'places'
}
})
require('./bootstrap');
new Vue( { el : '#app',
data: {
},
methods:{
}
} );
</script>
</body>
</html>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|