Use the api provided in the options for loading maps
This commit is contained in:
@@ -6,7 +6,8 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { Loader } from "../utils/load-google-maps";
|
import { Loader } from "../utils/load-google-maps";
|
||||||
import { ref, provide } from "vue";
|
import { ref, provide, inject } from "vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
center: {
|
center: {
|
||||||
@@ -35,8 +36,12 @@ export default {
|
|||||||
setup: function(props) {
|
setup: function(props) {
|
||||||
const mapContainer = ref(null);
|
const mapContainer = ref(null);
|
||||||
|
|
||||||
|
const apiKey = inject(
|
||||||
|
"apiKey"
|
||||||
|
);
|
||||||
|
|
||||||
const mapsLoader = new Loader({
|
const mapsLoader = new Loader({
|
||||||
apiKey: "",
|
apiKey: apiKey,
|
||||||
version: "weekly",
|
version: "weekly",
|
||||||
libraries: [
|
libraries: [
|
||||||
"places",
|
"places",
|
||||||
|
|||||||
Reference in New Issue
Block a user