I am trying to dynamically load two instances of Google Maps on a single page but I keep encountering the following errors:
You have included the Google Maps JavaScript API multiple times on this page. This may result in unexpected errors.
Below is the code snippet for more assistance, using the load-google-maps-api node_module:
googleMapInit () {
let self = this,
mapElement = this.$refs.canvasy;
loadGoogleMapsAPI({
key: this.gmk,
language: this.language
})
.then( googleApi => {
self.contextMarkerLatLng = new google.maps.LatLng( self.contextMarkerCoords.lat, self.contextMarkerCoords.lng );
self.googleMap = new google.maps.Map( mapElement , {
disableDefaultUI: true,
styles: MapStylesObj.styles,
zoom: self.googleMapZoom,
minZoom: self.googleMapMinZoom,
center: self.contextMarkerLatLng
});