Improve marker and map components

This commit is contained in:
Fawad Mirzad
2020-10-19 17:43:09 +02:00
parent 34dbed6f85
commit ca79bf7501
4 changed files with 76 additions and 14 deletions

View File

@@ -7,6 +7,7 @@
<script>
import { Loader } from "../utils/load-google-maps";
import { ref, provide, inject } from "vue";
import {fitMapToMarkers} from "../utils/center-markers";
export default {
props: {
@@ -26,6 +27,9 @@ export default {
disableDefaultUI: {
type: Boolean,
},
geoCoordinates: {
default: [],
},
options: {
zoomControl: true,
mapTypeControl: true,
@@ -71,9 +75,10 @@ export default {
zoom: props.zoom,
style: props.style,
center: new google.maps.LatLng(38.423733, 27.142826),
mapTypeId: "terrain",
mapTypeId: props.mapTypeId,
...uiOptions
});
return map;
});