When /node/add/mycontent_type is loaded the map is displayed as it is shown ont he following screenshot.
By the way that default disappear once a double click has been done on the map.
| Comment | File | Size | Author |
|---|---|---|---|
| issue_with_location.jpg | 33.76 KB | jmary |
When /node/add/mycontent_type is loaded the map is displayed as it is shown ont he following screenshot.
By the way that default disappear once a double click has been done on the map.
| Comment | File | Size | Author |
|---|---|---|---|
| issue_with_location.jpg | 33.76 KB | jmary |
Comments
Comment #1
dave reid1. Which module are you using to display the map?
2. Can you check your browser's JavaScript console log for any JavaScript errors on the page?
Comment #2
chaloalvarezj commentedI can confirm that the gmap does not render properly when using vertical tabs on a location CCK field (location + gmap). Double clicking renders the map properly.
Comment #3
jmary commentedI confirm I am also in the same context exactly : gmap + location.
Comment #4
chaloalvarezj commentedChanged version as the dev version also has this problem.
Comment #5
dippers commentedThis problem occurrs because the gmap is on a hidden div when the page is built. To fix add the following line in the ready function of your custom javascript file:
$(".vertical-tabs-list-group_my-group-id").click(function(){var m = Drupal.gmap.getMap('my-mapid'); m.map.checkResize();});You need to find the class (vertical-tabs-list-group_my-group-id) used to identify the vertical tab link for the map panel and you also need to find the mapid (my-mapid) of the map that is not rendering correctly - use firebug. The code simply makes the Google Map api do a check resize when the map tab is clicked.
Comment #6
chaloalvarezj commented@Dippers Thank you for your help!!!
I added the above code to a custom script file in my theme, and the map re-sized perfectly. The only problem was that the center did not change, so I changed it by using the following code:
I am left with the default zoom even though autozoom was checked in gmap settings... any idea on how to use autozoom here?
Comment #7
dippers commentedHave you tried using m.map.setCenter(ct,m.vars.zoom);
Comment #8
chaloalvarezj commented@Dippers: Thank you!
I tried using m.map.setCenter(ct,m.vars.zoom); but that gave me the default Gmap module setting for zoom... and I wanted to auto zoom in to the picked location. I am now checking if the location has been picked already and if so... zooming in.
But was wandering why this does not happen automatically since autozoom is checked in the Gmap module settings. Anyway, for my purposes checking m.locpick is good enough...
Comment #9
giorgoskplease review this patch #1064448: support gmap location cck vertical tabs - HACK to correctly render gmap location cck in vertical tab
if enough people review it probably it can get included in gmap next release