Project:GMap Module
Version:6.x-1.1-rc1
Component:Miscellaneous
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

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

#1

nobody?

#2

More 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.

#3

In my case the gmap window is the right one but the marker is on the top-left corner. Why?

#4

My 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?

#5

There 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

#6

indeed baaj here is the content of the file :

; Defaults
[defaults]
;shadow = ""
anchorX = 10
anchorY = 29
infoX = 17
infoY = 6

; Marker sets
[mymarker]
name = "mymarker"
sequence = "mymarker.png"

; Files

But I think these (default) settings are correct, isn't it?

#7

They'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.

#8

Yes, I can actually change the marker position, I found a good result with negative values:

; Defaults
[defaults]
;shadow = ""
anchorX = -80
anchorY = -80
infoX = 17
infoY = 6

; Marker sets
[mymarker]
name = "mymarker"
sequence = "mymarker.png"

; Files

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?

#9

Try 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

; Defaults
[defaults]
;shadow = ""
anchorX = 15
anchorY = 30

#10

So, 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?

#11

hmmm....
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?

; Marker sets
[blue]
name = "Blue"
sequence = "blue.png"

[gray]
name = "Gray"
sequence = "gray.png"

Try clearing your drupal cache also.

#12

hummmm,
it's better with these settings :

; Marker sets
[mymarker]
name = "mymarker"
sequence = "mymarker.png"
anchorX = 15
anchorY = 30
infoX = 17
infoY = 6

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...

#13

Re: 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.

#14

ok 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.