Select to view content in your preferred language

SwipeSpotlight widget not populating operational layers in final release 3.0

2667
8
Jump to solution
06-18-2012 03:09 PM
RhettZufelt
MVP Notable Contributor
I am trying to get the SwipeSpotlightWidget to funtion in 3.0.  Have tried both the compiled version (compiled for 3 final) and the uncompiled with the same results with each.

I am not able to see "any" layers in the drop down list unless I tell it to 
<?xml version="1.0" ?> <configuration>  <usebasemaps>true</usebasemaps>  <askaboutturningonlayer>true</askaboutturningonlayer> </configuration>  
    then ALL the layers show up in the dropdown.

If I Set it this way
<?xml version="1.0" ?> <configuration>  <usebasemaps>false</usebasemaps>  <askaboutturningonlayer>true</askaboutturningonlayer> </configuration>
, then NONE of the layers (operational or basemaps) show up.

Have tested with a brand new copy of the view/API with no other widgets included but the operational layers will not populate unless I turn the basemaps on also. 

Also, tested in the 2.5 version with no problems.

Wondering if anyone else has seen this behaviour and knows a "fix" for it?

Thanks,

R_
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus
Rhett,

   Go it. A change was made in 3.0 that is only seen when using popups on op layers that was causing the issue. I have fixed this now and will release a new version ASAP.


Edit new version now available:

http://www.arcgis.com/home/item.html?id=b9767b3f300142488c798953a94906fc

View solution in original post

0 Kudos
8 Replies
RobertScheitlin__GISP
MVP Emeritus
Rhett,

   Sorry man I have ask this question... Do you have any layers actually listed as operational layers in your main config.xml? You can see on my preview site that this widget is working as expected:

<configuration>
    <title>Swipe Spotlight Widget Sample</title>
    <subtitle>Preview of Swipe Spotlight Widget for Flex Viewer 3.0</subtitle>
    <logo>assets/images/logo.png</logo>
    <style>
        <colors>0xffffff,0x103c87,0x359dc6,0x294867,0xffffff</colors>
        <alpha>0.8</alpha>
    </style>
    <geometryservice url="http://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer" />

    <!-- UI elements -->
    <widget left="10"  top="50"    config="widgets/Navigation/NavigationWidget.xml" url="widgets/Navigation/NavigationWidget.swf"/>
    <widget right="-2" bottom="-2" config="widgets/OverviewMap/OverviewMapWidget.xml" url="widgets/OverviewMap/OverviewMapWidget.swf"/>
    <widget right="20" top="55"    config="widgets/MapSwitcher/MapSwitcherWidget.xml" url="widgets/MapSwitcher/MapSwitcherWidget.swf"/>
    <widget left="0"   top="0"     config="widgets/HeaderController/HeaderControllerWidget.xml" url="widgets/HeaderController/HeaderControllerWidget.swf"/>

    <map initialextent="-9559973 4601704 -9529513 4621654" top="40" zoomslidervisible="false" addarcgisbasemaps="true" wraparound180="true">
        <operationallayers>
            <layer label="Louisville Landbase" type="dynamic" visible="true" alpha="0.4"
                   url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Louisville/LOJIC_LandRecords_Louisville/M..."/>
        </operationallayers>
    </map>

    <!-- widgets organized into widget containers that manage close/open etc -->
    <!-- supported layout property options: horizontal(default)|float|vertical|fix-->
    <widgetcontainer layout="float">
        <widget label="Swipe Spotlight" left="100" top="60" preload="open"
                icon="widgets/SwipeSpotlight/assets/images/i_swipe.png"
                url="widgets/SwipeSpotlight/SwipeSpotlightWidget.swf"
                config="widgets/SwipeSpotlight/SwipeSpotlightWidget.xml"/>
    </widgetcontainer>
</configuration>
0 Kudos
RhettZufelt
MVP Notable Contributor
Yes, I have operational layers, but have figured out some of what is going on.  I have my operational layers loaded as type="feature".
However, the SwipeSpotlight tool will support type="dynamic" (with no sublayers) with usebasemaps=false, but usebasemaps has to be set to "true" to get type="feature" operational layers to show in the drop down.

If I set my sublayer ID so  that I can get the popups to work on dynamic, then the SwipeSpotlight behaves the same as with type="feature" (I.e, the drop down does not populate).
 

Guess I can set it to usebasemaps="true", then go into the mxml and "filter out" all the basemaps from the list.

