Select to view content in your preferred language

Enhanced-Search-Widget-for-FlexViewer Part III

142221
776
04-30-2013 03:58 PM
RobertScheitlin__GISP
MVP Emeritus
All,

   Here is a new thread to post questions and discuss the Enhanched Search Widget. The old thread was getting too long.
Tags (2)
776 Replies
DrewDowling
Frequent Contributor

Robert

Hope I'm in the right thread. I have a question about your excellent eLayerList widget and it's home page directed me to version 1 of this thread.

I've been using a modified version of your widget in a custom app. When I upgraded to the latest release I'm noticing that the TOC widget is turning off map layers automatically when the layers are nested within a group layer and the layers are refreshed,as in a map zoom. At first I thought it was my customizations but when I tied my map service with your widget in the default flex view the same behavior occurred. You can test by adding this map service   to the flex viewer, zooming in all the way and turning on the contour group layer and sub layers. As you zoom out they will turn off.

Any suggestions on how to fix this?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Drew,

   I will try and find some time to use your map service and test what you are reporting. But before I do are you talking about the layer turning off due to scale scale dependency set for the group layer?

0 Kudos
DrewDowling
Frequent Contributor

Robert

Thanks for getting back to me. I am taking about all the layers within a group layer in the map service turning off, weather they have scale dependance or not. I think that when the zoom level changes the scale dependance forces a refresh of the TOC widget. However during the refresh it turns off all sub layers. The problem doesn't happen when changing between every zoom level, but only changing between certain ones. That's why I think the scale dependance is triggering the refresh, but not sure why the refresh turns off all the layers. If you were to turn on the contours group or the water infrastructure group and start changing between zoom levels you should see the problem.

Thanks for you help

0 Kudos
DrewDowling
Frequent Contributor

Robert

I think I figured it out, at least for me.. I think group layers were getting ignored or misread. in TOCMapLayerItem.as. What was happening that all sublayers were getting turned  off if a grouplayer was turned on.

To fix it I changed

if (item.isGroupLayer())

to

if (item.isGroupLayer() && item.visible)

in the updateTOCItemVisibility function, line 253

To be honest I'm not sure exactly why this was turning off  layers that should have been on. Possibly the case where group layers were off was throwing the recursive loop off. Or maybe something to do with how Flex thinks turning on a group layer automatically turns on all sublayers, even if they are currently off?

0 Kudos
AndrewNiederhauser1
Deactivated User

Hello,

I am using the Enhanced Search Widget 3.6 and trying to setup PDF hyperlinks for both the Search Results data grid and Search Results pop-ups.

I used the demo Traffic Cameras layer as a starting point and now have it where the data grid displays an icon to hyperlink to the PDF but I can't get it to work in the search results. The link to the app is below.

https://gis.sehinc.com/flexviewers/poc

Is there something that I'm missing in the layer setup?

-----------------------------------

<layer>

            <token/>

            <definitionexpression/>

            <enableexport>true</enableexport>

  <enableprintgrid title="Selected Parcels" >true</enableprintgrid>

            <name>GeoTech Projects</name>

            <url>https://gis.sehinc.com/seh/rest/services/TestingSEH/POC/MapServer/0</url>

            <expressions>

                <expression alias="Client_ID" textsearchlabel="Search by Client ID:" isvaluerequired="true">

                    <values>

                        <value prompt="Example: STPAU" isvaluerequired="true" autosubmit="false">Client_ID LIKE '%[value]%'</value>

                    </values>

                </expression>

            </expressions>

            <graphicalsearchlabel>Use one of the graphical search tools to select Projects</graphicalsearchlabel>

            <spatialsearchlayer>true</spatialsearchlayer>

            <titlefield>Client_ID</titlefield>

            <fields all="false">

                <field name="Client_ID" gridfield="true"/>

                <field name="Client_Name" gridfield="true"/>

                <field name="Proj_No" gridfield="true"/>

                <field name="Location" gridfield="true"/>

                <field name="Zip" gridfield="true"/>

                <field name="Description_of_Work" gridfield="true"/>

                <field name="Year_" gridfield="true"/>

                <field name="PROJCOMPDATE" gridfield="true" dateformat="MM/DD/YYYY" sort="asc|1|date"/>

                <field name="Hyperlink" alias="Hyperlink" hyperlinkgridfield="true"

                    hyperlinkaliastext="Hyperlink" visible="true" hyperlinkgridicon="assets/images/i_camera.png"/>

            </fields>

            <links>

                <link alias="Hyperlink" disablelinksifnull="true">

                    <![CDATA[{URL}]]>

                    <icon><![CDATA[assets/images/i_camera.png]]></icon>

                </link>

            </links>

            <zoomscale usegeometry="true" zoompercent="1.6"/>

            <autoopendatagrid>true</autoopendatagrid>

            <queryattachments>true</queryattachments>

        </layer>

--------------------------------------------

Thanks,

Andrew

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Andrew,

  The link field you have setup does not have a valid field name for your data. Your data does not have a field named {URL} so you  need to change it to {Hyperlink}.

            <links>
                <link alias="Hyperlink" disablelinksifnull="true">
                    <![CDATA[{Hyperlink}]]>
                    <icon><![CDATA[assets/images/i_camera.png]]></icon>
                </link>
            </links>
0 Kudos
sziniker_CLPUD
Emerging Contributor

Robert,

I have an interesting issue going on with your eSearch widget.  I have been using it on my flex viewer for some time now but a few users noticed an issue with the graphical search function.  When using any of the graphical search tools (point, line, rectangle, polygon) on one specific point layer it gives 1000 results, regardless if they select one point or 10 and it pans to the same group of 5 points on the map.  This is only happening with one of my point layers.  I have looked through the .xml many times to spot something wrong in this one feature class but I can't find anything.  The text search works just fine but just not the graphical.  The only thing different between the layers that work fine and this one is that it has a relationship to a separate sql data table. I have to explicitly define the fields in the .xml like this: <field name="feature_class_name.some_field" alias="Field Name" gridfield="true" visible="true"/>

I am using eSearch version 3.6.10. I just upgraded from an earlier version of 3.6 where I was also experiencing this issue thinking it may have been addressed in this latest 3.6 version.

Thanks for any suggestions,

Sean

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Sean,

  So are you saying that the feature is joined to a sql data table? Joined not related right?

0 Kudos
sziniker_CLPUD
Emerging Contributor

Sorry I should have clarified that better.  It is actually a join to a table within the same file gdb.

Sean

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Sean,

   Is your map service public? If not would it be possible for you create a small sample FGDB of your data removing anything sensitive?

0 Kudos