forked from GuillaumeLeclerc/vue-google-maps
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
1,279 additions
and
1,249 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
examples/vue-google-maps.js | ||
examples/dist/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"env": { | ||
"browser": true, | ||
"commonjs": true, | ||
"es6": true, | ||
"node": true | ||
}, | ||
"extends": "eslint:recommended", | ||
"parserOptions": { | ||
"sourceType": "module" | ||
}, | ||
"rules": { | ||
"indent": [ | ||
"error", | ||
2 | ||
], | ||
"linebreak-style": [ | ||
"error", | ||
"unix" | ||
], | ||
"quotes": [ | ||
"error", | ||
"single" | ||
], | ||
"semi": [ | ||
"error", | ||
"always" | ||
] | ||
}, | ||
"globals": { | ||
"google": false | ||
}, | ||
"plugins": [ | ||
"html" | ||
], | ||
"settings": { | ||
"html/html-extensions": [".html", ".vue"] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"env": { | ||
"browser": true, | ||
"commonjs": true, | ||
"es6": true, | ||
"node": true | ||
}, | ||
"extends": "eslint:recommended", | ||
"parserOptions": { | ||
"sourceType": "module" | ||
}, | ||
"rules": { | ||
"indent": [ | ||
"error", | ||
2 | ||
], | ||
"linebreak-style": [ | ||
"error", | ||
"unix" | ||
], | ||
"quotes": [ | ||
"error", | ||
"single" | ||
], | ||
"semi": [ | ||
"error", | ||
"always" | ||
] | ||
}, | ||
"globals": { | ||
"google": false, | ||
"Vue": false, | ||
"VueGoogleMap": false | ||
}, | ||
"plugins": [ | ||
"html" | ||
], | ||
"settings": { | ||
"html/html-extensions": [".html", ".vue"] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,70 +1,70 @@ | ||
<body> | ||
<div id="root"> | ||
<h1>Changing Default Place updates text box</h1> | ||
<button @click="setDescription('Tokyo')">Set to Tokyo</button><br/> | ||
<button @click="setDescription('Shanghai')">Set to Shanghai</button><br/> | ||
<button @click="setDescription('Seoul')">Set to Seoul</button><br/> | ||
<label> | ||
Das Label | ||
<gmap-autocomplete :value="description" | ||
@place_changed="setPlace"> | ||
</gmap-autocomplete> | ||
</label> | ||
<br/> | ||
{{latLng.lat}}, | ||
{{latLng.lng}} | ||
|
||
<div> | ||
<h2>Options work</h2> | ||
You cannot find the state of Texas in this | ||
<label> | ||
Only locations in Singapore: | ||
<gmap-autocomplete | ||
:value="description" | ||
@place_changed="setPlace" | ||
:options="{ | ||
bounds: {north: 1.4, south: 1.2, east: 104, west: 102}, | ||
strictBounds: true | ||
}"> | ||
</gmap-autocomplete> | ||
</label> | ||
</div> | ||
</div> | ||
|
||
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.1.8/vue.js"></script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.4/lodash.js"></script> | ||
<script src="vue-google-maps.js"></script> | ||
|
||
<script> | ||
|
||
Vue.use(VueGoogleMap, { | ||
load: { | ||
key: 'AIzaSyBzlLYISGjL_ovJwAehh6ydhB56fCCpPQw', | ||
libraries: 'places' | ||
}, | ||
}); | ||
|
||
document.addEventListener('DOMContentLoaded', function() { | ||
new Vue({ | ||
el: '#root', | ||
data: { | ||
description: 'Singapore', | ||
latLng: {} | ||
}, | ||
methods: { | ||
setDescription(description) { | ||
this.description = description; | ||
}, | ||
setPlace(place) { | ||
this.latLng = { | ||
lat: place.geometry.location.lat(), | ||
lng: place.geometry.location.lng(), | ||
} | ||
} | ||
} | ||
}); | ||
}); | ||
|
||
</script> | ||
|
||
</body> | ||
<body> | ||
<div id="root"> | ||
<h1>Changing Default Place updates text box</h1> | ||
<button @click="setDescription('Tokyo')">Set to Tokyo</button><br/> | ||
<button @click="setDescription('Shanghai')">Set to Shanghai</button><br/> | ||
<button @click="setDescription('Seoul')">Set to Seoul</button><br/> | ||
<label> | ||
Das Label | ||
<gmap-autocomplete :value="description" | ||
@place_changed="setPlace"> | ||
</gmap-autocomplete> | ||
</label> | ||
<br/> | ||
{{latLng.lat}}, | ||
{{latLng.lng}} | ||
|
||
<div> | ||
<h2>Options work</h2> | ||
You cannot find the state of Texas in this | ||
<label> | ||
Only locations in Singapore: | ||
<gmap-autocomplete | ||
:value="description" | ||
@place_changed="setPlace" | ||
:options="{ | ||
bounds: {north: 1.4, south: 1.2, east: 104, west: 102}, | ||
strictBounds: true | ||
}"> | ||
</gmap-autocomplete> | ||
</label> | ||
</div> | ||
</div> | ||
|
||
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.1.8/vue.js"></script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.4/lodash.js"></script> | ||
<script src="vue-google-maps.js"></script> | ||
|
||
<script> | ||
|
||
Vue.use(VueGoogleMap, { | ||
load: { | ||
key: 'AIzaSyBzlLYISGjL_ovJwAehh6ydhB56fCCpPQw', | ||
libraries: 'places' | ||
}, | ||
}); | ||
|
||
document.addEventListener('DOMContentLoaded', function() { | ||
new Vue({ | ||
el: '#root', | ||
data: { | ||
description: 'Singapore', | ||
latLng: {} | ||
}, | ||
methods: { | ||
setDescription(description) { | ||
this.description = description; | ||
}, | ||
setPlace(place) { | ||
this.latLng = { | ||
lat: place.geometry.location.lat(), | ||
lng: place.geometry.location.lng(), | ||
}; | ||
} | ||
} | ||
}); | ||
}); | ||
|
||
</script> | ||
|
||
</body> |
Oops, something went wrong.