Use default styles for the map component

This commit is contained in:
Fawad Mirzad
2020-10-19 13:07:16 +02:00
parent 78fdd9ccaa
commit 2ddf24d2a2
3 changed files with 4 additions and 3 deletions

View File

@@ -20,7 +20,7 @@ export default {
default: "terrain" default: "terrain"
}, },
style: { style: {
default: "width: 500px; height: 300px" default: []
}, },
options: { options: {
zoomControl: true, zoomControl: true,
@@ -50,6 +50,7 @@ export default {
const mapPromise = mapsLoader.load().then(() => { const mapPromise = mapsLoader.load().then(() => {
const map = new google.maps.Map(mapContainer.value, { const map = new google.maps.Map(mapContainer.value, {
zoom: props.zoom, zoom: props.zoom,
style: props.style,
center: new google.maps.LatLng(38.423733, 27.142826), center: new google.maps.LatLng(38.423733, 27.142826),
mapTypeId: "terrain" mapTypeId: "terrain"
}); });

2
package-lock.json generated
View File

@@ -1,5 +1,5 @@
{ {
"name": "@fawmi/vue-google-maps", "name": "@fawmi/vue-google-maps",
"version": "0.1.0", "version": "0.1.1",
"lockfileVersion": 1 "lockfileVersion": 1
} }

View File

@@ -1,7 +1,7 @@
{ {
"name": "@fawmi/vue-google-maps", "name": "@fawmi/vue-google-maps",
"description": "Google Map components for Vue.js 3", "description": "Google Map components for Vue.js 3",
"version": "0.1.0", "version": "0.1.1",
"private": false, "private": false,
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {