we are instructing it that all mapservices and layers in the map will be identified right?
Jorge, No, if the identifylayeroption is set to visible then only the layers that are visible will be identified. So if you have the identifylayeroption set to all and the onlythese set to true than you will only get results that match the layers in the layer list. So there is no conflicting or duplication of these two parameters.
But we have the <layers onlythese="false"> and the identifylayeroption = visible Could you explain to me what will happen in our scenario?Thanksjorge
Jorge,With this scenario any layer currently visible in the viewer will be identifyable and the identify tool will return all fields for each layer.RegardsAnthony
Jorge,<identifylayeroption>visible</identifylayeroption><layers onlythese="false">ALL fields for any VISIBLE layers in ANY map serviceVERSUS<identifylayeroption>visible</identifylayeroption><layers onlythese="true">Specified fields for specified layers in those map servicesSomethimes it is easier just to try it, then try and understand exactly what it is doing.
JORGE, Well the fact that the other layer have a min scale is your issue when using the visible option. The visible option take into account scale dependency.
<?xml version="1.0" ?> <!-- Environmental Site --> <configuration> <betareturngeometryfix>true</betareturngeometryfix> <identifylayeroption>all</identifylayeroption> <identifytolerance>5</identifytolerance> <defaultzoomscale>5000</defaultzoomscale> <keepidentifyactive>true</keepidentifyactive> <returngeometryforzoom>true</returngeometryforzoom> <enablelineselect>true</enablelineselect> <enableextentselect>true</enableextentselect> <enablepolyselect>true</enablepolyselect> <enablemouseovergraphicsinfo>true</enablemouseovergraphicsinfo> <enablemouseoverrecordinfo>true</enablemouseoverrecordinfo> <usemaptime>false</usemaptime> <infoautoclosemilliseconds>2000</infoautoclosemilliseconds><!-- 2 seconds --> <autoactivatedtool>mappoint</autoactivatedtool><!-- possible values are extent or polygon or mappoint or polyline or nothing --> <excludebasemaps>true</excludebasemaps> <labels> <zoom2message>Click to Zoom to Point</zoom2message> <identifylabel>Identify</identifylabel> <resultslabel>Results</resultslabel> <descriptionlabel>Use the identify tool to identify features on the map:</descriptionlabel> <pointlabel>Identify by Point</pointlabel> <linelabel>Identify by Polyline</linelabel> <rectlabel>Identify by Rectangle</rectlabel> <polylabel>Identify by Polygon</polylabel> <clearlabel>Clear</clearlabel> <loadinglabel>Loading ...</loadinglabel> </labels> <useproxy /> <layers onlythese="true"> <layer> <name>Cultural Sites</name> <fields all="true" /> <links> <link includeinresults="true" field="" alias="" tooltip=""> <linkprefix /> <linksuffix /> <iconfield /> <iconprefix /> <iconsuffix /> </link> </links> <zoomscale /> <forcescale>false</forcescale> </layer> </layers> </configuration>
Jorge, Try this xml as I noticed that you had some syntax erros in yours:Also be absolutely sure that "Cultural Sites" is the name of the LAYER (not the map service) that appears in the REST Service directory for that layer as stated in the documentation.
<fields all="false"> <field name="name" /> <field name="DEC_UNIT" popuponly="true" /> </fields>
I have it set to <layers onlythese="false">.However, if I have a layer listed below ( in the <layer> tags), it will "try" to map according to the <field> tags, but will NOT honor <fields all="true" />.I.e., I have a building layer in my map, if I click on it with the idetify with the following settings: <fields all="true" />, the infowindow will popup with the layer name, but no attribute information.If I actually map some fields <fields all="false"> <field name="name" /> <field name="DEC_UNIT" popuponly="true" /> </fields>then, I will get information for those fields.ALSO, the other option is to remove the "Buildings" layer from my identifywidget.xml. Then, ALL attributes are displayed.So, if you want to get all info for all visible layers, try removing them from the xml and see if that makes a difference (makes it behave like <fields all="true" /> ).Hope this helps figure something out,R_
<fields all="true" />
<layers onlythese="false"> </layers> <excludeLayers> <excludeLayer name="LayerName" /> </excludeLayers>
private var configExcludeLayers:Array;
configExcludeLayers = []; var excludeLayerList:XMLList = configXML..excludeLayer; for (var index:int = 0; index < excludeLayerList.length(); index++) { configExcludeLayers.push(excludeLayerList[index].@name); }
var exclude:Boolean = false; for (var index:int=0; index < configExcludeLayers.length; index++) { if (identifyResult.layerName == configExcludeLayers[index]) { exclude = true; break; } } if (exclude) break;
Přihlášení členové mohou přispívat, sledovat aktualizace a další. Jste tu noví? Zaregistrujte si bezplatný účet.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.