I have the Heat Map Widget working my ArcGIS Viewer for Flex app and am wondering if there is a way to have it work with multiple layers. For example, it would be great to allow the user to create a heat map for a layer of Crime Incidents or a layer of earthquakes, etc,. I tested just adding another layer in the config (see below) but it is not working.
<layer>
<name>Crime Incident Types</name>
<url>https://gis.sehinc.com/seh/rest/services/AnywhereUSA/AnywhereUSA_e911/MapServer/1</url>
<outFields>UCRDESC,CASESTATUS,OFFENSEID,OFFENDATE,CASESTATUS,BEAT,UCRCODE</outFields>
<useproxy>false</useproxy>
<useamf>true</useamf>
<defaultquery>1=1</defaultquery>
<querytemplate>UCRDESC = REPLACE_STR</querytemplate>
<types>'Arson','Assault','Burglary','Criminal Homicide','Curfew/Loitering','Disorderly Conduct','Domestic Battery','Drugs','Drunkenness','DUI','Larceny','Motor Vehicle Theft','Prostitution','Rape','Robbery','Stolen Property','Vandalism','Weapons'</types>
<type_descs>Arson,Assault,Burglary,Criminal Homicide,Curfew/Loitering,Disorderly Conduct,Domestic Battery,Drugs,Drunkenness,DUI,Larceny,Motor Vehicle Theft,Prostitution,Rape,Robbery,Stolen Property,Vandalism,Weapons</type_descs>
</layer>
<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>
<useproxy>false</useproxy>
<useamf>true</useamf>
<defaultquery>1=1</defaultquery>
<querytemplate>Magnitude > REPLACE_STR</querytemplate>
<types>2,4,6,8</types>
<type_descs>Mag > 2,Mag > 4,Mag > 6,Mag > 8</type_descs>
</layer>
Thanks,
Andrew