I haven't tested this and am not very experienced with polylines, but
one method might be to change their opacity to 0 when you want to
hide
them. As for checkboxs (I think OP means inside the same page - but
outside the map div) thats simple HTML/Javascript. Add a checkbox
input type, and give it a function to call, e.g. <input
type="checkbox" onClick="checkboxClick()">. Then make that function
alter the opacity of the polyline based on the state of the checkbox.
function checkboxClick() {
if (document.getElementById("checkboxID").checked) {
poly.setOptions({strokeOpacity: 0})
} else {
poly.setOptions({strokeOpacity: 1.0})
};
Its probably not the most elegant solution but worth a try. Let us
know how if this works.
On Aug 3, 5:24 pm, Dmitry Mishchenko <[email protected]>
wrote:
> Hi,
> you mean something like from different ifame? It is possible, just
> make sure that map reference is available on the page where your
> checkboxes are. Inside your checkboxes click event toggle your
> polylines using that reference and somekind of polyline's id.
>
> I think there were some redlining examples somewhere which could help
> you.
>
> On Aug 1, 1:33 pm, Ricky <[email protected]> wrote:
>
>
>
> > Hi,
>
> > What I would like to do is use HTML checkboxes outside a googlemap to
> > toggle polylines within the google map.
>
> > Is the such possible? If so, how?
>
> > Thanks,
> > Ricky- Hide quoted text -
>
> - Show quoted text -
--
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 [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-js-api-v3?hl=en.