Hi,
Can someone throw me a hint how to customize the Tile view in exhibit? I want
to
show only a subset of the available item data.
--
I am using Exhibit to organize our community's holiday food basket delivery
program.
I'm sorry I can't publish a link to our Exhibit page, the contact information
is
confidential.
However here's what I've done.
1. I received a microsoft-works .wdb file with 438 contacts. Each contact has
name, address, city, zip, food basket size and telephone number.
2. I converted this file to .csv
3. I wrote a Python script that uses geopy to geocode the addresses, and
simplejson to write out the .js file
4. My .html file is shown below.
The things I need to do are:
1. customize the Tile view to show only a few elements from each item.
2. default to "non selected" when first loading the page so that no items are
shown.
3. in the map view, I would like to put a number into each marker, and also put
the number and some basic information about that item in the legend below the
map.
This way the print map view will be all self-contained and the delivery person
won't have to hand-write on the map which marker belongs to which contact
address.
As it is now, the volunteer driver has to click each marker to figure out which
contact it is, then write that back onto the black&white printed map.
Drivers won't have wireless laptops ;-)
We'll be adding a "route" element to each item, and use that to filter the
views
and print out "delivery packets" for each driver.
Exhibit sure has made this project easy!
----
Our .html file for those interested.
<html>
<head>
<title>Potsdam Holiday Fund Food Baskets</title>
<link href="fb2.js" type="application/json" rel="exhibit/data" />
<script
src="http://static.simile.mit.edu/exhibit/api/exhibit-api.js?gmapkey="redacted"
type="text/javascript"></script>
<style>
body {
margin: 1in;
}
</style>
</head>
<body>
<h1>Food Baskets Contacts</h1>
<table width="100%" >
<tr valign="top">
<td>
<div id="exhibit-control-panel"></div>
<div id="exhibit-view-panel">
<div ex:role="exhibit-view"
ex:viewClass="Exhibit.TabularView"
ex:columns=".label, .address, .city, .telephone,
.basket_size"
ex:columnLabels="name, address, city, telephone, basket
size"
ex:columnFormats="list, list, list, list, list, list"
ex:sortColumn="2"
ex:sortAscending="true">
</div>
<div ex:role="exhibit-view"
ex:viewClass="Exhibit.TileView"
ex:showAll="false"
ex:orders=".city, .basket_size"
ex:possibleOrders=".lastname, .city, .zip, .basket_size"
>
</div>
<div ex:role="exhibit-view"
ex:viewClass="Exhibit.MapView"
ex:latlng=".location"
ex:scaleControl="true"
ex:center="44.696,-75.085"
ex:size="600"
ex:zoom="12"
ex:marker=".label">
<div class="map-lens" ex:role="exhibit-lens">
<span ex:content=".label"></span><br/>
<span ex:content=".address"></span>, <span
ex:content=".city"></span><br />
Tel: <span ex:content=".telephone"></span> Basket:
<span ex:content=".basket_size"></span>
</div>
</div>
</div>
</td>
<td width="25%">
<div id="exhibit-browse-panel" ex:facets=".basket_size, .city,
.zip"></div>
</td>
</tr>
</table>
</body>
</html>
--
Brad Clements, [EMAIL PROTECTED] (315)268-1000
http://www.murkworks.com
AOL-IM or SKYPE: BKClements
_______________________________________________
General mailing list
[email protected]
http://simile.mit.edu/mailman/listinfo/general