Select to view content in your preferred language

Viewer for Flex 2.0: Simple Identify with Hyperlink

2096
10
08-11-2010 12:43 PM
JanBenson
Deactivated User
I'm a newbie working with the viewer for Flex 2.0.  I have got the bookmarks and query customized to work in the sample, but not the identify.  I would like a simple identify with the ability to hyperlink.  I presumed that is the SimpleInfoWinWidget as opposed to the InfoPopupWidget.  I tried this:

<configuration>
    <httpproxy enabled="false">proxy.php</httpproxy>
    <title>Alaska Fishing Communities</title>
    <subtitle>AK Fisheries Science Center</subtitle>
    <logo>assets/images/nlogo28.jpg</logo>
    <stylesheet>lighterside.swf</stylesheet>
<!--    <stylesheet>blackgold.swf</stylesheet> -->

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

    <map initialextent="-20029400 6435440 -14645605.9 11983801.7">
        <basemaps>

            <mapservice label="Streets" type="tiled" visible="true"  alpha="1"
                        url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"/>
            <mapservice label="Aerial"  type="tiled" visible="false" alpha="1"
                        url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"/>
            <mapservice label="Topo"    type="tiled" visible="false" alpha="1"
                        url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"/>
        </basemaps>
        <operationallayers>
           <layer label="Fishing Communities" type="dynamic" visible="true" alpha="1"
                   info="widgets/InfoTemplates/SimpleInfoWinWidget.swf"
                   infoconfig="widgets/InfoTemplates/SIW_Fish.xml"
                   url="http://mymapservice/arcgis/rest/services/FishMerc/MapServer"/>        
        </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" x="400" y="60" icon="assets/images/i_bookmark.png"
                config="widgets/Bookmark/BookmarkWidget.xml"
                url="widgets/Bookmark/BookmarkWidget.swf"/>
        <widget label="Identify" x="590" y="300" icon="assets/images/i_table.png"
                config="widgets/Query/QueryWidget_FishingCommunities.xml"
                url="widgets/Query/QueryWidget.swf"/>
        <widget label="Identify" icon="assets/images/i_info.png"            
                config="widgets/InfoTemplates/SIW_Fish.xml"
                url="widgets/InfoTemplates/SimpleInfoWinWidget.swf"/>       
        <widget label="Earthquakes (GeoRSS)"
                icon="assets/images/i_rss.png"
                config="widgets/GeoRSS/GeoRSSWidget.xml"
                url="widgets/GeoRSS/GeoRSSWidget.swf"/>
        <widget label="Draw"
                icon="assets/images/i_draw2.png"
                config="widgets/Draw/DrawWidget.xml"
                url="widgets/Draw/DrawWidget.swf"/>
        <widget label="Print"
                icon="assets/images/i_print.png"
                config="widgets/Print/PrintWidget.xml"
                url="widgets/Print/PrintWidget.swf"/>

        <!--
        <widget label="My first widget"
                icon="assets/images/i_widget.png"
                config="widgets/Samples/HelloWorld/HelloWorldWidget.xml"
                url="widgets/Samples/HelloWorld/HelloWorldWidget.swf"/>
        -->
    </widgetcontainer>
</configuration>

SIW_Fish.xml looks like:
<?xml version="1.0" ?>
<configuration>
    <titlefield>Category</titlefield>
    <fields>Category,Link</fields>
    <datefields></datefields> <!-- field in milliseconds -->
    <zoomscale>10000000</zoomscale>
</configuration>

When I click on my identify button, a "Zoom here" pops up on the slider scale box.  Nothing happens when I click on my identify button. 

What am I doing wrong and how do I make this work?

Thanks.
Tags (2)
0 Kudos
10 Replies
JanBenson
Deactivated User
Bjorn,

  I'm the original poster as opposed to Steve, so my layers are Category and Link.  Your discussion was very informative.  So I am using SimpleInfoWinWidget.swf with MapServer/0.  This means my layer is FishCommunities (ID:0) which is a feature layer.  My SIW_Fish.xml defines the parameters as
<?xml version="1.0" ?>
<configuration>
    <titlefield>Category</titlefield>
    <fields>Category,Link</fields>
    <datefields></datefields> <!-- field in milliseconds -->
    <zoomscale>10000000</zoomscale>
</configuration>

Am I missing something here or could this have something to do with having my application running on Windows 2003R2, 64 bit, SP2?  Since the other changes were relatively painless, I am perplex why this is so difficult.  It is such a simple application of just showing the locations, identify, and click hyperlink for more information.  I don't cross the 180° line so that should not complicate matters.  I have attached an image of the web page with the "Zoom here" next to the slider.  My code is as follows:

        <operationallayers>
           <layer label="Fishing Communities" type="feature" visible="true" alpha="1"
                   info="widgets/InfoTemplates/SimpleInfoWinWidget.swf"
                   infoconfig="widgets/InfoTemplates/SIW_Fish.xml"
                   url="http://myserver/arcgis/rest/services/FishMerc/MapServer/0"/>        
        </operationallayers>

and

    <widgetcontainer layout="float">
        <widget label="Bookmarks" x="400" y="60" icon="assets/images/i_bookmark.png"
                config="widgets/Bookmark/BookmarkWidget.xml"
                url="widgets/Bookmark/BookmarkWidget.swf"/>
        <widget label="Identify" x="590" y="300" icon="assets/images/i_table.png"
                config="widgets/Query/QueryWidget_FishingCommunities.xml"
                url="widgets/Query/QueryWidget.swf"/>
        <widget label="Identify" icon="assets/images/i_info.png"            
                config="widgets/InfoTemplates/SIW_Fish.xml"
                url="widgets/InfoTemplates/SimpleInfoWinWidget.swf"/>       
        <widget label="Earthquakes (GeoRSS)"
                icon="assets/images/i_rss.png"
                config="widgets/GeoRSS/GeoRSSWidget.xml"
                url="widgets/GeoRSS/GeoRSSWidget.swf"/>


And I presume the SimpleInfoWinWidget is what I want instead of InfoPopupWidget.
0 Kudos