Select to view content in your preferred language

Preview of two great new widgets coming out mid January 2011

31325
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
ShannakaBeveridge
New Contributor II
Thanks for the direction. The problem was caused by an incorrect <layername>.

Attachments are working but I am getting no relates and the "Invalid value for parameter 'relationshipId'" after clicking done. Edit: just checked the rest service and no relationships are listed so it's an issue with the service not the widget.

Thanks for a fantastic widget and providing support as well. Can't wait to get this working.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Shannaka,

   You have to select one of the relationships from the table before you click done.
0 Kudos
CoryHines
New Contributor
Hi Robert,

I have a really dumb question that I'm sure is simple.  I am attempting to hide both the attachment and relate icons on the popup.  My data doesn't contain either for how I'm using your widget, which is awesome by the way.  I changed this section of code in the AttRelateInfoWinWidget.mxml file.

flyToSearch = lyrCurrent as FeatureLayer;
//Check to see if the featurelayer has relationships
if (flyToSearch.layerDetails.relationships)
{
           // changed to false to hide icon
           buttons.showRelateBtn(false);
}
//Check to see if the featurelayer has attachment capablity
if (flyToSearch.layerDetails.hasAttachments)
{
          // changed to false to hide icon
          buttons.showAttachBtn(false);
}

That hides the relate button, but not the attachment button.  I tried a couple of other things in this file and in the AttRleateInfoButtons.mxml file as well.

No big deal if it's not possible.

Hope you aren't getting any of the nasty weather going across the country.

Cory
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Cory,

   Try this:

       //find the matching feature layer
       for each (var lyrCurrent:Layer in map.layers)
       {
        //stop on the matching layer
        if (lyrCurrent.name == layername)
        {
         flyToSearch = lyrCurrent as FeatureLayer;
         //Check to see if the featurelayer has relationships
         if (flyToSearch.layerDetails.relationships)
         {
          buttons.showRelateBtn(true);
         }
         //Check to see if the featurelayer has attachment capablity
         if (flyToSearch.layerDetails.hasAttachments)
         {
          buttons.showAttachBtn(true);
         }
        }
       }
       buttons.showRelateBtn(false);
       buttons.showAttachBtn(false);
0 Kudos
CoryHines
New Contributor
Well that was easy!  Thanks again.

Cory
0 Kudos
ShannakaBeveridge
New Contributor II
Hi,

I'm trying to integrate this with the edit widget, i.e. add a 'show relates' button in the AttributeInspector. Is there a way to get the layername from the selected feature rather than the configxml?

if (layername)
    {
     //find the matching feature layer
     var flyToSearch:FeatureLayer;
     for each (var lyrCurrent:Layer in map.layers)
     {
      //stop on the matching layer
      if (lyrCurrent.name == layername)
      {


Thank you in advance!
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Shannaka,


   I don't use the editor widget, so I took a look at the code for it and you might look at the featureLayer_selectionComplete function that would give you access I believe to the particular featurelayer selected.
0 Kudos
CaussinDavid
New Contributor
Hi everybofy

first of all sorry for my bas english but i  come from Belgium.

Thanx to Robert for his works ans for sharing it.

In my project, i use the Enhanced Search Widget.

I would like to make a link to a directory with some PDF file.

For exemple add a icon that could read a directory and list the pdf files that they are in.

We only work in intranet.

i dont know if it is possible of it could take long time to develop it.

Perhaps is there an other simplier method to do this.

Thanx in advance.

David
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
David,

   Flash Player does not have access to the file system on the client machine for obvious security reasons. So the only way this could possibly be done is if you have a virtual directory with directory browsing enabled and use some client side scripting like PHP, ASP, or Coldfusion to get a listing of all files and return them to Flex. Bottom line is this functionality would be difficult to setup and is improbable for this widget. Thanks for the enhancement request though.
0 Kudos
CaussinDavid
New Contributor
thanks for all...

If i understand, i have to use the attachements capabilities.... ans thus use SDE and Oracle to make BLOB fields??

is it a possible solution?? My PDF are sometimes 400Mo ...
0 Kudos