MarkerManager

86 views
Skip to first unread message

AF

unread,
Nov 25, 2011, 11:23:38 AM11/25/11
to google-map...@googlegroups.com
If I add a marker 'dragend' event handler in addMarkerBatch_ of the markermanager which pops up a message box sometimes it gets called twice when I have dragged a marker. Whether or not I get one or two callbacks seems to be dependant on the current zoom level ( >=5 I get two message boxes output ). This call of the event handler twice has implications later on for me. Why is the event handler being called twice sometimes? Thanks in advance.
 

Marcelo

unread,
Nov 26, 2011, 10:58:08 AM11/26/11
to Google Maps JavaScript API v3
On Nov 25, 9:23 am, AF <afils...@serif.com> wrote:

> Why is the event handler being called twice sometimes?

Probably because you're doing something wrong. How can we know?

--
Marcelo - http://maps.forum.nu
--

AF

unread,
Nov 26, 2011, 12:02:26 PM11/26/11
to google-map...@googlegroups.com
Some people on this forum write helpful insightful responces to questions some just respond with the first thing that pops into their head, I thought the question was clear enough, there is no telling what confuses people though, I will try again:
 
If I add a marker 'dragend' event handler in addMarkerBatch_ of the markermanager, then do nothing except create an instance of a map, an instance of the (modified) markermanager and add a single marker to the markermanager the event handler may be called once or twice depending on the current map zoom level.
 
Any ideas why this is the case? ( Marcelo if you dont have any helpful comments dont waste your time and my time replying )

Andrew Leach

unread,
Nov 26, 2011, 12:22:29 PM11/26/11
to google-map...@googlegroups.com

I'll do it instead. How can we know why this is the case? We don't
know anything about your implementation, which is why the posting
guidelines (you did read them? Perhaps not) ask for a link rather than
a listing or a description.

It's FAR easier to see what's going on with a link, because something
like Firebug allows break points to be set and variables to be
examined. That's very difficult to do with a listing, and impossible
with a description.

You've described the problem: now please supply a demonstrator which
can be debugged.

Pil

unread,
Nov 26, 2011, 12:41:12 PM11/26/11
to Google Maps JavaScript API v3

On Nov 26, 6:02 pm, AF <afils...@serif.com> wrote:

> Any ideas why this is the case? ( Marcelo if you dont have any helpful
> comments dont waste your time and my time replying )

I have an additional wish:

Please do not complain about wasting your time because posts like
yours forces a complete staff of voluntary helpers to waste their
time. (I assume that no one of the helpers is a clairvoyant.)


AF

unread,
Nov 26, 2011, 12:57:00 PM11/26/11
to google-map...@googlegroups.com, andrew....@gmail.com
I'll do it instead. How can we know why this is the case? We don't know anything about your implementation -  I thought only people with an insight into the markermanager would bother spending time replying, like I stated previously my implementation is the stock code with an event handler for the marker 'dragend' event in addMarkerBatch_ that outputs a message using alert, that is the entirety of my implmention for the testbed I am using to investigate this error.
 
posting guidelines (you did read them? Perhaps not) ask for a link rather than a listing or a description - Yes I have read them, you have incorrectly come to the conclusion there is a link to give, thats why I gave the full and verbose description above.
 
I suppose its the fundamental problem with forums open to people who have knowledge/insight and others, genuine questions will sometimes attract the attention of people with knowledge/insight and result in a helpful resolution to the problem, but sometimes questions will attract the attention of others who just produce noise. If I can not fix the markermanager provided by google I will write my own, thanks Marcelo and Andrew you have been equally helpful.

AF

unread,
Nov 26, 2011, 1:00:43 PM11/26/11
to google-map...@googlegroups.com
Nothing like a band wagon, quick lets jump on it. Its amazing how quickly a question on a forum leaves the subject matter and just becomes noncence. I can see why you volunteer your skills though, very helpful.

Andrew Leach

unread,
Nov 26, 2011, 1:31:57 PM11/26/11
to google-map...@googlegroups.com
On 26 November 2011 17:57, AF <afil...@serif.com> wrote:
> I will write my own, thanks Marcelo and
> Andrew you have been equally helpful.

Always pleased to be of service.

http://catb.org/~esr/faqs/smart-questions.html#not_losing (in fact all
of that is well worth reading)

Marcelo

unread,
Nov 26, 2011, 1:44:06 PM11/26/11
to Google Maps JavaScript API v3
On Nov 26, 10:57 am, AF <afils...@serif.com> wrote:
>
> I suppose its the fundamental problem with forums open to people who have
> knowledge/insight and others, genuine questions will sometimes attract the
> attention of people with knowledge/insight and result in a helpful
> resolution to the problem, but sometimes questions will attract the
> attention of others who just produce noise. If I can not fix the
> markermanager provided by google I will write my own, thanks Marcelo and
> Andrew you have been equally helpful.


I suppose that 14,000 replies from Andrew, Pil and myself combined, in
the V2 and V3 groups over the past 6 years, are just "noise". Wow!
Noisy groups! ;-)

AF

unread,
Nov 26, 2011, 1:48:39 PM11/26/11
to google-map...@googlegroups.com, andrew....@gmail.com
Andrew not one of your replies have had anything to do with the subject matter, surely you are not replying with this rubbish just to inflate your ego, I thought you were better than that Andrew, nice to hear from you again though.

AF

unread,
Nov 26, 2011, 1:50:26 PM11/26/11
to google-map...@googlegroups.com
Again, nothing to do with the subject matter but thanks again, you three must be what keeps Google profitable, you go guys, keep it real.

