ArcGIS flex viewer 3.1 Identify Widget

6518
45
02-06-2013 06:52 AM
ManuelRodriguez2
New Contributor
I am fairly new to using custom widgets.  I have copied the compiled widget folder over and added the text the the config.xml file.  The widget loads correctly in the viewer but I can not get it to detect any features in the map at all.  Even with the  <layers onlythese="false">.  Any help would be greatly appreciated.
Tags (2)
0 Kudos
45 Replies
RobertScheitlin__GISP
MVP Emeritus
Andrew,

   OK, progress. Now try this:

<?xml version="1.0"?>
<configuration>
    <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>false</enablemouseovergraphicsinfo>
    <enablemouseoverrecordinfo>false</enablemouseoverrecordinfo>
    <enablegraphicclickinfo>false</enablegraphicclickinfo>
    <usemaptime>false</usemaptime>
    <infoautoclosemilliseconds>2000</infoautoclosemilliseconds><!-- 2 seconds -->
    <autoactivatedtool>mappoint</autoactivatedtool><!-- possible values are extent or polygon or mappoint or polyline or nothing -->
    <excludebasemaps>false</excludebasemaps>
    <disablepopuplinks>false</disablepopuplinks>
    <disablelayerdropdown>false</disablelayerdropdown>
    <disablealllayerschoice>false</disablealllayerschoice>
    <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="false">
        <layer>
            <name>Property</name>
            <id>8</id>
            <url>http://198.167.37.68/arcgis/rest/services/BaseData/MapServer</url>
            <fields>
                <field name="PID" />
                <field name="FIRSTNAME" />
                <field name="LASTNAME" />
                <field name="PROPLOC" />
            </fields>
            <links>
                <link includeinresults="true" field="" alias="" tooltip="">
                    <linkprefix></linkprefix>
                    <linksuffix></linksuffix>
                    <iconfield></iconfield>
                    <iconprefix></iconprefix>
                    <iconsuffix></iconsuffix>
                </link>
            </links>
            <zoomscale>15000</zoomscale>
            <forcescale>true</forcescale>
        </layer>
    </layers>
    <symbols>
        <simplefillsymbol color="0x448ccb"
                          alpha="0.4"
                          style="solid">
            <outline color="0x448ccb"
                     alpha="0.8"
                     width="2"/>
        </simplefillsymbol>
        <simplemarkersymbol style="circle"
                            size="12"
                            color="0x448ccb"
                            alpha="0.8"
                            xoffset="0"
                            yoffset="0"
                            angle="0">
            <outline style="solid"
                     color="0xffffff"
                     alpha="0.8"
                     width="1"/>
        </simplemarkersymbol>
        <picturemarkersymbol url="assets/images/i_info.png"
                             height="30"
                             width="30"
                             xoffset="0"
                             yoffset="0"/>
        <simplelinesymbol color="0x448ccb"
                          alpha="0.8"
                          width="2"/>
    </symbols>
</configuration>
0 Kudos
AndrewIng
New Contributor
Excellent Robert! When I specify the property layer in the widget it returns the results specified using any of the selection methods.
Thank you,
Andrew
0 Kudos
RosyChawla1
New Contributor
Hi Richard

I build a new site in with 1 functional layer using App builder and copied over the your xml code to the config.xml for identify widget. But identify widget still does not work shows a message 'No Results Found'

-Rosy
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Rosy,

   Have you configured the IdentifyWidget.xml for your map service?
0 Kudos
RosyChawla1
New Contributor
yes , I did. This is what it looks like :

<?xml version="1.0"?>
<configuration>
    <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>false</enablemouseovergraphicsinfo>
    <enablemouseoverrecordinfo>false</enablemouseoverrecordinfo>
    <enablegraphicclickinfo>false</enablegraphicclickinfo>
    <usemaptime>false</usemaptime>
    <infoautoclosemilliseconds>2000</infoautoclosemilliseconds><!-- 2 seconds -->
    <autoactivatedtool>mappoint</autoactivatedtool><!-- possible values are extent or polygon or mappoint or polyline or nothing -->
    <excludebasemaps>false</excludebasemaps>
    <disablepopuplinks>false</disablepopuplinks>
    <disablelayerdropdown>false</disablelayerdropdown>
    <disablealllayerschoice>false</disablealllayerschoice>
    <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="false"/>
    <symbols>
        <simplefillsymbol color="0x448ccb"
                          alpha="0.4"
                          style="solid">
            <outline color="0x448ccb"
                     alpha="0.8"
                     width="2"/>
        </simplefillsymbol>
        <simplemarkersymbol style="circle"
                            size="12"
                            color="0x448ccb"
                            alpha="0.8"
                            xoffset="0"
                            yoffset="0"
                            angle="0">
            <outline style="solid"
                     color="0xffffff"
                     alpha="0.8"
                     width="1"/>
        </simplemarkersymbol>
        <picturemarkersymbol url="assets/images/i_info.png"
                             height="30"
                             width="30"
                             xoffset="0"
                             yoffset="0"/>
        <simplelinesymbol color="0x448ccb"
                          alpha="0.8"
                          width="2"/>
    </symbols>
</configuration>
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Rosy,

   What what type of layer is it that you are trying to identify and is it an operational layer or basemap layer? Is it a secured layer?
0 Kudos
RosyChawla1
New Contributor
My application has a base map layer ( OpenStreetMap ). Link to my layers is

http://webgis2.h-gac.com/ArcGIS/rest/services/TIP_Call/RoadConstr_Projects/MapServer.

My goal is to be able to 'identify' features in following 2 layers.

TELUS.TELUS_ADMIN.tip_call_pts_1
TELUS.TELUS_ADMIN.tip_call_lns_1

I created a new application ( for testing purposes) with just the basemap & one layer and copied over the contents of IdentifyWidgets.xml ,as suggested in one of the threads.

-Rosy
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Rosy,

   I was able to add you map service to FV and use the identify on them just fine...

[ATTACH=CONFIG]22900[/ATTACH]
0 Kudos
RosyChawla1
New Contributor
Robert,

Can you send me a copy of IdentifyWidget.xml that you used for this project? I think that'll really help me.

Thank You.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Rosy,

   Sure here it is:

<?xml version="1.0" ?>
<configuration>
    <identifylayeroption>visible</identifylayeroption>
    <identifytolerance>5</identifytolerance>
    <defaultzoomscale>5000</defaultzoomscale>
    <keepidentifyactive>true</keepidentifyactive>
    <returngeometryforzoom>true</returngeometryforzoom>
    <enablelineselect>true</enablelineselect>
    <enableextentselect>true</enableextentselect>
    <enablepolyselect>true</enablepolyselect>
    <enablemouseovergraphicsinfo>false</enablemouseovergraphicsinfo>
    <enablemouseoverrecordinfo>true</enablemouseoverrecordinfo>
    <enablegraphicclickinfo>true</enablegraphicclickinfo>
    <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>
    <disablepopuplinks>false</disablepopuplinks>
    <disablelayerdropdown>false</disablelayerdropdown>
    <disablealllayerschoice>false</disablealllayerschoice>
    <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><!-- Enter the label of the MapService from the main config.xml -->
        <!--<proxymapservice label="Imagery" /> 
        <proxymapservice label="Streets" /> -->
    </useproxy>
    <layers onlythese="false" />
    <symbols>
        <simplefillsymbol color="0x448ccb" alpha="0.4"
            style="solid">
            <outline color="0x448ccb" alpha="0.8" width="2" />
        </simplefillsymbol>
        <simplemarkersymbol style="circle" size="12"
            color="0x448ccb" alpha="0.8" xoffset="0" yoffset="0" angle="0">
            <outline style="solid" color="0xffffff" alpha="0.8"
                width="1" />
        </simplemarkersymbol>
        <picturemarkersymbol url="assets/images/i_info.png"
            height="30" width="30" xoffset="0" yoffset="0" />
        <simplelinesymbol color="0x448ccb" alpha="0.8"
            width="2" />
    </symbols>
</configuration>
0 Kudos