On Nov 5, 10:29 pm, iwotic <[email protected]> wrote: > I am a newbie in Google Maps API, I got a question about showing and > hiding a polylines. My goal is to click a checkbox, a polyline will > show up on the map. I got this part done. However, when I uncheck the > box, I want the line to disappear. I am not sure how I can do it. > After looking around, it seems like people use removeOverlay() > and .hide() function but I couldn't get it to work. > > Here is how the checkbox in my code work: > side_bar_html += '<form name=testform>130 East <INPUT TYPE="checkbox" > NAME="Item1" VALUE="1" onClick="javascript:myclick()"></form>'; > > in the myclick(), i have this: > var polyline = new GPolyline([new GLatLng(40.110484,-88.227189),new > GLatLng(40.110418,-88.228386), new GLatLng(40.11012,-88.228865)], > "#ff0000", 5); > map.addOverlay(polyline); > > This is something I want my check and uncheck box to > do:http://www.geocodezip.com/GenericMapBrowser.asp?filename=RiverWalk080... > > Can some one please help me?? What should I do? Thank you!!
My map works. A link to yours (that doesn't) might let me (or someone else) make a recommendation as to why yours doesn't. That is why the posting guidelines request a link to your map that shows the problem. -- 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-maps-api?hl=en.
