John Stefany wrote:
> We are trying to coordinate side-by-side map and table views in
> Exhibit so that when a user clicks on an item in the table, the map
> pans to the corresponding marker and displays the item's bubble.
> Conversely, clicking a map marker would open its bubble as well as the
> corresponding bubble in the table: 
> http://ww2.startribune.com/projects/maps/test/fair_food.html
>   
This is not supported natively, but you can hack it in with some 
Javascript. Use a row template inside the tabular view and hook in a 
click event

<div ex:role="view" ex:viewClass="Tabular"...>
    <table>
       <tr>
          <td><span onclick="syncMap(this);" ex:itemID-content="value" 
ex:content="value"></span></td>
          <td><span ex:content=".description"></span></td>
       </tr>
    </table>
</div>

Give the map view an ID

<div ex:role="view" ex:viewClass="Map" id="the-map-view"...></div>

And add this bit of Javascript
<script>
    function syncMap(elmt) {
       window.exhibit.getComponent("the-map-view")._select({ itemIDs: [ 
elmt.getAttribute("itemID") ] });
    }
</script>

> Has anyone achieved this using a coordinator? The behavior we are
> seeking is similar to the timeline-map coordination in the Simile
> presidents example (http://simile.mit.edu/exhibit/examples/presidents/
> presidents-2.html).
>
> A related issue is how to control the width of map bubbles. Because
> the two views are not coordinated currently, we need to repeat the
> longish item description in both the table and map bubbles. The
> "bubbleWidth" property controls the width of the table's bubbles lens,
> but that property does not appear to be supported for map lens
> bubbles, which default to about 650px when they include wrapping text.
> For Firefox users, we can add a style="width:300px;" parameter in the
> lens div, but, unfortunately, IE does not honor this.
>   
Those map bubbles are controlled by Google Maps, actually. By the way, 
instead of setting style="width:300px", it's better to set a CSS class 
class="foo" and then configuring that

    .foo {
       width: 300px;
    }

I think IE will honor that.

David


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"SIMILE Widgets" 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/simile-widgets?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to