<?xml version="1.0" ?> <configuration> <layers> <layer> <name>Parcels</name> <url>http://pacific/ArcGIS/rest/services/Planning/SLOCO_Parcels_CD_LU/MapServer/0</url> <titlefield>SLOCO.SDE.SLO_PARCEL_CD_LU.APN</titlefield> <linkfield>SLOCO.SDE.PLN_Tidemark_pmt.link</linkfield> <fields> <field name="SLOCO.SDE.SLO_PARCEL_CD_LU.APN"/> <field name="SLOCO.SDE.SLO_PARCEL_CD_LU.ASSESSEE" alias="Assessee"/> <field name="SLOCO.SDE.SLO_PARCEL_CD_LU.C_O"/> <field name="SLOCO.SDE.SLO_PARCEL_CD_LU.ADDRESS_1"/> <field name="SLOCO.SDE.SLO_PARCEL_CD_LU.CITY"/> <field name="SLOCO.SDE.SLO_PARCEL_CD_LU.STATE"/> <field name="SLOCO.SDE.SLO_PARCEL_CD_LU.ZIP"/> <field name="SLOCO.SDE.PLN_Tidemark_pmt.link"/> </fields> <infowindowfields> <field name="SLOCO.SDE.SLO_PARCEL_CD_LU.APN"/> <field name="SLOCO.SDE.SLO_PARCEL_CD_LU.ASSESSEE" alias="Assessee"/> <field name="SLOCO.SDE.PLN_Tidemark_pmt.link"/> </infowindowfields> </layer> </layers> <zoomscale>5000</zoomscale> <info>widgets/InfoTemplates/InfoPopupWidget.swf</info> </configuration>
Test out your layer without the link field and without the fully qualified names and see if that works.
Sertact(February 24, 2011)Great widget. Many thanks for the great job. A small question. When make the selection and the results are returned. The results are not displayed at their correct locations on the map. When I double click from the grid it kind of centers the correct location for that record but again all the others are not displayed correctly. My map service and map are at the same datum which is WGS84. One other thing at your SelectionWidgetUtil.as I realized that you add/subtract 5000 to get the graphic extent of the records selected. I think this value is a bit high if one is using Decimal degrees with wgs84 datum. Any suggestions for these. Many thanks again.
Sertact,The results are returned as a featurelayer which is a direct representation of the GIS data. If it is not in the correct place it sounds like some sort of projection issue?? If you put the base map that you are using with this widget into ArcGIS and overlay your data on top of it, does it line up correctly. Is your data available externally?The zoom function in SelectionWidgetUtil.as is copied from one of my other projects which is using projected data. The 5000 was for metres (5 kilometres) So for decimal degrees it would be a bit high. I will update this at some stage (maybe use pan to point xy instead).
KDAGIS(March 4, 2011) I really like this widget, thank you! I have one issue. The layers that I have specified to be in the query drop down list get added to the layers I have listed under my More... button. Even though they are already there. So I wind up then having each layer listed twice under my More... button. I've looked around in the code but haven't identified what code I could take out to make it not add the layers to the More.. button.
private function init():void { map.addEventListener(MapEvent.LAYER_ADD, onLayerAdd, false, 100);
private function onLayerAdd(event:MapEvent):void { event.stopImmediatePropagation(); }
Hi Daniel,The widget is based on the FlexViewer's built in search widget, with the addition of Robert's unionGeom function. That function is brilliant as it is client side and so quick. It is definately worth looking at what others have done and reusing there work (if permitted of course).I did think about including graphical selection tools but there were a few widgets that already did this sort of thing, so I decided against it.But yes a select by Graphic option like ArcGIS would be good.I will see about adding one. (I am also happy to include contributions and enhancements from others.)
Interesting problem here....when using your Selection Widget in a flexviewer where Robert Scheitlin's TOC widget is open, the TOC widget populates with whatever layers are placed into the Selection Widget XML.
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; featureLayer.minScale = 0; featureLayer.maxScale = 0; featureLayer.addEventListener(LayerEvent.LOAD, featureLayer_loadHandler); }
Los miembros registrados pueden publicar, seguir actualizaciones y más. ¿Nuevo aquí? Regístrate gratis.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.