Disable marker

978 views
Skip to first unread message

karlh

unread,
Dec 22, 2009, 4:45:52 PM12/22/09
to Google Maps JavaScript API v3
I have created a map and embedded in my page the generated code. The
map has only one marker, which I wish to be 'disabled', therefore not
acting on a click. Do I have to do all of the code, or just amend the
generated code? The map is to pop-up when the visitor clicks the
'Map' link. The maps than overlays the image underneath, until the map
is closed.

pete

unread,
Dec 22, 2009, 5:32:52 PM12/22/09
to Google Maps JavaScript API v3
Not knowing what this generated code looks like makes an accurate
answer nigh impossible.

However, there are two possible ways to achieve this either by
1. using the property setClickable(flag:boolean); //set to false
http://code.google.com/apis/maps/documentation/v3/reference.html#Marker

2. Remove the listener off the marker. It will look something similar
to this
google.maps.event.addListener(marker, "click", function()

Again, very hard to debug without your code or link.

Hope it helps

karlh

unread,
Dec 22, 2009, 5:56:26 PM12/22/09
to Google Maps JavaScript API v3
Thanks Pete. Here is a link to my website under test, where I use
Google Map on the home page. You will see that I have not included a
marker on Portobello Road, as I do not wish the visitor to be able to
click on it and proceed any further. It is there just to pinpoint the
street.
www.portobelloroad.org.uk
Any suggestions how I might be able do disable the marker, please?
Karl

On Dec 22, 10:32 pm, pete <petejun...@gmail.com> wrote:
> Not knowing what this generated code looks like makes an accurate
> answer nigh impossible.
>
> However, there are two possible ways to achieve this either by

> 1. using the property setClickable(flag:boolean); //set to falsehttp://code.google.com/apis/maps/documentation/v3/reference.html#Marker


>
> 2. Remove the listener off the marker. It will look something similar
> to this
> google.maps.event.addListener(marker, "click", function()
>
> Again, very hard to debug without your code or link.
>
> Hope it helps
>
> On Dec 23, 8:45 am, karlh <hev...@btinternet.com> wrote:
>
>
>
> > I have created a map and embedded in my page the generated code.  The
> > map has only one marker, which I wish to  be 'disabled', therefore not
> > acting on a click.  Do I have to do all of the code, or just amend the
> > generated code?  The map is to pop-up   when the visitor clicks the
> > 'Map' link. The maps than overlays the image underneath, until the map

> > is closed.- Hide quoted text -
>
> - Show quoted text -

karlh

unread,
Dec 22, 2009, 6:22:49 PM12/22/09
to Google Maps JavaScript API v3

On Dec 22, 10:56 pm, karlh <hev...@btinternet.com> wrote:
> Thanks Pete.  Here is a link to my website under test, where I use
> Google Map on the home page.  You will see that I have not included a
> marker on Portobello Road, as I do not wish the visitor to be able to
> click on it and proceed any further.  It is there just to pinpoint the
> street.www.portobelloroad.org.uk

You will see that I do have a API cade on the home page, but have not
made any use of it, so far, hoping that I might find an easier
solution.

> Any suggestions how I might be able do disable the marker, please?
> Karl
>
> On Dec 22, 10:32 pm, pete <petejun...@gmail.com> wrote:
>
>
>
> > Not knowing what this generated code looks like makes an accurate
> > answer nigh impossible.
>
> > However, there are two possible ways to achieve this either by
> > 1. using the property setClickable(flag:boolean); //set to falsehttp://code.google.com/apis/maps/documentation/v3/reference.html#Marker
>
> > 2. Remove the listener off the marker. It will look something similar
> > to this
> > google.maps.event.addListener(marker, "click", function()
>
> > Again, very hard to debug without your code or link.
>
> > Hope it helps
>
> > On Dec 23, 8:45 am, karlh <hev...@btinternet.com> wrote:
>
> > > I have created a map and embedded in my page the generated code.  The
> > > map has only one marker, which I wish to  be 'disabled', therefore not
> > > acting on a click.  Do I have to do all of the code, or just amend the
> > > generated code?  The map is to pop-up   when the visitor clicks the
> > > 'Map' link. The maps than overlays the image underneath, until the map
> > > is closed.- Hide quoted text -
>

> > - Show quoted text -- Hide quoted text -

Reply all
Reply to author
Forward
0 new messages