Files
vue-google-maps-community-fork/components/Rectangle.vue
Fawad Mirzad 8e0792b9d9 Initial commit
2020-10-16 16:44:19 +02:00

39 lines
618 B
Vue

<template>
<div>
auto complete
</div>
</template>
<script >
import { inject } from "vue";
export default {
props: {
bounds: {
required: true
},
},
setup(props) {
const mapPromise = inject(
"mapPromise"
);
if (mapPromise) {
mapPromise.then((map) => {
const rectangle = new google.maps.Rectangle({
strokeColor: "#FF0000",
strokeOpacity: 0.8,
strokeWeight: 2,
fillColor: "#FF0000",
fillOpacity: 0.35,
map,
bounds: props.bounds
});
});
}
return {};
}
};
</script>