how to remove listener click when zoom < 9 and unvisible keydragzoom in zoom > 9?

59 views
Skip to first unread message

gunk

unread,
Jan 16, 2011, 9:59:02 PM1/16/11
to google-map...@googlegroups.com
hi,. new try google map api v3,.
this my map i try http://gunkm.brinkster.net/
in my map, default show all control + keydragzoom left bottom and the marker show small.
the marker when show small, by default no have click event.
when zoom in until 9, the marker show large and have click.
and now i have problem:
1. when user zoom out < 9 again (user was zoom in until 10), the marker  have event click, i want event click is revome, how make it?
2. when user zoom in until 10 or more, the key dragzoom not show again, how make it?

note: I've been using removeListener in event zoom_Changed (not work).

thanks,
regards,. 

geoco...@gmail.com

unread,
Jan 16, 2011, 10:06:49 PM1/16/11
to Google Maps JavaScript API v3
On Jan 16, 6:59 pm, gunk <gnkmahendr...@gmail.com> wrote:
> hi,. new try google map api v3,.
> this my map i tryhttp://gunkm.brinkster.net/
> in my map, default show all control + keydragzoom left bottom and
> the marker show small.
> the marker when show small, by default no have click event.
> when zoom in until 9, the marker show large and have click.
> and now i have problem:
> 1. when user zoom out < 9 again (user was zoom in until 10), the
> marker  have event click, i want event click is revome, how make
> it?
> 2. when user zoom in until 10 or more, the key dragzoom not show
> again, how make it?

Sounds like something markermanager would be good for (create a set of
markers for <=9 with click listeners and a set of markers for >9
without click listeners).

Have you looked at that?
http://google-maps-utility-library-v3.googlecode.com/svn/tags/markermanager/1.0/docs/reference.html
http://google-maps-utility-library-v3.googlecode.com/svn/tags/markermanager/1.0/docs/examples.html

-- Larry

gunk

unread,
Jan 16, 2011, 10:19:33 PM1/16/11
to google-map...@googlegroups.com
yes i ve try markermanager, maybe dont know how to used it,..
please look my code and problem, i thinks  that is my algorthm,.
thanks,.
regards

geoco...@gmail.com

unread,
Jan 16, 2011, 10:54:50 PM1/16/11
to Google Maps JavaScript API v3
On Jan 16, 7:19 pm, gunk <gnkmahendr...@gmail.com> wrote:
> yes i ve try markermanager, maybe dont know how to used it,..

You aren't using it on the map to which you posted a link.

-- Larry

gunk

unread,
Jan 16, 2011, 11:05:56 PM1/16/11
to google-map...@googlegroups.com
yes i not use, but i try last before,..
and my problem not in marker but,
1. look my map : http://gunkm.brinkster.net and then zoom in until 10, i want control i left bottom key dragzoom not show in 10 zoom in and show again in zoom out.
2. if you zoom in until 10 or more click marker, you have display infowindow (thats work). now, zoom out and click marker smaal now! the infowindow still i show, that must not show in zoom < 9! how fix it?

i thing not marker manager. if this must marker manager, i dont know how to used.
why you not give solution in algorithm or what ex: snips code?
that help me,..
thanks,.

geoco...@gmail.com

unread,
Jan 17, 2011, 12:08:44 AM1/17/11
to Google Maps JavaScript API v3
On Jan 16, 8:05 pm, gunk <gnkmahendr...@gmail.com> wrote:
> yes i not use, but i try last before,..
> and my problem not in marker but,
> 1. look my map :http://gunkm.brinkster.netand then zoom in until
> 10, i want control i left bottom key dragzoom not show in 10 zoom
> in and show again in zoom out.

I don't use the keydragzoom. If I wanted to do that I would look at
the documentation to see if it supported it. If it does, then do what
it says in the documentation. If it doesn't, take a copy of the source
and modify it to do that and use your modified version.

> 2. if you zoom in until 10 or more click marker, you have display
> infowindow (thats work). now, zoom out and click marker smaal now!
> the infowindow still i show, that must not show in zoom < 9! how
> fix it?

Why not add code to check the zoom level in the click handler? Do
what it does now if the zoom level is < 9, otherwise don't do
anything...

>
> i thing not marker manager. if this must marker manager, i dont
> know how to used.

That is up to you. My take is that the markermanager is coded to do
what you are trying to do, why reinvent the wheel (but you do have to
learn how to use it...)

-- Larry

gunk

unread,
Jan 17, 2011, 12:31:22 AM1/17/11
to google-map...@googlegroups.com
ok thank for all :)
regards

geoco...@gmail.com

unread,
Jan 17, 2011, 12:57:40 AM1/17/11
to Google Maps JavaScript API v3
On Jan 16, 9:08 pm, "geocode...@gmail.com" <geocode...@gmail.com>
wrote:
> On Jan 16, 8:05 pm, gunk <gnkmahendr...@gmail.com> wrote:
>
> > yes i not use, but i try last before,..
> > and my problem not in marker but,
> > 1. look my map :http://gunkm.brinkster.netandthen zoom in until
> > 10, i want control i left bottom key dragzoom not show in 10 zoom
> > in and show again in zoom out.
>
> I don't use the keydragzoom.  If I wanted to do that I would look at
> the documentation to see if it supported it.  If it does, then do what
> it says in the documentation. If it doesn't, take a copy of the source
> and modify it to do that and use your modified version.
>
> > 2. if you zoom in until 10 or more click marker, you have display
> > infowindow (thats work). now, zoom out and click marker smaal now!
> > the infowindow still i show, that must not show in zoom < 9! how
> > fix it?
>
> Why not add code to check the zoom level in the click handler?  Do
> what it does now if the zoom level is < 9, otherwise don't do
> anything...
>
>
>
> > i thing not marker manager. if this must marker manager, i dont
> > know how to used.
>
> That is up to you.  My take is that the markermanager is coded to
> do what you are trying to do, why reinvent the wheel (but you do
> have to learn how to use it...)
Here is your example using marker manager:
http://www.geocodezip.com/gunkm_brinkster_B.html

(it is pretty unusable in IE6, as is your version, but I'm not sure if
you should care...)

-- Larry

gunk mahendra

unread,
Jan 17, 2011, 9:08:35 PM1/17/11
to google-map...@googlegroups.com
thats work thanks but its so slowly,.. 
what you thing? why this is  can be slow?


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


gunk mahendra

unread,
Jan 22, 2011, 12:00:08 AM1/22/11
to google-map...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages