Hello,
I'm using Gmap and Location on a website. Everything is working fine but a few weeks ago I lost the central position of the marker. I use the default location map block. Can someone help me?
Hello,
I'm using Gmap and Location on a website. Everything is working fine but a few weeks ago I lost the central position of the marker. I use the default location map block. Can someone help me?
Comments
Comment #1
spasmody commentednobody?
Comment #2
pauldawg commentedMore specifically, the problem here is that the GMap is not repositioning at all. Rather, it is only using the default center. I have a bunch of nodes being displayed in my home state, so I never notices the problem, but now I am getting nodes created from other states, and the GMap is still displaying the default center, in my home state, and the actual address and the marker are off-screen.
Comment #3
spasmody commentedIn my case the gmap window is the right one but the marker is on the top-left corner. Why?
Comment #4
pauldawg commentedMy guess is that your default center settings for the module are within the same window as the marker so the marker is visible. That is what I am experiencing, so it sounds like you are seeing the same thing. Have you tried viewing a map where the marker is far from your default center?
Comment #5
baaj commentedThere are settings within the marker ini file that lets you set the x,y coordinates of your image as the "point" of your custom markers. if not specified I think they default to the image top left
Comment #6
spasmody commentedindeed baaj here is the content of the file :
But I think these (default) settings are correct, isn't it?
Comment #7
baaj commentedThey're correct if all your custom markers 20px X 29px, otherwise change the anchorX and Y values
If you make any changes, remember to rebuild your marker cache on the gmap settings page.
Comment #8
spasmody commentedYes, I can actually change the marker position, I found a good result with negative values:
but unfortunately the map area changes in the same time, i.e. it doesn't cover all the gmap window anymore.
Can I change the display area as well?
Comment #9
baaj commentedTry using positive values - the negatives are messing with the map display. If your image is 30 x 30 and your pinpoint is the bottm center (like most markers) then use
Comment #10
spasmody commentedSo, with that configuration
image = 30x30
anchorX = 15
anchorY = 30
infoX = 17
infoY = 6
and after regenerating marker cache, the marker is still on the top-left corner (but on the right place on the map). In addition the map still doesn't cover all the window.
I have already reinstalled the module. I don't understand. Is there other setting somewhere?
Comment #11
baaj commentedhmmm....
Are your markers all the same size? If not you need to set these for each one
And you declared the custom marker images below these anchorx,y defaults?
Try clearing your drupal cache also.
Comment #12
spasmody commentedhummmm,
it's better with these settings :
but it's not perfect, especially when I zoom :
http://passpass.biz/lieux/908/grand-palais
(carte du lieu)
In addition the marker position is different for anon and auth
But I clear both marker and drupal caches
I become crazy...
Comment #13
baaj commentedRe: crazy - I've been working to try to fix a bug in gmaps for TWO whole days (and nobody's replying to my thread). About to go crazy myself...
Anyway, i think I found your problem - your marker looks like this below, yeah?
__
| |
|_|
/
This would make the pinpoint on the bottom left.
So the anchorX should be 0
Is this a view in a block or a straight gmap module? The size of the map rendering is not the same as the block.
Nice site btw - :) you've done a great job breaking out from the drupal box.
Comment #14
spasmody commentedok baaj, it seems to be better now since I reestablished the widths (which are the same). Thank you very much. But it remains a problem for auth. The marker problem is fixed for anon but it is still not visible for auth. Obviously the permissions are similar. It's strange.
Comment #15
johnvClosing this very old issue. Please reopen if it is still valid.
Comment #16
arsalan2411 commentedI was trying to show GMap on a node inside quick-tab. A specific quick tab was supposed to shows Google Map, but it was mis-behaving as:
1- Marker was not center aligned.
2- Map does not show up by default, rather it shows up upon page inspect.
I fixed it (sort of hard coded it) by getting appending quick-tab id to URL on click. It solved both of the above mentioned problems.
I found a useful tip at https://www.drupal.org/node/2038651