kkpowar / gmaps-utility-library-dev

Automatically exported from code.google.com/p/gmaps-utility-library-dev
0 stars 0 forks source link

LabeledMarker click event does not pass thru click coordinates #73

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
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.

Original issue reported on code.google.com by Nekroman...@gmail.com on 27 Oct 2008 at 6:22

GoogleCodeExporter commented 8 years ago
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? :)

Original comment by pamela.fox on 27 Oct 2008 at 6:26

GoogleCodeExporter commented 8 years ago
I already created a patch for the file myself in the current project. Should I 
just 
send you the changes?

Original comment by Nekroman...@gmail.com on 27 Oct 2008 at 9:11

GoogleCodeExporter commented 8 years ago
You can attach a file (the diff) to this bug.

Original comment by pamela.fox on 29 Oct 2008 at 1:42

GoogleCodeExporter commented 8 years ago
Nekro, did you attach the fix? or mail the fix? 

Original comment by bbr...@gmail.com on 3 Nov 2008 at 8:12

GoogleCodeExporter commented 8 years ago
Sorry that it took so long.

Here it is. Let me know if you experience any problems.

Original comment by Nekroman...@gmail.com on 3 Nov 2008 at 10:22

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks for the reply :)

Original comment by bbr...@gmail.com on 4 Nov 2008 at 7:34

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Oh sure, no problem :)

Original comment by Nekroman...@gmail.com on 4 Nov 2008 at 4:55

GoogleCodeExporter commented 8 years ago
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

Original comment by s.n.usha...@gmail.com on 30 Nov 2008 at 4:59

GoogleCodeExporter commented 8 years ago
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

Original comment by Nekroman...@gmail.com on 30 Nov 2008 at 8:45

GoogleCodeExporter commented 8 years ago
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

Original comment by s.n.usha...@gmail.com on 2 Dec 2008 at 8:36

Attachments:

GoogleCodeExporter commented 8 years ago
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.

Original comment by Nekroman...@gmail.com on 2 Dec 2008 at 5:33

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks Sebastian, great!

Please watch the continuation in the story about label visibility :)

Original comment by s.n.usha...@gmail.com on 3 Dec 2008 at 5:54

GoogleCodeExporter commented 8 years ago
No problem ;)

I will!

Original comment by Nekroman...@gmail.com on 3 Dec 2008 at 4:29

GoogleCodeExporter commented 8 years ago

Original comment by pamela.fox on 26 Dec 2008 at 10:33