Hi again Caroline,I think I might have solved my problem. When I was pulling in the url for the layer in the SelectionWidget.xml file, I was using the FeatureServer service instead of the MapServer service from my rest services directory. (The layer I am using is editible also.)When I tried using the MapServer url I got the unique values list to populate.Hopefully this fix will be as easy for you!Ashlee
Let me know if these updates workComplied with Date fix and:FLEX SDK 4.1 and AGS FLEX 2.5
Hello, I believe the issue of the unique fields not showing up is due to how the query works. I believe the field that you are having issues with is a non-string field. If that's the case and you are working with the uncompiled version:in utils/PagingQueryTask.as around line 184, you want to change query.text = "%" to query.where = "1=1"I'm almost positive that change is reflected in the versions with the date and time fix found here:http://forums.arcgis.com/threads/30179-Selection-Widget-Updated-Version?p=157653&viewfull=1#post157653http://forums.arcgis.com/threads/30179-Selection-Widget-Updated-Version?p=157654&viewfull=1#post157654http://forums.arcgis.com/threads/30179-Selection-Widget-Updated-Version?p=157756&viewfull=1#post157756Let me know if that fixes the issue
what is the exact issue you are facing
//New function private function removeGlow( fl:FeatureLayer ):void { var len:int = fl.numChildren; var dObj:DisplayObject; for ( var i:int = 0; i < len; i++ ) { dObj = fl.getChildAt( i ); if ( dObj.filters ) { dObj.filters = []; } } } //Updated function protected function featureLayer_selectionHandler(event:FeatureLayerEvent):void { removeGlow(event.featureLayer); dispatchEvent( new Event( 'featurelayer_selection', true ) ); var flEvent:SelectionFeatureLayerEvent = new SelectionFeatureLayerEvent( SelectionFeatureLayerEvent.LAYER_RESULTS,event.featureLayer); dispatchEvent(flEvent); if (event.type == FeatureLayerEvent.SELECTION_CLEAR) { this.showInfoWindow(null); } }
for (var i:int = 0; i < lyrList.length(); i++) { var lyrURL:String = lyrList.url; var lyrLabel:String = lyrList.name; var featureLayer:FeatureLayer = new FeatureLayer(lyrURL); featureLayer.name = lyrLabel; var l1lst:XMLList = (lyrList.maxscale as XMLList) var l2lst:XMLList = (lyrList.minscale as XMLList) //Override the min and max zoom scale if they are in the config // not sure why couldn't test directly but had to create varable first??? if (l1lst.length() > 0 ) featureLayer.maxScale = lyrList.maxscale; if (l2lst.length() > 0 ) featureLayer.minScale = lyrList.minscale; featureLayer.addEventListener(LayerEvent.LOAD, featureLayer_loadHandler); } ......... ........ ........ //ViewerContainer.dispatchEvent(new AppEvent(AppEvent.DATA_CREATE_INFOWIDGET, data, infoReady)); AppEvent.dispatch(AppEvent.DATA_CREATE_INFOWIDGET, data, infoReady);
I have updated this part of the init() function and it seems to be working fine in 3.0: Keep in mind that I am no pro by any means, but this seems to work. for (var i:int = 0; i < lyrList.length(); i++) { var lyrURL:String = lyrList.url; var lyrLabel:String = lyrList.name; var featureLayer:FeatureLayer = new FeatureLayer(lyrURL); featureLayer.name = lyrLabel; var l1lst:XMLList = (lyrList.maxscale as XMLList) var l2lst:XMLList = (lyrList.minscale as XMLList) //Override the min and max zoom scale if they are in the config // not sure why couldn't test directly but had to create varable first??? if (l1lst.length() > 0 ) featureLayer.maxScale = lyrList.maxscale; if (l2lst.length() > 0 ) featureLayer.minScale = lyrList.minscale; featureLayer.addEventListener(LayerEvent.LOAD, featureLayer_loadHandler); } ......... ........ ........ //ViewerContainer.dispatchEvent(new AppEvent(AppEvent.DATA_CREATE_INFOWIDGET, data, infoReady)); AppEvent.dispatch(AppEvent.DATA_CREATE_INFOWIDGET, data, infoReady); I still get a couple warnings about "Data binding will not be able to detect assignments to length" for the end of SelectByAttributes.mxml and SelectionResults.mxml but it is working.R_
I do not get any errors. Just a few warnings about length not being bindable.R_
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.