Select to view content in your preferred language

Heat Map Widget for ArcGIS Viewer for Flex

670
1
04-18-2012 10:54 AM
ErnestCacciaglia
Deactivated User
Though the Heat Map widget appears to work properly, it does not return any features when I attempt to use the query function.  I am querying for string values.  Below, please find the query portion of the widget's config file.  Can anyone tell me what is wrong here?


<outFields>MATERIAL</outFields>
   <useamf>true</useamf>
   <defaultquery>1=1</defaultquery>
   <querytemplate>MATERIAL = 'REPLACE_STR'</querytemplate>
   <types>Other,Wood,Metal</types>
   <type_descs>Material = Other, Material = Wood, Material = Metal</type_descs>


Thanks in advance for any help you can give.
Tags (2)
0 Kudos
1 Reply
LloydHeberlie
Regular Contributor
Hi Ernest,

You might check the CaSe of the values in your field MATERIAL?  The queries are case SenSitive.

Returns 132 records.
http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Earthquakes/Since_1970/MapServer/0/query?...

Returns 0 records.
http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Earthquakes/Since_1970/MapServer/0/query?...

See the sample below for an earthquakes query using a LIKE operator on the field Name
The values in the <types></types> markup must match the values in your data (File Geodatabase Featureclass, etc).

Hope this helps,

Lloyd
Esri Flex Team


http://stlouis.esri.com/apps/flexviewer24/index.html?config=heatmap-config-like.xml

<?xml version="1.0" ?>
<configuration>
 <layers>
        <layer>
            <name>Earthquakes HeatMap</name>
            <url>http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Earthquakes/Since_1970/MapServer/0</url>
            <outFields>YYYYMMDD,Magnitude,Num_Injured,Num_Deaths,Name</outFields>
   <useamf>true</useamf>
   <defaultquery>1=1</defaultquery>
   <querytemplate>Name LIKE '%REPLACE_STR%'</querytemplate>
   <types>CHILE,TURKEY,CHINA,PHILIPPINES,JAPAN,IRAN,INDIA</types>
   <type_descs>Chile,Turkey,China,Philippines,Japan,Iran,India</type_descs>
        </layer>
 </layers>
 <ui>
  <widget_dimensions>
   <width>378</width>
   <height>206</height>
  </widget_dimensions>
  <icons>
   <main_icon>i_rainbow.png</main_icon><!-- Icon must exist under assets/images in viewer -->
   <main_label>Main Panel</main_label><!-- Title/label for icon across the top widget panel -->
   <settings_icon>i_options.png</settings_icon>
   <settings_label>Settings Panel</settings_label>
  </icons>
  <refresh_label>refreshing layer...</refresh_label>
  <query>
   <comp_label>Earthquakes by geography:</comp_label>
   <heatmapquery_prompt>default selection</heatmapquery_prompt>
   <featurecount_label> features contained</featurecount_label>
  </query>
  <transparency>
   <comp_label>Transparency:</comp_label>
   <defaulttransparency>0.7</defaulttransparency>
  </transparency>
  <symbol>
   <comp_label>Theme:</comp_label>
   <defaulttheme>RAINBOW</defaulttheme><!-- Must be one of RED_WHITE_BLUE, RAINBOW, or THERMAL -->
  </symbol>
 </ui>
</configuration>
0 Kudos