You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the Bug
The Google Maps integration on the http://localhost:8080/#/maps page does not work as expected. The map fails to render, and the browser console logs multiple errors related to the Google Maps API key and improper API loading patterns. The issue prevents users from interacting with the embedded map, resulting in a broken feature.
Steps to Reproduce
Clone the repository and follow the setup instructions to run the project locally.
Start the application using the provided instructions (e.g., npm run serve or equivalent command).
Open the browser's developer console (press F12 or right-click and choose Inspect, then go to the Console tab).
Observe the following:
The map fails to load.
Errors related to the Google Maps API key and incorrect script loading patterns appear in the console.
Expected Behavior
The Google Map should load seamlessly on the Maps page, displaying the expected geographical content.
The console should not show any errors related to the API key or loading patterns.
The user should be able to interact with the map as intended (e.g., zoom, pan, click markers).
Actual Behavior
The Maps page fails to load the Google Map, and the console displays errors indicating a missing or invalid Google Maps API key.
{{
Google Maps JavaScript API has been loaded directly without loading=async. This can result in suboptimal performance. For best-practice loading patterns please see https://goo.gle/js-api-loading
[Vue warn]: Error in mounted hook: "TypeError: window.google.maps.marker is undefined"
found in
---> at src/pages/Maps.vue
at src/layout/dashboard/Content.vue
at src/layout/dashboard/DashboardLayout.vue
at src/App.vue
Invalid or Missing API Key: The key provided for Google Maps might be incorrect, expired, or improperly configured in the project.
Improper API Loading Pattern: The Google Maps JavaScript API has been loaded directly without using the recommended async attribute, leading to potential initialization issues.
Integration Issue: The codebase might reference window.google.maps.marker incorrectly, or the relevant Google Maps library component (e.g., Marker) may not be loaded.
Proposed Solutions
API Key Configuration:
Verify the Google Maps API key in the project configuration file or .env file.
Ensure the API key is authorized for the domain localhost in the Google Cloud Console.
Best Practice Loading:
Update the script tag for the Google Maps API to include the async and defer attributes:
@MZain-ul-Abideen this issue was automatically closed because it did not follow the bellow rules:
IMPORTANT: Please use the following link to create a new issue:
https://www.creative-tim.com/new-issue/vue-black-dashboard
**If your issue was not created using the app above, it will be closed immediately.**
Love Creative Tim? Do you need Angular, React, Vuejs or HTML? You can visit:
👉 https://www.creative-tim.com/bundles
👉 https://www.creative-tim.com
Describe the Bug
The Google Maps integration on the http://localhost:8080/#/maps page does not work as expected. The map fails to render, and the browser console logs multiple errors related to the Google Maps API key and improper API loading patterns. The issue prevents users from interacting with the embedded map, resulting in a broken feature.
Steps to Reproduce
Expected Behavior
Actual Behavior
The Maps page fails to load the Google Map, and the console displays errors indicating a missing or invalid Google Maps API key.
{{
Google Maps JavaScript API has been loaded directly without loading=async. This can result in suboptimal performance. For best-practice loading patterns please see https://goo.gle/js-api-loading
[Vue warn]: Error in mounted hook: "TypeError: window.google.maps.marker is undefined"
found in
---> at src/pages/Maps.vue
at src/layout/dashboard/Content.vue
at src/layout/dashboard/DashboardLayout.vue
at src/App.vue
}}
Screenshots
Environment
Browser: Firefox (latest version)
Operating System: Manjaro Linux
Node.js Version: 10.9.0
Possible Causes
Proposed Solutions
Debug Integration Code
Additional Context
The text was updated successfully, but these errors were encountered: