| Issue 73: | LabeledMarker click event does not pass thru click coordinates | |
| 1 person starred this issue and may be notified of changes. | Back to list |
Sign in to add a comment
|
What steps will reproduce the problem? 1. Create a labeled marker with a click event listener that uses the coordinates given as parameters when called. 2. Click the marker itself 3. Click the label What is the expected output? What do you see instead? As you will see, when you press the label no coordinates are given. This is, because there are no coordinates sent. |
||||||||||||
,
Oct 27, 2008
That's true, the event was added to LabeledMarker before we added support for sending latlng in the JS API. Want to fix it and submit a patch? :)
Labels: Class-LabeledMarker
|
|||||||||||||
,
Oct 27, 2008
I already created a patch for the file myself in the current project. Should I just send you the changes? |
|||||||||||||
,
Oct 28, 2008
You can attach a file (the diff) to this bug. |
|||||||||||||
,
Nov 03, 2008
Nekro, did you attach the fix? or mail the fix? |
|||||||||||||
,
Nov 03, 2008
Sorry that it took so long. Here it is. Let me know if you experience any problems. |
|||||||||||||
,
Nov 03, 2008
Thanks for the reply :) |
|||||||||||||
,
Nov 04, 2008
Oh sure, no problem :) |
|||||||||||||
,
Nov 30, 2008
Hi Nekromanter, I've got occasionally involved into the discussion of this issue you have reported (please see http://groups.google.com/group/google-maps-utility-library/browse_thread/thread/2099a45b76dc6dbe/30c3af970e4f9d6d?hl=en#30c3af970e4f9d6d ). Pamela asked me if your patch could be incorporated into the new LabeledMarker version that's now in progress, and frankly I ended in certain hesitation. The reasons were two: 1) The new event handling/passing mechanism in LabeledMarker that is now more aligned with standard GEvent handling techniques is slightly different from the one that your patch is based upon, and I still do not feel enough comfortable with GEvent handling to refactor your patch. 2) The patch you've submitted suggests (if i'm not mistaken) that the coordinates supplied for the event are the ones of the mouse click point rather than the coordinates of the marker itself; so to that extent the marker label is considered separate from the marker, and the effect of clicking the label is similar to clicking the underlying map rather than clicking the marker. Is it really what is intended? If you really need mouse click point coordinates, maybe it would be better to intercept map events? Or if you prefer to have the marker coordinates then just ask the marker about them? Please kindly comment... Regards, Sergey |
|||||||||||||
,
Nov 30, 2008
Hi Sergey! I think you're right. I will look at this tomorrow and try to upload a new patch, that uses the markers coordinates. Sincerely, Sebastian / Nekromanter |
|||||||||||||
,
Dec 02, 2008
Hi Sebastian, I just thought that development svn repository has limited availability, so please find attached a copy of current development version of the code - just to be on the safe side... Regards, Sergey |
|||||||||||||
,
Dec 02, 2008
Hi Sergey, the change was really simple, I just had to add a call to this.getLatLng(). See the attached JS file for the solution. |
|||||||||||||
,
Dec 02, 2008
Thanks Sebastian, great! Please watch the continuation in the story about label visibility :) |
|||||||||||||
,
Dec 03, 2008
No problem ;) I will! |
|||||||||||||
,
Dec 26, 2008
(No comment was entered for this change.)
Status: Fixed
|
|||||||||||||
|
|
|||||||||||||