Select to view content in your preferred language

Preview of two great new widgets coming out mid January 2011

31363
156
12-30-2010 10:46 AM
RobertScheitlin__GISP
MVP Emeritus
All,

   I have been working hard on two great new widgets that I want you to preview. The final versions will be made available Mid January 2011 and submitted to the Flex a Widget competition.

http://www.esri.com/events/devsummit/get-involved/widget-challenge.html

The first is a new route widget for FlexViewer 2.2

Its' feature include:


  • Up to ten stops that can be added to the map interactively or by single line address matching using Bing geocoder.

  • Up to ten point barriers that can be added in the same fashion as stops.

  • Interactively added stops and barriers are automatically reverse geocoded.

  • You can calculate by time or distance and optionally use best sequence.

  • Route segments can be individually clicked in the directions list and visualized using a polyline animation (Thanks to Mark Deaton).

  • The big deal for this widget is its' printing capability. Both direct printer output and PDF output are supported. Multi page output with headers and footers and the option to include the large route image are all included. The individual direction segments have maneuver arrows that are included by default but can optionally be turned off. Things like configuring alternating directions background color can also be configured.


So if you are a developer and don't care about routing but want to know how to do moderately advanced multi page printing and AlivePDF techniques than this widget is for you.

Preview here:
http://gis.calhouncounty.org/FlexViewer2.2/index.html?config=config-route.xml



The second one is a new infoTemplate for featurelayers.

The Attachment Relate Info Window Widgets' features include:


  • Ability to specify which fields are displayed

  • Specify one link field that will display as a clickable text or an actual image in the info window

  • Buttons at the bottom of the window for Zooming to feature, querying attachments, querying related features or tables

  • Attachments are preview only and are displayed in a custom grid popup not the standard attachment inspector.

  • Relates are initially displayed in a grid that allows for the selection of which related feature you want to preview and then when you choose the one you want to see then a floating datagrid is displayed with the related records.


In the examples below click on the point in the screen.

Preview of attachment and link capability:
http://gis.calhouncounty.org/FlexViewer2.2/index.html?config=config-attachment.xml

Preview of related feature capability:
http://gis.calhouncounty.org/FlexViewer2.2/index.html?config=config-relate.xml

preview of image link in info window:
http://gis.calhouncounty.org/FlexViewer2.2/index.html?config=config-infoimage.xml
Tags (2)
0 Kudos
156 Replies
SamRideout
New Contributor
Hi Robert,

I have a problem that I am hoping that you�??ll be able to help me with.  First, I really appreciate your identify widget.  It is a fantastic tool, with exactly the functionality that I am looking for.  Also, please know that your tremendous support for this tool is very much appreciated.

Initially, I want to use the tool for a very simple popup window with a hyperlink.  Eventually, I want to use the full functionality of the tool.  As a starting point, using the sample data provided, I simplified the tool through modifications to the config-infoimage.xml and IWT_Cameras.xml files for the AttRelateInfoWinWidget and the Louisville/LOJIC_PublicSafety_Louisville data.  Everything worked as expected.  After that, while trying to use my own data, I am totally stuck.  I have scoured this formum as well as many of the other forums and have found some great information but I still can�??t get past my problem.

I am unable to get the widget to operate with my operationallayers layer.  The basemap comes up fine but the operational layer does not display.  If I use the operational layer as a basemap it will display find so I know the server is publishing the data properly.

I am using ArcGIS Server 10
Identify widget 2.2.1
The ArcGIS viewer code
Flash builder 4
I have implemented crossdomain.xml on the server
I am working from my Home Computer accessing the server data
I have republished my data in a file geodatabase rather than a shapefile
My operational layer is in the same coordinate system as the base layer

Your help on this problem will be greatly appreciated.

Here�??s the code for my Config.xml:

<?xml version="1.0" ?>

