Select to view content in your preferred language

Identify Widget Question

4015
59
05-20-2011 11:38 AM
TomSedlacek
Regular Contributor
This question pertians to Robert Scheitlins' Identify Widget 2.3.1.
I have added the widget to my web app and it's exactly what I'm looking for.  HOWEVER, it only seems to identify those layers that are a part of my basemap.  I've modified the "onlythese" code in the compiled version six ways from Sunday and it will not id any of the layers in my 'operational layers'.

Any ideas anyone?  Robert?

Thanks!

Tom Sedlacek GISP
Engineering Tech / GIS
Clark Regional Wastewater District
360-993-8811
Email: TSedlacek@CRWWD.com
Tags (2)
0 Kudos
59 Replies
AnthonyGiles
Honored Contributor
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.

But we have the <layers onlythese="false"> and  the identifylayeroption = visible

Could you explain to me what will happen in our scenario?

Thanks

jorge


Regards

Anthony
0 Kudos
JORGELAGOS2
Emerging Contributor
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.



Regards

Anthony




I guess I am not being clear in my confussion. Let me try again. What will be the diferrence of having the 2 scenarios below

<identifylayeroption>visible</identifylayeroption>
<layers onlythese="false">

VERSUS

<identifylayeroption>visible</identifylayeroption>
<layers onlythese="true">

Jorge
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Jorge,

<identifylayeroption>visible</identifylayeroption>
<layers onlythese="false">
ALL fields for any VISIBLE layers in ANY map service

VERSUS

<identifylayeroption>visible</identifylayeroption>
<layers onlythese="true">
Specified fields for specified layers in those map services


Somethimes it is easier just to try it, then try and understand exactly what it is doing.
0 Kudos
JORGELAGOS2
Emerging Contributor
Jorge,

<identifylayeroption>visible</identifylayeroption>
<layers onlythese="false">
ALL fields for any VISIBLE layers in ANY map service

VERSUS

<identifylayeroption>visible</identifylayeroption>
<layers onlythese="true">
Specified fields for specified layers in those map services


Somethimes it is easier just to try it, then try and understand exactly what it is doing.


Thanks so much everybody for the help.

Jorge
0 Kudos
JORGELAGOS2
Emerging Contributor
I am having problem implementing the IdentifyWidget tool (Mr. Robert Rscheitlin Identify version 3.0 ) in my projects. Regardless of any combination I use with the tags that filter what layers should be identifiable.

What I really would like to do is to Identify all the fields from all the visible layers so I tried this combination

<identifylayeroption>visible</identifylayeroption>
<layers onlythese="false">

However,  despite of all these 20 layers being visible in the mapservice: layerA,layerB,layerC,layerD,layerE,layerF,layerG,layerH,layerI,layerJ,layerK AND layerL...........layerS
ONLY layers A,D,H,M, and R return values. This made me think is should be something specific about the mapservice thus I went ahead and created and individual Identify tool for each of the 20 layers (so I created 20 xml one for each layer). No surprisingly, only the individual Identify tool for the same 3 layers worked. The other 17 didn't returned anything when they finished processing. For the individual ones I used the following combination of tags

<identifylayeroption>visible</identifylayeroption>
<layers onlythese="true">
then for each one  I included the corresponding fields

Does anybody has any idea why only those 3 layers respond? I printed out each MapServer but couldn't find anythig particular to the 3 layrs other than they were the only one that didn't have a Min. Scale value set.

I would appreciate any help.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
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.
0 Kudos
JORGELAGOS2
Emerging Contributor
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.


Thanks Robert.

Jorge
0 Kudos
JORGELAGOS2
Emerging Contributor
One more question:
Could you please check my code below and see why my Identify tool is returning only the name of the Layer which is Cultural Sites? It is the only layer in my widget CulturalSite.xml file which code I am including below. I understand that if I  code the fields tag to :<fields all="true"> then all the fields will show right?
It works fine when I said <fields all="false"> but I don't want to go and list every field.

<?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</useproxy>
<layers onlythese="true">
  <layer>
   <name>Cultural Sites</name>
   <fields all="true">
   </fields>
   <links>
    <link includeinresults="true" field="" alias="" tooltip="">
     <linkprefix/>
     <linksuffix/>
     <iconfield/>
     <iconprefix/>
     <iconsuffix/>
    </link>
   </links>
   <zoomscale></zoomscale>
   <forcescale>false</forcescale>
  </layer>
</layers>
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
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.

<?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>
0 Kudos
JORGELAGOS2
Emerging Contributor
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.


Hello Robert. Thanks so much again for your tremendous help. However, I used your corrected code and still didn't work for me. For the meanwhile, I ended up coding each field and that work fine. The fact that the code work fine when I list all the fields make me believe that I am indeed using the correct name for the layer as appear in the REST Service directory. I still want to make the <fields all="true" /> to work to avoid typing all the fields.

Thanks again for your help

Jorge


<?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. Set scale under 1:288,895.</identifylabel>
  <resultslabel>Results</resultslabel>
  <descriptionlabel>Set scale under 1:288,895.                                                                Use the identify tool to identify features on the map:</descriptionlabel>
  <pointlabel>Identify by Point. Set scale under 1:288,895.</pointlabel>
  <linelabel>Identify by Polyline. Set scale under 1:288,895.</linelabel>
  <rectlabel>Identify by Rectangle. Set scale under 1:288,895.</rectlabel>
  <polylabel>Identify by Polygon. Set scale under 1:288,895.</polylabel>
  <clearlabel>Clear</clearlabel>
  <loadinglabel>Loading ...</loadinglabel>
</labels>
<useproxy />
<layers onlythese="true">
  <layer>
   <name>Cultural Sites</name>
   <!-- <fields all="true" />-->
   <fields all="false">
    <field name="Id"/>
    <field name="FIELD_NAME"/>
    <field name="SITE_NO"/>
    <field name="RECORDER_N"/>
    <field name="SURVEY_DAT"/>
    <field name="SUBMIT_DAT"/>
    <field name="CREW_NO"/>
    <field name="Eligibilit"/>
    <field name="COMMENT"/>
    <field name="Icon Link" popuponly="true"/>
   </fields>
   <links>
    <link includeinresults="true" field="" alias="" tooltip="">
     <linkprefix />
     <linksuffix />
     <iconfield />
     <iconprefix />
     <iconsuffix />
    </link>
   </links>
   <zoomscale />
   <forcescale>false</forcescale>
  </layer>
</layers>
</configuration>
0 Kudos