Thanks for replying, guys. Today I was able to get a version working that does what I describe above. You can see it here: http://www.joshrenaud.com/pd/trails_withcheckboxes3.html
Here's what I did: Instead of using "show" when a user checks a box and "hide" when they uncheck a box, I call the "show" function for any click on a checkbox. Within the show() function, I first hide() all markers, which in effect resets the map. Then I loop through all the categories and show any marker that matches any checked category. The issue I still can't solve is the same as #1 in my original post. I have seen other maps that, upon loading, will show only those markers as specified by the checked checkboxes. I have tried putting "show()" calls in various places. The one I thought should do it was right before the map.setZoom at the end. But nothing has worked. No matter what, the map always loads with ALL markers being displayed on the map. Once I start checking and unchecking the checkboxes, then everything works as expected. Anyone have insight into that? --Josh -- 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.
