Hi Lloyd,
I am having one heck of a time implementing this widget! I am attempting to utilize the files in HeatMapWidgetCode\v2\HeatMapWidget\src\HeatMap in my project. I am copying the "HeatMap" folder into my Widgets folder.
I am using the default Flex Viewer 2.4 (only adding widgets-no other customization), Flash Builder 4, 4.1SDK ("use SDK default" setting in Library path-Framework linkage). The ArcGISHeatMapWidget will not build the swf in my bin-debug widget folder. The <esri_stl:ProgressMessage and HeatMapThemeView lines both show errors "Could not resolve esri_stl:HeatMapThemeView to a component implementation."
I can, however, drop the compiled SWF from your HeatMapWidgetCode\v2\HeatMapWidget\bin\bin-2.4 folder into my bin-debug widgets folder, and it works....
Any pointers would be appreciated.
Thanks,
--Adam
Adam,Sorry it took me so long to reply.I use an external Flex Library for most of my stuff, so that's where the namespace originated.Let's assume you have the source code in the following structure within the FlexViewer.You'll probably want to make some additional folders under your src/widgets/HeatMap folder, if you don't intend on using your own external Flex Library Project.Create the following folders.src/widgets/HeatMap
src/widgets/HeatMap/layers
src/widgets/HeatMap/layers/supportClasses
src/widgets/HeatMap/events
src/widgets/HeatMap/utils
src/widgets/HeatMap/view
src/widgets/HeatMap/skins
Move the source files to the following locations.src/widgets/HeatMap/ArcGISHeatMapWidget.mxml
src/widgets/HeatMap/ArcGISHeatMapWidget.xml
src/widgets/HeatMap/layers/ArcGISHeatMapLayer.as
src/widgets/HeatMap/layers/supportClasses/HeatMapGradientDict.as
src/widgets/HeatMap/layers/supportClasses/HeatMapPoint.as
src/widgets/HeatMap/layers/supportClasses/HeatMapGradientDict.as
src/widgets/HeatMap/events/HeatMapEvent.as
src/widgets/HeatMap/utils/ColorMatrixUtil.as
src/widgets/HeatMap/utils/StringUtil.as
src/widgets/HeatMap/view/ProgressMessage.mxml
src/widgets/HeatMap/view/HeatMapThemeView.mxml
src/widgets/HeatMap/skins/ButtonBarImageSkin.mxml
src/widgets/HeatMap/skins/ButtonBarImageButtonSkin.mxml
Make sure you correct any import references from "com.esri.stl" to "widgets.HeatMap" the import references may vary depending on how you name your widget directory structure.The UI View components (ProgressMessage.mxml,HeatMapThemeView.mxml) under src/widgets/HeatMap/viewHeatMapThemeView.mxml has a ButtonBar with its skinClass is set to ButtonBarImageSkin.ButtonBarImageSkin.mxml references the skinClass ButtonBarImageButtonSkinYou'll need to change the skinClass in both (HeatMapThemeView,ButtonBarImageSkin) from
skinClass="com.esri.stl.skins.THE_SKIN_CLASSNAME"
to
skinClass="widgets.HeatMap.skins.THE_SKIN_CLASSNAME"
You'll also need to modify the references to the assets in ProgressMessage.mxml,HeatMapThemeView.mxmlSo you'll need to modify the source files that have references to the namespace xmlns:esri_stl="http://www.esri.com/2010/stl".You would use local namespaces for the various view, layers, etc.So in your implementation you would update the following reference like this...In the ArcGISHeatMapWidget.mxml change the namespace fromxmlns:esri_stl="http://www.esri.com/2010/stl"
toxmlns:view="widgets.HeatMap.view.*"
then update the various components that were using the esri_stl namespace<view:HeatMapThemeView id="heatMapThemeView"
themeLabel="{heatmapCompLabel}" theme="{heatmapTheme}"
themeSelectionChanged="themeSelectionChangedHandler(event)" />
If you were using the ArcGISHeatMapLayer class in a widget and were referencing it through mxml rather than ActionScript, you may do something like this...Add the namespace xmlns:layers="widgets.HeatMap.layers.*"
change<esri_stl:ArcGISHeatMapLayer id="heatMapLayer" url="{m_url}"
useAMF="true"
outFields="
"
alpha="0.7"/>
to<layers:ArcGISHeatMapLayer id="heatMapLayer" url="{m_url}"
useAMF="true"
outFields="
"
alpha="0.7"/>
If this was helpful, let me know and I can add it to the widget documentation.Lloyd