Use the api provided in the options for loading maps

This commit is contained in:
Fawad Mirzad
2020-10-19 13:29:58 +02:00
parent aa06b30913
commit 5e7dcd01db

View File

@@ -6,7 +6,8 @@
<script>
import { Loader } from "../utils/load-google-maps";
import { ref, provide } from "vue";
import { ref, provide, inject } from "vue";
export default {
props: {
center: {
@@ -35,8 +36,12 @@ export default {
setup: function(props) {
const mapContainer = ref(null);
const apiKey = inject(
"apiKey"
);
const mapsLoader = new Loader({
apiKey: "",
apiKey: apiKey,
version: "weekly",
libraries: [
"places",