When embedding a Google Map widget in a Mulipage group, the Google Map does not draw correctly (see attached file).
Calling the Google maps API resize function is the best fix I can think of. Here's a simple fix compatible with the Field group module:
Drupal.multipageControl.prototype.nextPage = function () {
for (var maps in Drupal.Geolocation.maps) { google.maps.event.trigger(Drupal.Geolocation.maps[maps], 'resize'); }
};
Drupal.multipageControl.prototype.previousPage = function () {
for (var maps in Drupal.Geolocation.maps) { google.maps.event.trigger(Drupal.Geolocation.maps[maps], 'resize'); }
};
however I'm not sure where this belongs in this module, or if it should be provided by the Field group module.
Comments
Comment #1
daniel.nitsche commentedI should note that in my case, the Google map was not on the first page of the Multipage (it was on the third page). I'd imagine maps on the first page wouldn't have this issue.
Comment #2
jjchinquistI have the same issue with a multipage node. For me, the Drupal.Geolocation.maps array is empty. Do you have the same result?
Comment #3
daniel.nitsche commentedYou may find it's actually not empty. Drupal.Geolocation.maps is an Object, which doesn't have a length property, so will always return 0.
So in my case, the length of Drupal.Geolocation.maps is 0, but the Object is not empty (try console.log on Drupal.Geolocation.maps).
Comment #4
jjchinquistHi, thanks for the info.
A very similar issue comes from using the Jcrop JS library from the imagefield_crop (http://drupal.org/project/imagefield_crop) module. The issue is outlined here: http://drupal.org/node/719714#comment-4570944
The code that is important is located in the patch http://drupal.org/files/issues/hidden-breaks-crop-719714-35_0.patch
I will attempt to apply the logic to the geolocation_googlemaps.js file.
Comment #5
funature commented@jjchinquist could you please upload your solution here?
best regards & happy new year!
Comment #6
funature commentedI also found similar issue here http://drupal.org/node/352247. The #27 sounds be a good solution.
Comment #7
lklimek commentedI believe #1277888: Google map partly rendered inside vertical tabs and collapsible fieldsets is a related issue.
Comment #8
derjochenmeyer commentedDoes this problem still exist?