Thread:Extension talk:Maps/Map display problem in popup/reply (6)

Interesting you only see it in IE. I see the issue in Firefox 3.6.3, Chrome 5.0.375.86, and IE 8.0.6001.18928 on Vista. Another co-worker on a Mac is seeing it in Firefox and Chrome as well.

We came up with a simple fix for it which works for us with changes in Services/GoogleMaps/GoogleMapFunctions.js, Maps_GoogleMapsDispMap.php and Maps_GoogleMapsDispPoint.php. The diff shows the original code first to our code.

diff /opt/mediawiki/extensions/Maps/Services/GoogleMaps/GoogleMapFunctions.js GoogleMapFunctions.js 77,78c77,84 <              //mapOptions.size = new GSize(mapOptions.width, mapOptions.height); <              return createGoogleMap(mapName, mapOptions, markers); --- >              if (mapOptions.width != null && mapOptions.height != null) { >                      // Get just the numeric characters for width and height (excluding, for example, "px") >                      var width = mapOptions.width.replace(/[^0-9]/g, ''); >                      var height = mapOptions.height.replace(/[^0-9]/g, ''); >                      mapOptions.size = new GSize(width, height); >              } >               return createGoogleMap(mapName, mapOptions, markers); >              return map; 99c105 <      var map = new GMap2(mapElement, {mapTypes: mapOptions.types}); --- >      var map = new GMap2(mapElement, {size: mapOptions.size, mapTypes: mapOptions.types});

diff /opt/mediawiki/extensions/Maps/Services/GoogleMaps/Maps_GoogleMapsDispMap.php Maps_GoogleMapsDispMap.php 87a88,89 >                      width: '$this->width', >                      height: '$this->height'

diff /opt/mediawiki/extensions/Maps/Services/GoogleMaps/Maps_GoogleMapsDispPoint.php Maps_GoogleMapsDispPoint.php 90c90,92 <                      scrollWheelZoom: $this->autozoom --- >                      scrollWheelZoom: $this->autozoom, >                      width: '$this->width', >                      height: '$this->height'

Thanks, Twong