Christopher Weddell wrote:
> I am really enjoying working with Exhibit, and expanded my use of it 
> to include larger data sets (which for me is 1,000+).
> So that the map does not become overcluttered data is 'grouped' to the 
> same latlng value on a per country basis - which looks very good.
> Instead of providing the balloon of information when someone clicks on 
> a marker could it filter?  If not could the balloon be suppressed - 
> thereby forcing users to use the other facets?
> Here is a link to my work in progress: 
> http://cjw.me.uk/kiva/testcombined.htm

It's not easy to do that... here's a somewhat dirty hack around it 
(which might break later on):

Give the Country facet an ID:

    <div ex:role="facet" ex:expression=".Country" 
ex:facetLabel="Country" ex:showMissing="false" id="the-country-facet"></div>

Then add this code after you include all the exhibit .js stuff:

    <script>
    Exhibit.MapView.prototype._createInfoWindow = function(items) {
        window.setTimeout(function() {
            var countries = database.getObjectsUnion(items, "Country");
            var facet = exhibit.getComponent("the-country-facet");
            var oldRestrictions = { selection: 
facet._valueSet.toArray(), selectMissing: facet._selectMissing };
            var newRestrictions = { selection: countries.toArray(), 
selectMissing: false };
            SimileAjax.History.addLengthyAction(
                function() { facet.applyRestrictions(newRestrictions); },
                function() { facet.applyRestrictions(newRestrictions); },
                "clicked on map"
            );
        }, 200);

        return Exhibit.ViewUtilities.fillBubbleWithItems(
            null,
            items,
            this._uiContext
        );
    };
    </script>


David

_______________________________________________
General mailing list
[email protected]
http://simile.mit.edu/mailman/listinfo/general

Reply via email to