Select to view content in your preferred language

Identify Widget 3.4.2 - Layer not found in the map

1539
10
Jump to solution
09-04-2013 12:44 PM
Scott_Russell
Regular Contributor
I wiped out all of the default services that were provided as a sample with the widget.  I entered a REST url for a service within a Dynamic Map Service and clicked browse.  The widget recognized the REST URL and allowed me to customize the fields.  I added settings and reverted to the interface to add more, and noticed the yellow triangle stating that the "Layer not found in the map". 

I've used the same REST URLs with the Enhanced Search Widget and they work fine, there are no issues.   Any ideas?

Thanks,
Scott
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus
Scott,

   There is no requirement to look at the IdentifyWidget.xml for anything, I will just helping you diagnose your issue. What it all boils down to is that you can not use localhost in one place and the machine name in another and have the code understand that both are pointing to the same layer (even though they are). The identify widget checks if the layers that you have configured exist in the map as a base map or operational layer and the means that it does this is by comparing the URLs. The fact that flex is a CaSe sensitive language means that Valhalla and valhalla are NOT equal and thus the widget does not detect that the layer is in the map and obviously the comparison of localhost and valhalla are not equal so same issue. If you have a map service added as an operational layer and its type is dynamic then the widget check if the configured identify layer is a sub layer of that parent map service. So there is the in-depth explanation of what is going on under the hood.

So what are you next steps.

  1. You do need to check into the issue with the fact that you have the web adaptor installed and you still have to use 6080. I would call tech support on this one.

  2. You should start a new configuration of the Identify widget by deleting the old one from the "Widgets in this application" and re-adding it and use "http://valhalla:6080/arcgis/rest/services/WebMap/MapServer" when you browse for layers to add, or if you get number one done then use your new url.

View solution in original post

0 Kudos
10 Replies
RobertScheitlin__GISP
MVP Emeritus
Scott,

   The difference is that the eSearch does not need the layer to exist in the map as an operational layer or basemap and the identify widget DOES. So the question is do you have that map service added as an operational layer (either the whole mapservice as a dynamic layer or a specific layer of the map service as an feature layer)?
0 Kudos
Scott_Russell
Regular Contributor
Scott,

   The difference is that the eSearch does not need the layer to exist in the map as an operational layer or basemap and the identify widget DOES. So the question is do you have that map service added as an operational layer (either the whole mapservice as a dynamic layer or a specific layer of the map service as an feature layer)?


Ahhh okay, interesting.  I have the map service added as a dynamic map service.

EDIT: I could probably add each layer as its own service, I just haven't tried it that way yet.  Would you suggest this?
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Scott,

   Having the map service added to the map as a dynamic map service is fine. So Can you provide me your main config.xml and your IdentifyWidget_1.xml to look at?
0 Kudos
Scott_Russell
Regular Contributor
Scott,

   Having the map service added to the map as a dynamic map service is fine. So Can you provide me your main config.xml and your IdentifyWidget_1.xml to look at?


Sure, here is the result of the IdentifyWidget_1.xml from C:\inetpub\wwwroot\flexviewers\WQv3\widgets\Identify\IdentifyWidget_1.xml


[INDENT]<?xml version="1.0" ?>
- <configuration>
  <identifylayeroption>visible</identifylayeroption>
  <identifytolerance>2</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>
  <enablegraphicclickinfo>true</enablegraphicclickinfo>
  <usemaptime>false</usemaptime>
  <infoautoclosemilliseconds>2000</infoautoclosemilliseconds>
  <autoactivatedtool>mappoint</autoactivatedtool>
  <excludebasemaps>true</excludebasemaps>
  <disablepopuplinks>false</disablepopuplinks>
  <disablelayerdropdown>false</disablelayerdropdown>
  <disablealllayerschoice>false</disablealllayerschoice>
  <replacenullswithemptystring>false</replacenullswithemptystring>
- <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>
  <removeresultmessage>Remove Result</removeresultmessage>
  <idfrom>Identify From</idfrom>
  <noresultsfoundlabel>No Results Found</noresultsfoundlabel>
  <resultsfoundlabel>Results Found</resultsfoundlabel>
  <alllayers>All Layers</alllayers>
  <layersremaining>layers remaining:</layersremaining>
  </labels>
  <useproxy />
- <symbols>
- <simplefillsymbol color="0x448ccb" alpha="0.4" style="solid">
  <outline color="0x448ccb" alpha="0.8" width="2" style="solid" />
  </simplefillsymbol>
- <simplemarkersymbol color="0x448ccb" alpha="0.8" style="circle" angle="0" size="12">
  <outline color="0xffffff" alpha="0.8" width="1" style="solid" />
  </simplemarkersymbol>
  <simplelinesymbol color="0x448ccb" alpha="0.8" width="2" style="solid" />
  <picturemarkersymbol url="assets/images/i_info.png" height="30" width="30" xoffset="0" yoffset="0" angle="0" />
  </symbols>
  </configuration>[/INDENT]


Here is the config.xml file from C:\inetpub\wwwroot\flexviewers\WQv3:

[INDENT]<?xml version="1.0" ?>
- <configuration>
  <title>ArcGIS Viewer for Flex</title>
  <logo>assets/images/logo.png</logo>
- <style>
  <colors>0xffffff,0x333333,0x101010,0x0,0xffd700</colors>
  <alpha>0.8</alpha>
  <font name="Verdana" />
  <titlefont name="Verdana" />
  <subtitlefont name="Verdana" />
  </style>
- <!--  replace the following url with your own geometryservice
  -->
  <geometryservice url="https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer" />
  <widget url="widgets/Navigation/NavigationWidget.swf" config="widgets/Navigation/NavigationWidget.xml" left="10" top="50" />
  <widget url="widgets/OverviewMap/OverviewMapWidget.swf" config="widgets/OverviewMap/OverviewMapWidget.xml" right="0" bottom="0" />
  <widget url="widgets/MapSwitcher/MapSwitcherWidget.swf" config="widgets/MapSwitcher/MapSwitcherWidget.xml" right="20" top="55" />
  <widget url="widgets/HeaderController/HeaderControllerWidget.swf" config="widgets/HeaderController/HeaderControllerWidget.xml" left="0" top="0" />
- <map attributionvisible="true" esrilogovisible="true" openhandcursorvisible="false" scalebarvisible="true" scalebar="default" zoomslidervisible="false" wraparound180="true" addarcgisbasemaps="true" initialextent="344500.91954760853 2869650.981108161 423299.36848202633 2914306.5365845724" wkid="102686" top="40" portalurl="https://www.arcgis.com/">
- <basemaps>
  <layer type="feature" label="Town Boundaries" url="http://valhalla:6080/arcgis/rest/services/WebMap/MapServer/15" mode="onDemand" visible="true" />
  </basemaps>
- <operationallayers>
  <layer type="dynamic" label="WebMap" imageformat="png8" url="http://valhalla:6080/arcgis/rest/services/WebMap/MapServer" visible="true" />
  </operationallayers>
  </map>
- <widgetcontainer layout="float">
  <widget url="widgets/Draw/DrawWidget.swf" config="widgets/Draw/DrawWidget.xml" label="Draw" icon="assets/images/i_draw2.png" />
  <widget url="widgets/Print/PrintWidget.swf" config="widgets/Print/PrintWidget.xml" label="Print" icon="assets/images/i_print.png" />
  <widget url="widgets/eSearch/eSearchWidget.swf" config="widgets/eSearch/eSearchWidget_2.xml" label="Enhanced Search Widget" icon="assets/images/i_search.png" preload="open" />
  <widget url="widgets/Identify/IdentifyWidget.swf" config="widgets/Identify/IdentifyWidget_2.xml" label="Identify Widget" icon="assets/images/i_info.png" />
  </widgetcontainer>
  </configuration>[/INDENT]


I plan on changing the geometry service to our ArcGIS Server service soon, in case that relates.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Scott,

   There are no layers listed at all in the IdentifyWidget_1.xml?... Did you save your edits after you configured yur changes? Do you have a IdentifyWidget_#.xml with a higher number like 2 or 3 in your  C:\inetpub\wwwroot\flexviewers\WQv3\widgets\Identify\ folder?
0 Kudos
Scott_Russell
Regular Contributor
Scott,

   There are no layers listed at all in the IdentifyWidget_1.xml?... Did you save your edits after you configured yur changes? Do you have a IdentifyWidget_#.xml with a higher number like 2 or 3 in your  C:\inetpub\wwwroot\flexviewers\WQv3\widgets\Identify\ folder?


