42 lines
1.0 KiB
HTML
42 lines
1.0 KiB
HTML
<head>
|
|
<style>
|
|
.map-container {
|
|
width: 400px;
|
|
height: 400px;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div id="test">
|
|
<h2>Test 1</h2>
|
|
<gmap-map
|
|
:center="{lat: 1.38, lng: 103.8}"
|
|
:zoom="12"
|
|
class="map-container"
|
|
ref="map">
|
|
<gmap-marker ref="myMarker" :position="google && new google.maps.LatLng(1.38, 103.8)"></gmap-marker>
|
|
</gmap-map>
|
|
</div>
|
|
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.0/vue.js"></script>
|
|
<script src="../../dist/vue-google-maps.js"></script>
|
|
|
|
<script>
|
|
/* todo all this examples useless, because owner migrated code but not test examples, whole folder "tests" */
|
|
/* todo still use vue2.5, need to remove this folder, or make it workable */
|
|
Vue.use(VueGoogleMaps, {
|
|
load: {
|
|
key: 'AIzaSyDf43lPdwlF98RCBsJOFNKOkoEjkwxb5Sc',
|
|
}
|
|
})
|
|
document.addEventListener('DOMContentLoaded', () => {
|
|
window.vue = new Vue({
|
|
computed: {
|
|
google: VueGoogleMaps.gmapApi
|
|
},
|
|
el: '#test',
|
|
})
|
|
})
|
|
</script>
|
|
</body>
|