davie strachan

unread,
Nov 26, 2011, 4:06:41 PM11/26/11
to Google Maps JavaScript API v3
In reply to your origonal post it maybe an echo?
As said in an earlier post a link (demo) as none of us are
clairvoyants

Regards Davie

Rossko

unread,
Nov 26, 2011, 5:46:41 PM11/26/11
to Google Maps JavaScript API v3
Try this one :
http://groups.google.com/group/google-maps-js-api-v3/browse_thread/thread/53ecf3b55950ff21/1e01076a8e16f32c

Clear description of the problem, but unsolveable without a link.

But given a link, solved in one hit; not even by brilliance just a
second-pair-of-eyes.

henry cox

unread,
Nov 26, 2011, 1:46:27 PM11/26/11
to google-map...@googlegroups.com
Good Apples,

Lets not let one bad one spoil us. 

--
You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group.
To post to this group, send email to google-map...@googlegroups.com.
To unsubscribe from this group, send email to google-maps-js-a...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.


Chris Broadfoot

unread,
Nov 26, 2011, 6:57:53 PM11/26/11
to google-map...@googlegroups.com
Great example, Rossko.

AF,
I can see from your previous postings to the group that forum regulars have asked you each time to provide a link, as per the posting guidelines*.

I can also attest to the fact that when provided with a link, almost every problem or question I've seen on the group has been resolved. The guidelines are there for a reason - to help us help you!

If you can't share your complete implementation, please do try to boil this particular problem down to a reproducible test case. You can use a site like jsfiddle to host the code.

Cheers
Chris

Andrew Leach

unread,
Nov 26, 2011, 7:09:19 PM11/26/11
to google-map...@googlegroups.com

OK... I don't remember anyone reporting a similar issue. Presumably
you've searched the group and not found anything, which is why you
posted.

You asked, "Why is the event handler being called twice sometimes?"
It's entirely possible that you have found a bug in the marker
manager; it's also possible that you have made a mistake in your code.
Or, something in your code is triggering behaviour which can be
avoided by doing it differently. There's not really any way of
determining which of those possibilities obtains, given only a
description.

The issue we have in trying to help is that you have added an event
handler into the standard Google module (if I understand your
description correctly) which means that it's no longer what Google
wrote. And if we felt strongly enough to follow your example and
expend time and energy adding such a handler ourselves, hosting it and
trying it out, there's no guarantee that we will do what you did.

AF

unread,
Nov 27, 2011, 6:34:34 AM11/27/11
to google-map...@googlegroups.com, andrew....@gmail.com
I have discovered/fixed the problem, it was within the stock google markermanager code. Its a shame that the people who felt the need to ( unnecessarily ) reply to this post with guff have been have been such a distraction from solving the problem, still you live and learn, I wont be using the forum again to post problems or more importantly solutions. Bye bye.
 
PS: If you feel the need to reply to a question without having the answer in the future take a deep breath, have a read from the link below, and think am I being constructive? 
 

AF

unread,
Nov 27, 2011, 6:42:15 AM11/27/11
to google-map...@googlegroups.com
As said in an earlier post a link is/was not available but I thought the desription(s) should have been enough to get some cunstructive comments going backwards and forwards, still I have solved the problem ( see reply to andrews post ), as far as clairvoyancy goes I have a sense you are going to make it big in the music industry, adios amigo.

AF

unread,
Nov 27, 2011, 6:44:22 AM11/27/11
to google-map...@googlegroups.com
Not specific to my original problem ( if I can remember that far back it seems so long ago now ), anyway problem is solved. Tallyho.

AF

unread,
Nov 27, 2011, 6:45:46 AM11/27/11
to google-map...@googlegroups.com
Thanks for the comment chris, the problem is solved now, a sensible reply is always welcome. Cheers.
 

AF

unread,
Nov 27, 2011, 6:48:29 AM11/27/11
to google-map...@googlegroups.com
Wow we really have gone off topic now, we are no longer talking about an api, or even computers in general, we are now talking about apples, hhhhmmmmm, apples.

geoco...@gmail.com

unread,
Nov 27, 2011, 8:34:09 AM11/27/11
to Google Maps JavaScript API v3
On Nov 27, 3:34 am, AF <afils...@serif.com> wrote:
> I have discovered/fixed the problem, it was within the stock google
> markermanager code.

Perhaps you could post the issue and its resolution on the relevant
issues list:

http://code.google.com/p/google-maps-utility-library-v3/issues/list

(so it gets fixed)

-- Larry

> Its a shame that the people who felt the need to (
> unnecessarily ) reply to this post with guff have been have been such a
> distraction from solving the problem, still you live and learn, I wont be
> using the forum again to post problems or more importantly solutions. Bye
> bye.
>
> PS: If you feel the need to reply to a question without having the answer
> in the future take a deep breath, have a read from the link below, and
> think am I being constructive?
>

> *http://catb.org/~esr/faqs/smart-questions.html#not_losing*<http://catb.org/~esr/faqs/smart-questions.html#not_losing>

davie

unread,
Nov 28, 2011, 6:19:12 AM11/28/11
to Google Maps JavaScript API v3
I doubt this poster will post the issue and its resolution on the
issue list.
He probably found out the error was in his own code.
He didn't even understand the rational of his own link
http://catb.org/~esr/faqs/smart-questions.html#not_losing

Regards Davie

On Nov 27, 1:34 pm, "geocode...@gmail.com" <geocode...@gmail.com>
wrote:

Reply all
Reply to author
Forward
0 new messages