Yes, I have a '_2' as well, here it is:

<?xml version="1.0" ?>
- <configuration>
  <identifylayeroption>visible</identifylayeroption>
  <identifytolerance>2</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>
  <enablegraphicclickinfo>true</enablegraphicclickinfo>
  <usemaptime>false</usemaptime>
  <infoautoclosemilliseconds>2000</infoautoclosemilliseconds>
  <autoactivatedtool>mappoint</autoactivatedtool>
  <excludebasemaps>true</excludebasemaps>
  <disablepopuplinks>false</disablepopuplinks>
  <disablelayerdropdown>false</disablelayerdropdown>
  <disablealllayerschoice>false</disablealllayerschoice>
  <replacenullswithemptystring>false</replacenullswithemptystring>
- <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>
  <removeresultmessage>Remove Result</removeresultmessage>
  <idfrom>Identify From</idfrom>
  <noresultsfoundlabel>No Results Found</noresultsfoundlabel>
  <resultsfoundlabel>Results Found</resultsfoundlabel>
  <alllayers>All Layers</alllayers>
  <layersremaining>layers remaining:</layersremaining>
  </labels>
  <useproxy />
- <layers onlythese="true">
- <layer>
  <name>States</name>
  <id>11</id>
  <url>http://localhost:6080/arcgis/rest/services/WebMap_v2/MapServer</url>
- <fields>
  <field name="TOWN" alias="TOWN" />
  </fields>
  <links />
  <zoomscale>2000</zoomscale>
  <forcescale>true</forcescale>
  </layer>
- <layer>
  <name>Valves</name>
  <id>4</id>
  <url>http://Valhalla:6080/arcgis/rest/services/WebMap_v2/MapServer/6</url>
- <fields>
  <field name="FACILITYID" alias="FACILITYID" />
  </fields>
  <links />
  <zoomscale>2000</zoomscale>
  <forcescale>true</forcescale>
  </layer>
- <layer>
  <name>Hydrants</name>
  <id>5</id>
  <url>http://valhalla:6080/arcgis/rest/services/WebMap_v2/MapServer</url>
- <fields>
  <field name="FACILITYID" alias="FACILITYID" />
  </fields>
  <links />
  <zoomscale>2000</zoomscale>
  <forcescale>false</forcescale>
  </layer>
  </layers>
- <symbols>
- <simplefillsymbol color="0x448ccb" alpha="0.4" style="solid">
  <outline color="0x448ccb" alpha="0.8" width="2" style="solid" />
  </simplefillsymbol>
- <simplemarkersymbol color="0x448ccb" alpha="0.8" style="circle" angle="0" size="12">
  <outline color="0xffffff" alpha="0.8" width="1" style="solid" />
  </simplemarkersymbol>
  <simplelinesymbol color="0x448ccb" alpha="0.8" width="2" style="solid" />
  <picturemarkersymbol url="assets/images/i_info.png" height="30" width="30" xoffset="0" yoffset="0" angle="0" />
  </symbols>
  </configuration>
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Scott,

   So you have several issue that you would have also seen if you were trying to manually edit the IdentifyWidget.xml yourself.


  1. You have http://localhost:6080/arcgis/rest/services/WebMap_v2/MapServer. You should not be using localhost in any of your urls unless you have also added the layer using localhost in your main config.xml.

  2. You have http://Valhalla:6080/arcgis/rest/services/WebMap_v2/MapServer/6 You can not mix CaSe in your URLs as Flex is a CaSe sensitive language. Your main config.xml has http://valhalla:6080 (with a lower case "v") so your IdentifyWidget.xml needs the same. Next is I am not sure at all how the /6 got on the end of the url as that is normally part of the id tag and not the url that is written to the IdentifyWidget.xml.

0 Kudos
Scott_Russell
Regular Contributor
Scott,

   So you have several issue that you would have also seen if you were trying to manually edit the IdentifyWidget.xml yourself.


  1. You have '>http://localhost:6080/arcgis/rest/services/WebMap_v2/MapServer. You should not be using localhost in any of your urls unless you have also added the layer using localhost in your main config.xml.

  2. You have '>http://Valhalla:6080/arcgis/rest/services/WebMap_v2/MapServer/6 You can not mix CaSe in your URLs as Flex is a CaSe sensitive language. Your main config.xml has http://valhalla:6080 (with a lower case "v") so your IdentifyWidget.xml needs the same. Next is I am not sure at all how the /6 got on the end of the url as that is normally part of the id tag and not the url that is written to the IdentifyWidget.xml.