<configuration>
    <title>Attachment Relate Info Window Widget Sample</title>
    <subtitle>Preview of attachment relate info window Widget for FlexViewer 2.2</subtitle>
    <style>
     <colors>0xFFFFFF,0x333333,0x101010,0x000000,0xFFD700,0x000000</colors>
</style>
    <bing key="Al0VE_jsmagxk4LFghXGlK5JSHfC0tk-eHRubZv_eMYm6wzgQaStYks8g-wWcgk3"/>

    <widget left="10" top="50" config="widgets/Navigation/NavigationWidget.xml" url="widgets/Navigation/NavigationWidget.swf"/>
    <widget left="0" top="0" config="widgets/HeaderController/HeaderControllerWidget.xml" url="widgets/HeaderController/HeaderControllerWidget.swf"/>

    <map initialextent="2161043 7283519 2856700 7679584" top="40">
        <basemaps>
           <layer label="Topo Map" type="dynamic" visible="true"  alpha="1"
               url="http://198.164.148.17/ArcGIS/rest/services/Flood_Jan_2011_SNB/MapServer"/>

        <operationallayers>
          <layer label="Water Gauges" type="dynamic" visible="true" alpha="1"
                   info="widgets/InfoTemplates/AttRelateInfoWinWidget.swf"
                   infoconfig="widgets/InfoTemplates/Sam_data.xml"
                   url="http://198.164.148.17/ArcGIS/rest/services/Gauges_05/MapServer/0"/>
             <identifylayeroption>visible</identifylayeroption>
        </operationallayers>
         </basemaps>

     </map>
    <widgetcontainer />
</configuration>

Here is the code for my widget configuration xml file:

<?xml version="1.0" ?>
<configuration>
<fields>Gauge_URL,Name</fields>
    <titlefield>Name</titlefield>
    <links>
     <linkfield icon_or_text_or_img="text" icon=""
          linkalias="Go To Graphs..." linkprefix="" linksuffix="">Gauge_URL</linkfield>
    </links>
    <multiimagefield linkprefix="" linksuffix="" nexttooltip="Next" prevtooltip="Prev"></multiimagefield>
    <layername>Water Gauges</layername>
    <zoomscale>5000</zoomscale>
    <csvseparator>,</csvseparator>
    <labels>
     <csvdefaultname>Related Records</csvdefaultname>
  <exportbtnlabel>Export...</exportbtnlabel>
  <export2csvoptionlabel>Export to CSV...</export2csvoptionlabel>
  <export2txtoptionlabel>Export to Txt...</export2txtoptionlabel>
    </labels>
</configuration>
0 Kudos
SamRideout
New Contributor
Follow-up.....

I changed the type to:  type="feature"  as dynamic is not a supported type for operationalvlayers....  still no love

sam
0 Kudos
JasonNielsen
Occasional Contributor
Your service seems to work correctly. I noticed in your .xml for the identify your layer name is incorrect. The name of your Layer is "Stations". Just change this
<layername>Water Gauges</layername>
to
<layername>Stations</layername>
I think that should fix your problem you were having.


Hi Robert, 

I have a problem that I am hoping that youâ??ll be able to help me with. First, I really appreciate your identify widget. It is a fantastic tool, with exactly the functionality that I am looking for. Also, please know that your tremendous support for this tool is very much appreciated. 

Initially, I want to use the tool for a very simple popup window with a hyperlink. Eventually, I want to use the full functionality of the tool. As a starting point, using the sample data provided, I simplified the tool through modifications to the config-infoimage.xml and IWT_Cameras.xml files for the AttRelateInfoWinWidget and the Louisville/LOJIC_PublicSafety_Louisville data. Everything worked as expected. After that, while trying to use my own data, I am totally stuck. I have scoured this formum as well as many of the other forums and have found some great information but I still canâ??t get past my problem. 

I am unable to get the widget to operate with my operationallayers layer. The basemap comes up fine but the operational layer does not display. If I use the operational layer as a basemap it will display find so I know the server is publishing the data properly. 

I am using ArcGIS Server 10 
Identify widget 2.2.1 
The ArcGIS viewer code 
Flash builder 4 
I have implemented crossdomain.xml on the server 
I am working from my Home Computer accessing the server data 
I have republished my data in a file geodatabase rather than a shapefile 
My operational layer is in the same coordinate system as the base layer 

Your help on this problem will be greatly appreciated. 

Hereâ??s the code for my Config.xml: 

<?xml version="1.0" ?> 

<configuration> 
<title>Attachment Relate Info Window Widget Sample</title> 
<subtitle>Preview of attachment relate info window Widget for FlexViewer 2.2</subtitle> 
<style> 
<colors>0xFFFFFF,0x333333,0x101010,0x000000,0xFFD700,0x000000</colors> 
</style> 
<bing key="Al0VE_jsmagxk4LFghXGlK5JSHfC0tk-eHRubZv_eMYm6wzgQaStYks8g-wWcgk3"/> 

<widget left="10" top="50" config="widgets/Navigation/NavigationWidget.xml" url="widgets/Navigation/NavigationWidget.swf"/> 
<widget left="0" top="0" config="widgets/HeaderController/HeaderControllerWidget.xml" url="widgets/HeaderController/HeaderControllerWidget.swf"/> 

<map initialextent="2161043 7283519 2856700 7679584" top="40"> 
<basemaps> 
<layer label="Topo Map" type="dynamic" visible="true" alpha="1" 
url="http://198.164.148.17/ArcGIS/rest/services/Flood_Jan_2011_SNB/MapServer"/> 
  
<operationallayers> 
<layer label="Water Gauges" type="dynamic" visible="true" alpha="1" 
info="widgets/InfoTemplates/AttRelateInfoWinWidget.swf" 
infoconfig="widgets/InfoTemplates/Sam_data.xml" 
url="http://198.164.148.17/ArcGIS/rest/services/Gauges_05/MapServer/0"/> 
<identifylayeroption>visible</identifylayeroption> 
</operationallayers> 
</basemaps> 

</map> 
<widgetcontainer /> 
</configuration> 

Here is the code for my widget configuration xml file: 

<?xml version="1.0" ?> 
<configuration> 
<fields>Gauge_URL,Name</fields> 
<titlefield>Name</titlefield> 
<links> 
<linkfield icon_or_text_or_img="text" icon=""  
linkalias="Go To Graphs..." linkprefix="" linksuffix="">Gauge_URL</linkfield> 
</links> 
<multiimagefield linkprefix="" linksuffix="" nexttooltip="Next" prevtooltip="Prev"></multiimagefield> 
<layername>Water Gauges</layername> 
<zoomscale>5000</zoomscale> 
<csvseparator>,</csvseparator> 
<labels> 
<csvdefaultname>Related Records</csvdefaultname> 
<exportbtnlabel>Export...</exportbtnlabel> 
<export2csvoptionlabel>Export to CSV...</export2csvoptionlabel> 
<export2txtoptionlabel>Export to Txt...</export2txtoptionlabel> 
</labels> 
</configuration>
0 Kudos
SamRideout
New Contributor
Thanks Jason.....

My assumption was that the <layername> had to match the layer label in the config.xml......

My bad.....

However, I tried resetting the <layername> as you suggested and still no love.  Is there a chance my server is not publishing "feature" type correctly?

I believe the widget is firing as the mousue icon does change from a standard arrow to a hand

Any ideas?

Sam
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Sam,

   So here is the run down.

1. Change the layer name back to:
<layername>Water Gauges</layername>


2. Leave the type as feature in the main config.xml.

3. Your operational layers are inside the basemap element and that is incorrect they should be a child of map not basemaps.

<?xml version="1.0" ?>

