Creating an interactive legend

27 views
Skip to first unread message

Linn Davis

unread,
Oct 9, 2013, 3:16:17 PM10/9/13
to shareab...@googlegroups.com
Hey all,

Well, I'm all set up now, and I'm now moving on to my list of things to get creative with as far as Shareabouts goes. And tops on the list is this:

I'd love to be able to create an interactive legend in place of the ticker -- a legend that not only shows what the various icons on the map mean, but one where you can click a checkbox next to each icon in the legend and hide or show all the places of that type on the map. And eventually -- since my project uses a dozen or so place types -- I'd plan to add "select all" and "select none" buttons above the legend that would select or deselect all of these checkboxes with one click.

I've been digging around in the files trying to figure out how I might do this, but I thought maybe one of you would at least have suggestions on where I should be looking, or how such a feature would fit into the Shareabouts architecture?

In fact, it appears there may be a built-in way to create a static legend in Shareabouts already? If that's the case, I'd love to know where to look for that as well.

Of course, I'll share any code I write back with the project.

Thanks, as always. My site, if you're curious, is in its current form here: http://ciity.org

Cheers,
Linn

Frank Hebbert

unread,
Oct 9, 2013, 3:39:51 PM10/9/13
to shareab...@googlegroups.com
You can put the location_type into your url, e.g. http://ciity.org/parks shows just places with location_type "parks". 

So, knowing this, you can create static html and put it into your sidebar as a legend. It won't quite do what you're describing with checkboxes, e.g. you can't see Parks and Water but no transit. 

Frank


--
-- --
Shareabouts Developers group.
Unsubscribe: https://groups.google.com/d/forum/shareabouts-dev?hl=en
---
You received this message because you are subscribed to the Google Groups "Shareabouts Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shareabouts-d...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Frank Hebbert
OpenPlans | http://openplans.org | 720 432-2378 | @fkh

Linn Davis

unread,
Oct 9, 2013, 5:26:38 PM10/9/13
to shareab...@googlegroups.com
Frank,

Thanks for the tip -- I think that'll work just fine for now. Hmm.. perhaps I could create a legend with radio buttons next to each icon that just link to the appropriate URL when clicked (using simple javascript). Well, at any rate, I think that'll work well. And Aaron send me a tip on how to insert static HTML in the index doc, so I should be good there.

Thanks!
Linn
Reply all
Reply to author
Forward
0 new messages