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
When showing a dt-location-map field that has multiple geocoded locations as the initial value, console errors are thrown:
You have included the Google Maps JavaScript API multiple times on this page. This may cause unexpected errors.
This is likely because the googleGeocodingService is initialize in the dt-location-map-item, so each location is trying to include the script again. It should probably be included in the parent component and passed down somehow.
There still needs to be some handling in case there are then multiple location components on the page that are pre-populated. The service tries to detect if it's already loaded in the constructor by looking for window.google?.maps?.places?.AutocompleteService, but the script probably isn't loaded by the time the next constructor is called. It would probably be better to check the document for the existence of another script tag with the same source file.
The text was updated successfully, but these errors were encountered:
When showing a
dt-location-map
field that has multiple geocoded locations as the initial value, console errors are thrown:This is likely because the googleGeocodingService is initialize in the
dt-location-map-item
, so each location is trying to include the script again. It should probably be included in the parent component and passed down somehow.There still needs to be some handling in case there are then multiple location components on the page that are pre-populated. The service tries to detect if it's already loaded in the constructor by looking for
window.google?.maps?.places?.AutocompleteService
, but the script probably isn't loaded by the time the next constructor is called. It would probably be better to check the document for the existence of another script tag with the same source file.The text was updated successfully, but these errors were encountered: