I know you can toggle visibility of markers using google api, but is it possible to toggle the visibility of a polyline using an html checkbox?
Basically, I have a polyline and if the checkbox is checked, I want the polyline visible, and if it is unchecked, I want it hidden. Is this possible?
You toggle the visibility of a polyline the same way you do a marker.
To display it again, call the setMap method with a reference to your google.maps.Map object.
documentation
setMap(map:Map) – Renders this shape on the specified map. If map is set to null, the shape will be removed.