Select to view content in your preferred language

Clustering in viewer 2.4

6199
21
07-30-2011 11:56 AM
BjornSvensson
Esri Alum
It hasn't made it in to the <layer> tag documentation yet, but there is a sample called "Clustering" listed on the "Samples" page.

Here are some examples of how to take advantage of the new <clustering> functionality in flex viewer 2.4.

Basic example:
<layer label="Simple, same-sized circles (default color green)"
           type="feature"
           url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/SanFrancisco/311Incidents/MapServer/0"
           popupconfig="popups/PopUp_311.xml"
           visible="true">
        <clustering>
            <clustersymbol type="simple"/>
        </clustering>
</layer>

The example from the online sample:
<layer label="San Franscisco 311" type="feature" url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/SanFrancisco/311Incidents/MapServer/0" popupconfig="popups/PopUp_311.xml" visible="true">
    <clustering mingraphiccount="2" sizeinpixels="80">
        <clustersymbol type="simple" alpha="1" alphas="0.7,0.8,1" bordercolor="0xFFFFFF" color="0xFF4242" colors="0xFF837E,0xFF4242,0xFF4242" flaremaxcount="10" size="90" sizes="30,60,90" textcolor="0x000000" textsize="14" weights="10,100,200"/>
    </clustering>
</layer>
Tags (2)
0 Kudos
21 Replies
BjornSvensson
Esri Alum
does the clustering not work for "dynamic" layers?


Correct - see http://help.arcgis.com/en/webapps/flexviewer/help/index.html#/The_Layer_tag/01m30000000p000000/

Clustering only works with layers of type "feature" (which can come from any one layer in either a MapService or a FeatureService).  This is because feature layers refer to only one single layer, and the features are actually client-side.  For the dynamic layers, those are map services of usually many (sub)layers and the map image is created on the server.
0 Kudos
KennethLyons
Emerging Contributor
Bjorn,

Thanks for the response.  Do you know if clustering dynamic layers will be avalible in future versions?

Thanks again
0 Kudos
BjornSvensson
Esri Alum
Do you know if clustering dynamic layers will be avalible in future versions?


If you mean layers="dynamic", then no, because that image is created on the server by ArcGIS Server (as opposed to client-side in your browser).

If you mean a dynamic layer in more generic terms (as in "not tiled"), then it already is supported by adding a layer="feature" that points to one of the layers within that map service.
0 Kudos
JeffAzevedo
Deactivated User
Has anyone had success with getting popup info support on the flare? I've tried, but I can't get it to work, and really that's the main selling point of the flare.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Jeff,

   Popups on flares are not yet supported.
0 Kudos
BjornSvensson
Esri Alum
Has anyone had success with getting popup info support on the flare? I've tried, but I can't get it to work, and really that's the main selling point of the flare.


"flare" is not a supported cluster option at this time (version 2.4).  See my previous reply on August 26 - and the updated clustering section in the documentation - http://help.arcgis.com/en/webapps/flexviewer/help/index.html#/The_Layer_tag/01m30000000p000000/
0 Kudos
Hwa_SaupLee
Occasional Contributor
Flex viewer 2.5 just leased, is flare popup supported in the flex viewer 2.5?  I am trying but flare pupup or map tip are not working so far.
0 Kudos
AdamConner
Deactivated User
I just upgraded to 2.5 and it does now show the proper icon on the flare graphics, but the click event to show the popup does not work unless there is an additional config option which must be enabled.
0 Kudos
Hwa_SaupLee
Occasional Contributor
So what would be the additional config to make the flare info popup?
0 Kudos
JanieGoddard
Frequent Contributor
I just upgraded to 2.5 and it does now show the proper icon on the flare graphics, but the click event to show the popup does not work unless there is an additional config option which must be enabled.


Hi Adam,
    We could sure use the additional config option which must be enabled. I have the cluster option working in FlexViewer 2.4. The flare spins up, but no popups work. No icons of the different categories work either. (But I didn't code anything other than a standard popup.xml.)
Thanks,
Janie
0 Kudos