R_
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Rhett,

   I will have to test with feature type operational layers (I don't think I have done this).
0 Kudos
RhettZufelt
MVP Notable Contributor
Robert,

Not sure if you noticed I edited my post, but It appears as if type="dynamic" behaves the same way if you load a sublayer (which I need for PopUps to work).

R_
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Rhett,

Care to share your main config.xml? I have tested my 3.0 version with an operational layer that has type="feature" and it works fine and shows in the drop down.
0 Kudos
RhettZufelt
MVP Notable Contributor
Sure can, however, when trying to get you an "example" I figured something else out.

Does not seem to matter if I use a type feature or dynamic it seems to work.  HOWEVER, if I configure ANY popup on ANY layer, then the list will only populate if usebasemap=true.

R_

If I uncomment EITHER of the services with PopUps, it will "mis-behave".


<configuration>
    <title>Washington Closure Hanford</title>
    <subtitle>River Corridor Closure - Not For Design Use</subtitle>
    <logo>assets/images/logo.png</logo>
    <style>
        <colors>0xFFFFFF,0x333333,0x101010,0x000000,0xFFD700</colors>
        <alpha>0.8</alpha>
    </style>
    <bing key="AiaFVmE9xmvmVUzC_RZpSZPq3CdFGutOv5xC52-2f_hNW7O80xqSgVHa2Q-3ws_x"/>
    <!-- replace the following url with your own geometryservice -->
    <geometryservice url="http://gis01.wch-rcc.com/ArcGIS/rest/services/Geometry/GeometryServer" />

    <!-- UI elements -->
    <widget left="10"  top="50"    config="widgets/Navigation/NavigationWidget.xml" url="widgets/Navigation/NavigationWidget.swf"/>
    <widget left="8"  bottom="70"  config="widgets/Coordinate/CoordinateWidget.xml" url="widgets/Coordinate/CoordinateWidget.swf"/>
    <widget right="-2" bottom="-2" config="widgets/OverviewMap/OverviewMapWidget.xml" url="widgets/OverviewMap/OverviewMapWidget.swf"/>
    <widget right="20" top="55"    config="widgets/MapSwitcher/MapSwitcherWidget.xml" url="widgets/MapSwitcher/MapSwitcherWidget.swf"/>
    <widget left="0"   top="0"     config="widgets/HeaderController/HeaderControllerWidget.xml" url="widgets/HeaderController/HeaderControllerWidget.swf"/>
    <widget right="95" bottom="3" config="widgets/Copyright/CopyrightWidget.xml" url="widgets/Copyright/CopyrightWidget.swf"/>

    <map esrilogovisible="false" wraparound180="true" initialextent="571640 150000 579000 155000" fullextent="546200 111450 599500 165000" top="40" addarcgisbasemaps="false">
          <basemaps>
            <layer label="None" type="tiled" visible="false" alpha="1"
                   icon="assets/images/basemap_none.jpg"
                   url="http://gis01.wch-rcc.com/ArcGIS/rest/services/Base/none/MapServer"/>
            <layer label="Hanford" type="dynamic" visible="true" alpha="1"
                   icon="assets/images/basemap_2015.jpg"
                   url="http://gis01.wch-rcc.com/ArcGIS/rest/services/Base/base_background/MapServer"/>
            <layer label="2008" type="tiled" visible="false" alpha="1"
                   icon="assets/images/basemap_2008.jpg"
                   url="http://gis01.wch-rcc.com/ArcGIS/rest/services/Imagery_2008/MapServer"/>
            <layer label="2009"    type="tiled" visible="false" alpha="1"
                   icon="assets/images/basemap_2009.jpg"
                   url="http://gis01.wch-rcc.com/ArcGIS/rest/services/Base/2009_Imagery/MapServer"/>
            <layer label="2011"    type="tiled" visible="false" alpha="1"
                   icon="assets/images/basemap_2011.jpg"
                   url="http://gis01.wch-rcc.com/ArcGIS/rest/services/Base/2011_Imagery/MapServer"/>


        </basemaps>

        <operationallayers>
 
<!--   <layer label="Plumes" type="dynamic" visible="false" alpha="1"-->
<!--      url="http://gis01.wch-rcc.com/ArcGIS/rest/services/rkz/d2h_cr_plume_con/MapServer">-->
<!--      <sublayer id="0" popupconfig="popups/PopUp_plumes.xml"/>-->
<!--    </layer>-->

   <layer label="Plumes_no_popup" type="dynamic" visible="true" alpha="1"
      url="http://gis01.wch-rcc.com/ArcGIS/rest/services/rkz/d2h_cr_plume_con/MapServer"/>


<!--   <layer label="Hanford Wells" type="dynamic" visible="false" alpha="1"-->
<!--      url="http://gis01.wch-rcc.com/ArcGIS/rest/services/Base/wells/MapServer">-->
<!--      <sublayer id="1" popupconfig="popups/PopUp_wells.xml"/>-->
<!--      <sublayer id="0" popupconfig="popups/PopUp_Inject.xml"/>-->
<!--    </layer>-->


        </operationallayers>
    </map>

    <!-- widgets organized into widget containers that manage close/open etc -->
    <!-- supported layout property options: horizontal(default)|float|vertical|fix-->
    <widgetcontainer layout="float">

        <widget label="Bookmarks"         left="430" top="90"
                icon="assets/images/i_bookmark.png"
                config="widgets/Bookmark/BookmarkWidget.xml"
                url="widgets/Bookmark/BookmarkWidget.swf"/>

       <widget label="Dynamic Legend" x="50" y="100" preload="open" height="500"
    icon="assets/images/i_legend2.png"
    config="widgets/DynamicLegend/DynamicLegendWidget.xml"
    url="widgets/DynamicLegend/DynamicLegendWidget.swf"/>
     <widget label="Swipe Spotlight" left="60" top="330" preload="minimize"
                icon="assets/images/i_swipe.png"
                url="widgets/SwipeSpotlight/SwipeSpotlightWidget.swf"
                config="widgets/SwipeSpotlight/SwipeSpotlightWidget.xml"/>

    </widgetcontainer>

</configuration>
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Rhett,

   Go it. A change was made in 3.0 that is only seen when using popups on op layers that was causing the issue. I have fixed this now and will release a new version ASAP.


Edit new version now available:

http://www.arcgis.com/home/item.html?id=b9767b3f300142488c798953a94906fc
0 Kudos
RhettZufelt
MVP Notable Contributor
That did it.

Thanks Robert,

Rhett
0 Kudos