mhirdes / go_maps_ext

Google Maps Extension for TYPO3
MIT License
21 stars 31 forks source link

GroundOverlay has stopped working in TYPO3 12 #123

Open Dani-mam opened 2 months ago

Dani-mam commented 2 months ago

Up until TYPO3 11.5.38 with go_maps_ext 5.1.0 we've had a small script that put an overlay image over the map. Now with TYPO3 12.4.20 and go_maps_ext 6.1.1. it has stopped working and we can't quite figure out why. Any help would be greatly appreciated.

The script:

$(document).ready(function(){ 
  $(function () {
  var mapOverlay;
  var element = $(".js-map");

  var imageBounds = {
    north: 52.75099,
    south: 52.74379,
    east: 8.30016,
    west: 8.28697
  };   

  //Karte mit Overlay
  mapOverlay = new google.maps.GroundOverlay(
      'https://www.my-website.de/fileadmin/user_upload/img/GoogleMaps/map-overlay.png',
      imageBounds
  );
  mapOverlay.setMap(element.data("map"));
  });   
}); 
mhirdes commented 1 month ago

We removed jQuery.

To get the map try sth like this:

document.querySelectorAll('.js-map').forEach(function(el) { 
       console.log( el.gomapsext.map );
});