Hi everyone, I'm trying to build a map of trails around St. Louis.

I'm using an XML file to hold all the trail/marker/map data. For each
marker, I have categories like "surface," "difficulty," "facilities,"
etc.

Some of these categories will have only one possible value for any
given trail. For example, a trail allows pets or it doesn't.

But in other categories, a trail might have several values in one
category. For example, a trail might have bathrooms, fountains, AND
food as "facilities."

So, ultimately I want this page to display a grid of six categories,
with all possible values (and checkboxes) under each category. In this
way, a user could check what features he/she is interested in a trail
having. Then the map would update to show all trails that have these
features, and hide those that don't.

The fact that elements can have multiple values introduces some
complexity.

I've got to say that I am new to Google Maps, javascript, and XML, and
I may have bitten off more than I can chew. But after working on this
for a while, I have made some progress.

My first example page is here: 
http://www.joshrenaud.com/pd/trails_withcheckboxes.html

It only implements one category (surface), and only partially.

It builds off this example: 
http://www.geocodezip.com/v3_MW_example_categories.html

It's a little wonky. When the page loads, it doesn't show/hide the
markers the way I have specified in Javascript. (Only "asphalt" should
be checked after the page loads).

It does seem to work okay after page load. Once you start checking/
unchecking the various surface attributes, the markers DO hide/show.

Yet, I can see this approach is probably all wrong. One of the markers
on the map has both "paved" and "unpaved" values. Unchecking "unpaved"
while leaving "paved" checked causes the marker to disappear, and
that's not ultimately what I want to happen. If a trail has *any* of
the checked characteristics, I want it to show up.

Sorry for the long post. Here's what I'm hoping:

1. That someone can explain why the checkmarks don't get set the way I
want them to when the page loads. I want to know what I did wrong
there.

2. That someone can suggest a different approach for achieving the
"grid of categories" I describe above. My gut is telling me that the
show/hide I'm building off of won't do it.

Thanks in advance for any help/advice anyone can offer.

--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.

Reply via email to