Hi Robert, thanks for the reply.

I don't understand the requirement to look into the IdentifyWidget.xml to learn anything new that isn't already user defined in the GUI you designed, such as the Identify URL.  I removed the problems that you identified and defined the proper case-sensitive URL but I am still having issues with the yellow triangle.  See the new IdentifyWidget_2.xml below:

<?xml version="1.0" ?>
<configuration>
    <identifylayeroption>visible</identifylayeroption>
    <identifytolerance>2</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>
    <enablegraphicclickinfo>true</enablegraphicclickinfo>
    <usemaptime>false</usemaptime>
    <infoautoclosemilliseconds>2000</infoautoclosemilliseconds>
    <autoactivatedtool>mappoint</autoactivatedtool>
    <excludebasemaps>true</excludebasemaps>
    <disablepopuplinks>false</disablepopuplinks>
    <disablelayerdropdown>false</disablelayerdropdown>
    <disablealllayerschoice>false</disablealllayerschoice>
    <replacenullswithemptystring>false</replacenullswithemptystring>
    <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>
        <removeresultmessage>Remove Result</removeresultmessage>
        <idfrom>Identify From</idfrom>
        <noresultsfoundlabel>No Results Found</noresultsfoundlabel>
        <resultsfoundlabel>Results Found</resultsfoundlabel>
        <alllayers>All Layers</alllayers>
        <layersremaining>layers remaining:</layersremaining>
    </labels>
    <useproxy/>
    <layers onlythese="true">       
        <layer>
            <name>Hydrants</name>
            <id>5</id>
            <url>http://valhalla:6080/arcgis/rest/services/WebMap_v2/MapServer</url>
            <fields>
                <field name="FACILITYID" alias="FACILITYID"/>
            </fields>
            <links/>
            <zoomscale>2000</zoomscale>
            <forcescale>false</forcescale>
        </layer>

    </layers>
    <symbols>
        <simplefillsymbol color="0x448ccb" alpha="0.4" style="solid">
            <outline color="0x448ccb" alpha="0.8" width="2" style="solid"/>
        </simplefillsymbol>
        <simplemarkersymbol color="0x448ccb" alpha="0.8" style="circle" angle="0" size="12">
            <outline color="0xffffff" alpha="0.8" width="1" style="solid"/>
        </simplemarkersymbol>
        <simplelinesymbol color="0x448ccb" alpha="0.8" width="2" style="solid"/>
        <picturemarkersymbol url="assets/images/i_info.png" height="30" width="30" xoffset="0" yoffset="0" angle="0"/>
    </symbols>
</configuration>


I also attached a screenshot of the GUI so you believe me 🙂

EDIT: We installed the Web Adapter recently, I'm not sure if this has anything to do with it.  But, I can't browse to any of the services without the :6080 value, even though I thought the Web Adapter would change this.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Scott,

   There is no requirement to look at the IdentifyWidget.xml for anything, I will just helping you diagnose your issue. What it all boils down to is that you can not use localhost in one place and the machine name in another and have the code understand that both are pointing to the same layer (even though they are). The identify widget checks if the layers that you have configured exist in the map as a base map or operational layer and the means that it does this is by comparing the URLs. The fact that flex is a CaSe sensitive language means that Valhalla and valhalla are NOT equal and thus the widget does not detect that the layer is in the map and obviously the comparison of localhost and valhalla are not equal so same issue. If you have a map service added as an operational layer and its type is dynamic then the widget check if the configured identify layer is a sub layer of that parent map service. So there is the in-depth explanation of what is going on under the hood.

So what are you next steps.

  1. You do need to check into the issue with the fact that you have the web adaptor installed and you still have to use 6080. I would call tech support on this one.

  2. You should start a new configuration of the Identify widget by deleting the old one from the "Widgets in this application" and re-adding it and use "http://valhalla:6080/arcgis/rest/services/WebMap/MapServer" when you browse for layers to add, or if you get number one done then use your new url.

0 Kudos