[fusion-users] How to Filter a Fusion layer

Rachot Moragraan moo at ci.garden-grove.ca.us
Thu Mar 22 18:14:50 EDT 2012


There may be an easier, javascript-only way, but in the past I have called a PHP script via AJAX to do this.

for example:

JavaScript:

Ajax('foo.php', { onsuccess: function () { map.reloadMap(); } });

PHP foo.php:

// get the session's layer's XML
// put the filter in the XML's Filter tag
// save the XML to the session's layer 

The PHP example for this is documented in the Autodesk Dev Guide under working with layers section. (Seems like you're using the Enterprise Edition right?)

Anyone know of an easier way, i'd love to hear too!


----- Original Message -----
From: "pwong" <previn.wong at sce.com>
To: fusion-users at lists.osgeo.org
Sent: Thursday, March 22, 2012 3:04:05 PM
Subject: [fusion-users] How to Filter a Fusion layer

I have a map with a polygon layer.  I want to dynamically apply a filter to
the polygon.  I do not want to create a select and then a new layer, I want
to reload the existing layer with the filter.

I have the following code.  I don't see any function or property to set the
filter at the layer level.

    var locMapWidget = Fusion.getWidgetById('Map').aMaps[0];
    var layers = locMapWidget.aLayers;

    var layer = layers[i];
    alert(layer.layerName);

    layer.filter?????

running Mapguide 2011.

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/How-to-Filter-a-Fusion-layer-tp4646676p4646676.html
Sent from the Fusion Users mailing list archive at Nabble.com.
_______________________________________________
fusion-users mailing list
fusion-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/fusion-users


More information about the fusion-users mailing list