Re: add/remove marker from an external (non map) onclick event
Larry
my intent is to allow multiple markers on the map at the same time. i
want the onclick event of a give lat,lng pair to toggle that specific
marker.
Jeff
On Dec 1, 11:03 pm, "geocode...@gmail.com" <geocode...@gmail.com>
wrote:
> On Dec 1, 7:55 pm, "geocode...@gmail.com" <geocode...@gmail.com>
> wrote:
>
>
>
> > On Dec 1, 7:28 pm, "affili...@digitalmedia-llc.net"
>
> > <affili...@digitalmedia-llc.net> wrote:
> > > the map can be found athttp://cert.digitalmedia-llc.net/clients/FLVacations_info/florida-des....
>
> > > i am trying to create a toggle affect, where an onclick event will
> > > create the marker and a second onclick event will remove the marker. i
> > > cant figure out how to implement the removeOverlay method to remove
> > > the marker once it has been plotted.
>
> > I get a javascript error on that page in IE6:
> > Line: 15
> > Error: Object doesn't support this property or method
>
> > on this line:
> > map = new GMap2(document.getElementById('map'));
>
> > because you didn't declare your map variable (for IE you need a "var
> > map" somewhere for javascript variables that have the same name as
> > divs in the DOM).
>
> > You probably want to make it global.
>
> Your marker variable should also be a GMarker, not a GLatLng, and will
> may need to be global as well. Is your map only going to show one
> marker at a time? If they click on a different one, should the old
> marker disappear and the new one appear?
>
> -- Larry
>
>
>
> > -- Larry
--
You received this message because you are subscribed to the Google Groups "Google Maps API" group.
To post to this group, send email to google-maps-api@googlegroups.com.
To unsubscribe from this group, send email to google-maps-api+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-api?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home