Closed (fixed)
Project:
GMap Module
Version:
7.x-1.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 Oct 2011 at 15:08 UTC
Updated:
28 Apr 2013 at 21:50 UTC
Copied from #1298372: map always centered on default center and zoom:
I have the map in a node and I'm finding that:
- the map isn't centred on the marker - I always have to pan up and to the left to find it
- only one tile of the Google map is displayed at a time - as you pan, other tiles will come into view but the original one disappears
| Comment | File | Size | Author |
|---|---|---|---|
| gmap_screenshot.PNG | 42.11 KB | adam_b |
Comments
Comment #1
nclavaud commentedsubscribing
I'm experiencing such problems. I've set a default center on admin/config/services/gmap but there is always an offset when displaying the GMap on a node edit page.
Looks like this centering offset issue leads to unproper tiles load. The tiles at the bottom right are always missing.
Comment #2
nclavaud commentedComment #3
nclavaud commentedAfter further investigation, I've found out that the expected center (i.e. the place where the map should be centered at) is located at the top left corner.
Comment #4
nclavaud commentedOK, my problem was related to this vertical tab issue :
#1064448: support gmap location cck vertical tabs - HACK to correctly render gmap location cck in vertical tab
Hacking gmap.js solved my problem.
@adam_b: is your map in a vertical tab pane also? in which case I guess that will solve your pb too.
Comment #5
pbfleetwood commentedUp until a few minutes ago I was having this problem as well, but in the GMAP that is displayed on the node edit form, where one places the marker for the location. I'm using the Seven administrative theme, which does indeed display the Location form in a vertical tab.
But as I was writing this, inspired by the mention in #4 of vertical tabs, I decided to experiment with repositioning the Location information in the form (see Location form weight in the Locative information tab in the Edit form for your Content Type). I set the position to -10 (the highest placement) doubtfully hoping that it would bring it out of the vertical tab section of the Edit form; instead, it placed it as the top tab, but this seems to have corrected the problem for me. I can now zoom and pan as I like, and the tiles load properly.
This will, hopefully, help others find workarounds for their problems, as well.
Comment #6
Louis Bob commentedI have the same problem : "the map isn't centered on the marker - I always have to pan up and to the left to find it".
More precisely: the marker is just located off the top left corner of the map.
It happens to me in these circumstances:
1. when used in a collapsible collapsed field (with the field_group module for instance)
2. when used with the popup module
I have tried different options, including the "collapsehack" thing, with no success so far. Tried the patch at #4, no success either.
I also find that problem mentioned by the community when used with :
3. quicktabs (see http://drupal.org/node/352247)
4. vertical tabs
So I guess it has to do with gmap module and JS?
Comment #7
johnvThe solution as mentioned in #4 is fixed.