Heat Map on ArcGIS Viewer for Flex

7391
64
03-07-2011 12:04 PM
MESHALALMASHAN
New Contributor
Hi,

   I'm trying to implement a heat map on my ArcGIS viewer using the code posted on the following link:

http://thunderhead.esri.com/readonlyurl/HeatMapNew/srcview/


But still I'm not getting anything running yet as I'm not sure if it's compatible with the Viewer for Flex or not.

Any idea?
Tags (2)
0 Kudos
64 Replies
JerryBiedenbender
New Contributor
That is exactly what I want to do but I cant seem to get it to work with my data. Can you take a look at my code and let me know if I have it setup right?

 
<layers>
        <layer>
            <name>Remaining Service Life (Years)</name>
            <url>http://gis02/ArcGIS/rest/services/Random/GravitySewerValuation/MapServer/1</url>
            <outFields>RSL</outFields>
            <useproxy>false</useproxy>
            <useamf>true</useamf>
            <defaultquery>1=1</defaultquery>
            <querytemplate>RSL = REPLACE_STR</querytemplate>
            <types>RSL &gt;= 0 and RSL &lt;= 5</types>
            <type_descs>Years 0-5</type_descs>
        </layer>
    </layers>
0 Kudos
AbeHendricks
New Contributor
Is there a way to change the radius of the heat per point based on a point attribute (value), such as magnitude of earthquake with the sample provided?

Great widget by the way.
0 Kudos
LloydHeberlie
Occasional Contributor
Is there a way to change the radius of the heat per point based on a point attribute (value), such as magnitude of earthquake with the sample provided?

Great widget by the way.


Hi Abe,

Currently the API sample and widget do not support this functionality.  I have another functionality enhancement to the widget that I need to work on, so hopefully I can get this in there as well.  I'll let you know when it gets updated.

Glad you like the widget.
0 Kudos
AbeHendricks
New Contributor
Hi Abe,

Currently the API sample and widget do not support this functionality.  I have another functionality enhancement to the widget that I need to work on, so hopefully I can get this in there as well.  I'll let you know when it gets updated.

Glad you like the widget.



I setup the code to allow the user to specify an attribute to be used for the heatmap 'weight' property.  It changes the heat, though, I don't really understand what it accomplishes, or what the weight affects.  Color?  Even though each heatpoint has a different magnitude (in this example), and a different weight, they all draw at the same color.

Do you understand what is happening?
0 Kudos
jamesmullen
New Contributor II
Is there a way, or has anyone implemented this widget with a zoom level constraint?  I would like to restrict this widget to very tight zoom levels as I'm dealing with a very large set of point data and a limit of only 1000 points on the map service.
0 Kudos
LloydHeberlie
Occasional Contributor
Is there a way, or has anyone implemented this widget with a zoom level constraint?  I would like to restrict this widget to very tight zoom levels as I'm dealing with a very large set of point data and a limit of only 1000 points on the map service.


Hi James,

Are you thinking that you would just like to be able to set the minScale and maxScale for the layer and only have the layer visible if isInScaleRange returned true?  Or were you thinking something more sophisticated?
0 Kudos
sofialoulad
New Contributor
Hi ALL,
ii try to use this widget with polygon features to represent the developpement of the (vegetation,builts) in many years . Is it Possible.. ?
tnx a lot
0 Kudos
LloydHeberlie
Occasional Contributor
Hi ALL,
ii try to use this widget with polygon features to represent the developpement of the (vegetation,builts) in many years . Is it Possible.. ?
tnx a lot


Hi Sofie,

Due to the way the custom layer is written and the way that the heatmap code works it requires point features.  I simplified the original code base so you can just point the ArcGISHeatMapLayer to a point layer in a map service or feature service.  If you don't want to have to write a bunch of custom code, the easiest thing to do would be to create centroid points from your polygon features.  If you have ArcGIS for Desktop Advanced (what used to be called ArcInfo), then the "Feature to Point" tool in the "Data Management" toolbox can create polygon centroids (points) for you.  You would then publish these points in a service and use that layer.

Hope that helps,
0 Kudos
JackJoseph
New Contributor II
Does anyone know if there is a way to print or export the heatmap using the standard print widget?  It seems to disappear during the conversion to PDF, JPG, etc.  Is anyone else having this issue or have a workaround?

Thanks!
Jack
0 Kudos
LloydHeberlie
Occasional Contributor
Does anyone know if there is a way to print or export the heatmap using the standard print widget?  It seems to disappear during the conversion to PDF, JPG, etc.  Is anyone else having this issue or have a workaround?

Thanks!
Jack


Hi Jack,

The heat map layer is created using the flash player display engine and client-side layer.  Unfortunately there is no easy way to recreate that same layer server side since the algorithms are different from the spatial analyst functionality.  There are some other print libraries such as Alive PDF that can create the client side components.

Hope this helps answer your question.
0 Kudos