Feature Tooltip/Maptip for FlexViewer 2.2

1500
21
01-21-2011 09:28 AM
RobertScheitlin__GISP
MVP Emeritus
All,

   Here is a very simple widget for displaying a map tip on mouse over of a layer that is a Feature type operational or basemap layer. It REQUIRES a layer that is type="feature" to work.

http://www.arcgis.com/home/item.html?id=ce63f1bdd5e64068b9a4fadd2028e379
Tags (2)
0 Kudos
21 Replies
JakeAalfs
New Contributor
Hi Robert,

When you say, 'It REQUIRES a layer that is type="feature" to work.', do you mean a feature layer only available if using Server 10.0, eg. FeatureServer/0?

Jake
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Jake,

   No what I mean is in the main config file when you specify a layer for the map you have the choice of dynamic, tiled, feature, image, etc.  The layer type must be feature not the service type people seem to be getting this confused quite often.
0 Kudos
JakeAalfs
New Contributor
When publishing the map service is there anything special I need to set in order to use type="feature".

Here are two lines from my config.xml:

<layer label="Stormwater Feature Dynamic Type" type="dynamic" visible="true"
                   url="http://fpm-gisproxy.fpm.csupomona.edu/ArcGIS/rest/services/storm_feature/MapServer"/>

     <layer label="Stormwater Feature Feature Type" type="feature" visible="true"
                   info="widgets/InfoTemplates/InfoPopupWidget.swf"
       infoconfig="widgets/InfoTemplates/IWT_Storm_Feature.xml"
       url="http://fpm-gisproxy.fpm.csupomona.edu/ArcGIS/rest/services/storm_feature/MapServer/0"/>

The first one displays the items, while the second does not, and hence the InfoPopup is not available.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Jake,

   Nope... Nothing special. Here is what is in my live sample sites' config.xml

        <operationallayers>
          <layer label="Louisville Zoning" type="feature" visible="true" alpha="0" mode="onDemand"
                   url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Louisville/LOJIC_LandRecords_Louisville/MapServer/2"/>
             <layer label="Louisville Zoning" type="dynamic" visible="true" alpha="0.4" visiblelayers="2"
                   url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Louisville/LOJIC_LandRecords_Louisville/MapServer"/>
             <layer label="Louisville Police Facilities" type="feature" visible="true" alpha="1"
                   url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Louisville/LOJIC_PublicSafety_Louisville/MapServer/3"/>
        </operationallayers>
0 Kudos
JakeAalfs
New Contributor
Robert,

I don't understand why the feature layer does not display, and therefore InfoPopup does not work. If you take a look here:

http://fpm-gisproxy.fpm.csupomona.edu/flashviewer_test/

And run your identify widget, it returns info from both the dynamic and feature, but only one is viewable.

Any ideas?

Jake
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Jake,

   Your website does not seem to be publicly accessible.
0 Kudos
JakeAalfs
New Contributor
Thanks for your help so far, I'll keep plugging away till I figure it out.
0 Kudos
MehulChoksey
Esri Contributor
Jake,
one of the reason for features not getting displayed on the map is that  features only when they are within visible scale range.(between min and max scale.)
0 Kudos
NathanEnge
Esri Contributor
Robert I am having no joy with this widget. I do believe it is configured per your example. Any Ideas?

In my config file in the UI Element section:
<widget left="0" top="0"     config="widgets/FeatureTooltip/FeatureTooltipWidget.xml" url="widgets/FeatureTooltip/FeatureTooltipWidget.swf"/>


In my config file in the operationallayers tag:
<layer label="Species" type="feature" visible="true" alpha="0"
             url="http://www.mapservices.ca/ArcGIS/rest/services/Prima/Prima_Operational/MapServer/5"/>



Layer: Single Stem Species (ID: 5)

Display Field: INGENIERO

Type: Feature Layer

Geometry Type: esriGeometryPoint

Description:

Definition Expression:

Copyright Text:

Min. Scale: 60000

Max. Scale: 0

Default Visibility: True



Extent:

  • XMin: -77.3732140788757

  • YMin: 6.27068000300208
    XMax: -77.3520981540437
    YMax: 6.31735493446076
    Spatial Reference: 4170
Has Attachments: False

HTML Popup Type: esriServerHTMLPopupTypeAsHTMLText




The FeatureTooltipWidget.xml:
<?xml version="1.0" ?>
<configuration>
 <layers>
        <layer>
            <name>Species</name>
            <fields>INGENIERO,ESPECIE,OTRO_OTH,DAP_DBH,longitud</fields>
        </layer>
 </layers>
</configuration>
0 Kudos