Use the api provided in the options for loading maps
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user