[fusion-trac] #473: query() ignores the options.filter parameter

Fusion trac_fusion at osgeo.org
Tue Aug 9 21:07:16 EDT 2011


#473: query() ignores the options.filter parameter
--------------------------+-------------------------------------------------
   Reporter:  liuar       |       Owner:  liuar 
       Type:  defect      |      Status:  new   
   Priority:  P2          |   Milestone:  Future
  Component:  MapGuide    |     Version:  2.0   
   Severity:  Major       |    Keywords:        
External_id:  1344103.02  |       State:  New   
    Browser:  All         |          Os:  All   
--------------------------+-------------------------------------------------
 The query(options) seems to ignore the filter parameter. [[BR]]
 [[BR]]
 The following code selects all elements on the layers specified, but it
 should only select one element based on the filter. No matter what I do
 with the filter text nothing changes. [[BR]]
 [[BR]]


 {{{
 var Map = cmsmapframe.Fusion.getWidgetById('Map');

 var options = {};

 //The filter seems to be broken - itis completely ignored and all features
 onthe layers are selected
 options.filter = "(ASSETNUMBER='" + assetnumber + "')";

 //alert(options.filter);

 //options.maxFeatures = 1; //this works

 //Note: The filter causes an error if a geometry is not provided. These
 numbers create a rectangle around the entire floorplan. (LL,UL,UR,LR)
 options.geometry = 'POLYGON((-9086048 5086543,-9086048 5086649,-9085921
 5086649,-9085921 5086543))';

 options.layers = '1 Hr Fire Door Fail,1 Hr Fire Door Pass,1 Hr Fire Wall
 Fail,1 Hr Fire Wall Pass,1 Hr Smoke Wall Fail,1 Hr Smoke Wall Pass,2 Hr
 Fire Door Fail,2 Hr Fire Door Pass,2 Hr Fire Wall Fail,2 Hr Fire Wall
 Pass';
 Map.query(options);
 }}}

 In MapGuide.js, the options.filter parameter is not pass to MapGuide

 {{{
  var r = new Fusion.Lib.MGRequest.MGQueryMapFeatures(this.getSessionID(),
 this._sMapname,
 options.geometry,
 maxFeatures,
                                                                 persist,
 options.selectionType || this.selectionType,
 options.layers,
 layerAttributeFilter);
 }}}

-- 
Ticket URL: <http://trac.osgeo.org/fusion/ticket/473>
Fusion <http://trac.osgeo.org/fusion>
Fusion is a web-mapping application development framework for MapServer and MapGuide OS.


More information about the fusion-trac mailing list