<expression alias="Zoning Name" textsearchlabel="Search Zoning Name [ Example: RES MULTI-FAMILY ]:">upper(ZONING_NAME) LIKE upper('%[value]%')</expression>
Halil, If you look at the documentation or the SearchWidget.xml that come with the widget you will see several examples of wildcard searches that work.<expression alias="Zoning Name" textsearchlabel="Search Zoning Name [ Example: RES MULTI-FAMILY ]:">upper(ZONING_NAME) LIKE upper('%[value]%')</expression>If for some reason you are publishing shapefiles (not a very good idea) than your wildcard would be * and not %.
private function searchDrawEnd(event:DrawEvent):void { //selectedDrawingIcon = null; //clearSelectionFilter(); // deactivate the draw tool event.target.deactivate(); var geom:Geometry = event.graphic.geometry; clearBuffer(); if (geom is Polygon && GeometryUtil.polygonSelfIntersecting(geom as Polygon)) { geometryService.simplify([geom], new AsyncResponder(simpResult, null)); function simpResult(item:Object ,spatialRelat:String):void{ var simpGeoms:Array = item as Array; queryFeaturesGraphical(simpGeoms[0] as Polygon,"esriSpatialRelIntersects",configSearchGraphical[cboLayerGraphical.selectedIndex]); } }else{ //create extent around map point to improve search results if (geom.type == Geometry.MAPPOINT && addTolerance.selected) { geom = createExtentAroundMapPoint(geom as MapPoint, pointSearchTolerance); } queryFeaturesGraphical(geom, "esriSpatialRelIntersects",configSearchGraphical[cboLayerGraphical.selectedIndex]); } var status:String; var value:String = selectedDrawingIcon.name; switch (value) { case DrawTool.MAPPOINT: { status = pointLabel; drawSymbol = new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_CIRCLE, 15, 0x3FAFDC, 1); break; } case DrawTool.POLYLINE: { status = lineLabel; drawSymbol = new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, 0x3FAFDC, 1, 1); break; } case DrawTool.EXTENT: { status = rectangleLabel; drawSymbol = new SimpleFillSymbol(SimpleFillSymbol.STYLE_SOLID, 0x3FAFDC, 0.5, new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, 0x3FAFDC, 1, 1)); break; } case DrawTool.POLYGON: { status = polygonLabel; drawSymbol = new SimpleFillSymbol(SimpleFillSymbol.STYLE_SOLID, 0x3FAFDC, 0.5, new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, 0x3FAFDC, 1, 1)); break; } } setMapAction(value, status, drawSymbol, searchDrawEnd); }
PopUpManager.centerPopUp(myfloatdg);
1. The ability to autozoom to the full extent of all selected items when the search has been run. ex: http://forums.esri.com/Thread.asp?c=158&f=2421&t=298832 I have beat my head against the wall and am completely clueless how to achieve this.
import com.esri.ags.utils.GraphicUtil;//
/////////// MAKE THE MAP'S EXTENT ZOOM TO THE Search Results. var graphicsExtent:Extent = GraphicUtil.getGraphicsExtent(featureSet.features); if (graphicsExtent) { map.extent = graphicsExtent; }
Ned, The URL configuration documentation will still work for FV 2.3.1.
The userlist attributes give you the ability to predefine your own list of search values that will be presentedto the user in a dropdown instead of the user typing the value.
Phillip, The datagrid is centered in the map by this line in the SearchWidget.mxmlPopUpManager.centerPopUp(myfloatdg);I have not tried but I would guess that you would need to set the bottom and right of the myfloatdg to zero and comment out the above code.
if(!myfloatdg){ myfloatdg = SearchWidgetFloatDG(PopUpManager.createPopUp(map,SearchWidgetFloatDG,false,PopUpManagerChildList.POPUP)); //commented out to move the datagrid... //PopUpManager.centerPopUp(myfloatdg); myfloatdg.bottom="0";
private function showGridResults():void { try { if(gridFields.length == 0){ showMessage("No Datagrid configured for this layer", false); return; } if(!myfloatdg){ myfloatdg = SearchWidgetFloatDG(PopUpManager.createPopUp(map,SearchWidgetFloatDG,false,PopUpManagerChildList.POPUP)); //PopUpManager.centerPopUp(myfloatdg); myfloatdg.y = map.height + Number(ViewerContainer.getInstance().mapManager.top) - myfloatdg.height; myfloatdg.x = 0; }else{ var exists:Boolean = false; for (var p:Number=0;p<systemManager.popUpChildren.numChildren;p++) { if(systemManager.popUpChildren.getChildAt(p) is SearchWidgetFloatDG) { exists = true; break; } } if(exists == false) PopUpManager.addPopUp(myfloatdg,map,false); //PopUpManager.centerPopUp(myfloatdg); myfloatdg.y = map.height + Number(ViewerContainer.getInstance().mapManager.top) - myfloatdg.height; myfloatdg.x = 0; } if(!gridFields) gridFields = configSearchText[0].gridfields; myfloatdg.enableExport = configSearchText[0].enableexport; myfloatdg.layerDetails = queryLayer.layerDetails; myfloatdg.csvSeperator = csvSep; myfloatdg.csvExportOptionLbl = exp2csvOptLbl; myfloatdg.txtExportOptionLbl = exp2txtOptLbl; myfloatdg.ExportButtonLbl = expBtnLbl; myfloatdg.csvName = _csvName; myfloatdg.sumField = sumField; myfloatdg.labelSum = lblSum; myfloatdg.dgFieldAliases = fldAliases; myfloatdg.dgColumns = gridFields; myfloatdg.dgHyperColumns = gridHyperFields; myfloatdg.dProvider = gridDataProvider; myfloatdg.graphicslayer = graphicsLayer; if(lState == "graphicalInput"){ var i2:Number = cboLayerGraphical.selectedIndex; zoomScale = configSearchGraphical[i2].zoomscale; myfloatdg.enableExport = configSearchGraphical[i2].enableexport; }else if (lState == "textInput"){ var i:Number = cboLayerText.selectedIndex; zoomScale = configSearchText.zoomscale; myfloatdg.enableExport = configSearchText.enableexport; } myfloatdg.zoomScale = zoomScale; myfloatdg.ownerWidget = this; } catch (error:Error) { showMessage(error.message, false); } }
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.