Seeking help to create toggle views of `kml` data in Google Maps

Hi Aaron.

Here’s a quick 3-minute tweak to get your map working:

It breaks things out into separate cells, and uses the “checkbox” input from the bazaar to provide a quick way to turn a set of HTML checkboxes into a reactive array of JS values.

Then we just need a cell (in this case, setRoutes) that observes the array of routes, and calls setMap() on each layer whenever the array is updated.

Cheers.

2 Likes