Disabling POI's InfoWindows - workaround found

2,220 views
Skip to first unread message

blaaah

unread,
Dec 3, 2011, 9:08:40 AM12/3/11
to Google Maps JavaScript API v3
There have been some discussions how to disable POIs infoWindows while
keeping POIs disabled (disable POIs completely can be easily done
using layer styling). There's been solution found recently!!

http://stackoverflow.com/q/7950030/684229#8361698

blaaah

Chris Broadfoot

unread,
Dec 4, 2011, 7:35:18 PM12/4/11
to google-map...@googlegroups.com
Hi Tomas,

Just a couple things:
1. Use addListenerOnce, the event listener will only be fired the first time event is fired after you add the listener.
2. As you said, this technique is very susceptible to breaking changes by the API.
3. Does this not cause a flash between when the info window is displayed, and when your code hides it?

For those that don't want the info windows to show when poi icons are clicked, can I ask why? It would be good to get an idea of your use case - it helps when we are prioritising development of new features.

In particular, why you'd like to show icons but no info windows - beware this may potentially confuse your users, who are accustomed to being able to get information about a place by clicking its business icon.

Cheers
Chris

blaaah

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


geoco...@gmail.com

unread,
Dec 4, 2011, 8:31:16 PM12/4/11
to Google Maps JavaScript API v3
On Dec 4, 4:35 pm, Chris Broadfoot <c...@google.com> wrote:
> Hi Tomas,
>
> Just a couple things:
> 1. Use addListenerOnce, the event listener will only be fired the first
> time event is fired after you add the listener.
> 2. As you said, this technique is very susceptible to breaking changes by
> the API.
> 3. Does this not cause a flash between when the info window is displayed,
> and when your code hides it?
>
> For those that don't want the info windows to show when poi icons are
> clicked, can I ask why?

For maps I like to only have one infowindow showing at a time (just
like google maps does). There is no way currently for me to close
mine when a POI infowindow opens, for me to close the POI infowindows
when my infowindow opens, or for me to prevent the POI infowindows
from opening without reducing the number of free map loads by using a
styled map.

-- Larry

> It would be good to get an idea of your use case -
> it helps when we are prioritising development of new features.
>
> In particular, why you'd like to show icons but no info windows - beware
> this may potentially confuse your users, who are accustomed to being able
> to get information about a place by clicking its business icon.
>
> Cheers
> Chris
>

> --http://twitter.com/broady

Marcelo

unread,
Dec 4, 2011, 8:38:37 PM12/4/11
to Google Maps JavaScript API v3
On Dec 4, 5:35 pm, Chris Broadfoot <c...@google.com> wrote:
>
> For those that don't want the info windows to show when poi icons are
> clicked, can I ask why? It would be good to get an idea of your use case -
> it helps when we are prioritising development of new features.
>
> In particular, why you'd like to show icons but no info windows - beware
> this may potentially confuse your users, who are accustomed to being able
> to get information about a place by clicking its business icon.

I don't decide that sort of thing, my clients do. :-)
I haven't been asked to do it so far, but I can imagine a case in
which a business owner would want to minimize the amount of
information that his map shows about his competitors, and since the
business POIs cannot be removed selectively according to business
type, he might want to suppress the infoWindows instead.

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

>
> Cheers
> Chris
>
> --http://twitter.com/broady

Nianwei Liu

unread,
Dec 5, 2011, 6:15:38 AM12/5/11
to Google Maps JavaScript API v3
Infowindow can be a distraction at times. Also, if the UI design has
changed from the default, say, in a iPhone style by using custom info
windows overlay like the infoBubble, that default window will not
fit.
A very reasonable solution would be follow the path of
fusiontableslayer, in which case you can suppressInfoWindow, but
choose actions based on the data available in the click event.


On Dec 4, 7:35 pm, Chris Broadfoot <c...@google.com> wrote:
> Hi Tomas,
>
> Just a couple things:
> 1. Use addListenerOnce, the event listener will only be fired the first
> time event is fired after you add the listener.
> 2. As you said, this technique is very susceptible to breaking changes by
> the API.
> 3. Does this not cause a flash between when the info window is displayed,
> and when your code hides it?
>
> For those that don't want the info windows to show when poi icons are
> clicked, can I ask why? It would be good to get an idea of your use case -
> it helps when we are prioritising development of new features.
>
> In particular, why you'd like to show icons but no info windows - beware
> this may potentially confuse your users, who are accustomed to being able
> to get information about a place by clicking its business icon.
>
> Cheers
> Chris
>

> --http://twitter.com/broady

Andrew Leach

unread,
Dec 5, 2011, 6:45:16 AM12/5/11
to google-map...@googlegroups.com
On 5 December 2011 00:35, Chris Broadfoot <cb...@google.com> wrote:
>
> For those that don't want the info windows to show when poi icons are
> clicked, can I ask why? It would be good to get an idea of your use case -
> it helps when we are prioritising development of new features.
>
> In particular, why you'd like to show icons but no info windows - beware
> this may potentially confuse your users, who are accustomed to being able to
> get information about a place by clicking its business icon.

My maps have a specific purpose -- to locate churches (from our own
database) and show information about them.

POI icons might be useful to provide a point of reference on the map,
but they are a distraction if they are active.

They are not active in the existing version 2 map, and so if and when
these are converted to Version 3 making them active may well confuse
users, who are accustomed to the icons' not being interactive.

This is one of the stumbling-blocks over conversion to Version 3. I've
no reservations in principle about conversion to Version 3, but major
detrimental changes to functionality need to be addressed. I need the
Version 3 maps to behave like Version 2 (apart from acceptable
cosmetic effects like square corners in infoWindows).

Reply all
Reply to author
Forward
0 new messages