<configuration>
 <title>Attachment Relate Info Window Widget Sample</title>
 <subtitle>Preview of attachment relate info window Widget for FlexViewer 2.2</subtitle>
 <style>
  <colors>0xFFFFFF,0x333333,0x101010,0x000000,0xFFD700,0x000000</colors>
 </style>
 <bing key="Al0VE_jsmagxk4LFghXGlK5JSHfC0tk-eHRubZv_eMYm6wzgQaStYks8g-wWcgk3"/>
 
 <widget left="10" top="50" config="widgets/Navigation/NavigationWidget.xml" url="widgets/Navigation/NavigationWidget.swf"/>
 <widget left="0" top="0" config="widgets/HeaderController/HeaderControllerWidget.xml" url="widgets/HeaderController/HeaderControllerWidget.swf"/>
 
 <map initialextent="2161043 7283519 2856700 7679584" top="40">
  <basemaps>
   <layer label="Topo Map" type="dynamic" visible="true" alpha="1"
    url="http://198.164.148.17/ArcGIS/rest/services/Flood_Jan_2011_SNB/MapServer"/>
  </basemaps>
  <operationallayers>
   <layer label="Water Gauges" type="feature" visible="true" alpha="1"
    info="widgets/InfoTemplates/AttRelateInfoWinWidget.swf"
    infoconfig="widgets/InfoTemplates/Sam_data.xml"
    url="http://198.164.148.17/ArcGIS/rest/services/Gauges_05/MapServer/0"/>
  </operationallayers>
 </map>
 <widgetcontainer />
</configuration>
0 Kudos
SamRideout
New Contributor
Robert,

Thank you so much!

What should have been an obvious thing turned into many hours for me.  You have my deep gratitude.

It works!  Fantastic wizard and again thank you for providing all of your support to all of us out here in GIS-land.  I will rate the wizard.

Sam
0 Kudos
philippschnetzer
Occasional Contributor III
Robert,

Great widget!  I have some questions and thoughts for future updates......

1) Instead of having to click the 'Done' button to open a related table could it be made to open with a double click?

2) Resize-able window that contains the list of related tables...

3) I could not find anywhere in your code about how it alphabetizes the fields in related tables - I would prefer to disable this feature.

4) Keep the window with the related tables open even once a table is selected.  I have numerous tables to access and it would be nice not to have to re-enter this window each time...

5) Is it possible to include fields from a related table in the little pop-up that appears when you click on a feature.  If this was possible it would greatly reduce the need/dependency to access related tables over and over...

Just some thoughts.....

Once again, you have created a great tool(s) and I, along with everyone else I'm sure, truly appreciates your continued effort..
0 Kudos
ShannakaBeveridge
New Contributor II
Hi,

I'm having trouble getting this to work with the query widget. It gets a heading for the info window but none of the fields and no relates or attachments are shown. I've set the info template <info>widgets/InfoTemplates/AttRelateInfoWinWidget.swf</info> in the query .xml and the info config file in the mxml:

var data:Object =
                        {
                            id: String(this.widgetId),
                            url: infoUrl,
                            config: "widgets/InfoTemplates/IWT_Projects.xml"
                        };


The info config file works on the layer if I use it without the query widget. Has anyone tried this and got it to work or know of any reason why this wouldn't work?

Cheers,

Shannaka
0 Kudos
JasonHansel
New Contributor
Can you export to an .MXD and open in ArcMap?

Thanks.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Hi,

I'm having trouble getting this to work with the query widget. It gets a heading for the info window but none of the fields and no relates or attachments are shown. I've set the info template <info>widgets/InfoTemplates/AttRelateInfoWinWidget.swf</info> in the query .xml and the info config file in the mxml:

var data:Object =
                        {
                            id: String(this.widgetId),
                            url: infoUrl,
                            config: "widgets/InfoTemplates/IWT_Projects.xml"
                        };


The info config file works on the layer if I use it without the query widget. Has anyone tried this and got it to work or know of any reason why this wouldn't work?

Cheers,

Shannaka


Shannaka,

   There is an overall Query widget bug that the viewer team is aware of. But I am not sure if that is what you are running into or not. My info window is meant to be used with a feature layer and not as the info window of some other widget like the searchWidget or queryWidget, so that may be your issue.
0 Kudos