Clustering in viewer 2.4

3299
21
07-30-2011 11:56 AM
BjornSvensson
Esri Regular Contributor
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
DerrickMartin
New Contributor II

    <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>


Trying to patiently wait for the updated documentation. But, can you give a brief description of what each of these settings is doing? Also, are there any other configuration options available for the clustering?
0 Kudos
IvanBaehr
New Contributor
Thanks for a great new feature!!

I have three questions to clustering in flexviewer 2.4

1. When I zoom to max zoom level I still have some features clustered. Which parameter will I have to set to ensure that features will be displayed as single points when zoomed in?

2. Does flare working with clustering for flexviewer 2.4?

3. Does <linkfield> to images work for Popup window for clustered layer? When I mouse click on single points in the clustered layer for popups I only get the url displayed not the image.

Ivan Baehr
UNOSAT
0 Kudos
EvanCaldwell1
New Contributor III
Hi Ivan, I'm also working through this and have been able to figure out some of the properties.

1. Increasing the property minigraphcount (try 5 or more) should reveal those final few points when zoomed in.

2. Set clustersymbol type="flare" (this works, but is not currently supported because it has not yet been fully implemented)

3. You need to configure a custom popup.xml for the feature layer. Check the <medias> tag in the viewer documentation.

Hope this helps!
-Evan

Thanks for a great new feature!!

I have three questions to clustering in flexviewer 2.4

1. When I zoom to max zoom level I still have some features clustered. Which parameter will I have to set to ensure that features will be displayed as single points when zoomed in?

2. Does flare working with clustering for flexviewer 2.4?

3. Does <linkfield> to images work for Popup window for clustered layer? When I mouse click on single points in the clustered layer for popups I only get the url displayed not the image.

Ivan Baehr
UNOSAT
0 Kudos
IvanBaehr
New Contributor
Hi Ivan, I'm also working through this and have been able to figure out some of the properties.

1. Increasing the property minigraphcount (try 5 or more) should reveal those final few points when zoomed in.

2. Set clustersymbol type="flare" (this works, but is not currently supported because it has not yet been fully implemented)

3. You need to configure a custom popup.xml for the feature layer. Check the <medias> tag in the viewer documentation.

Hope this helps!
-Evan



Thanks Evan for your help. This brought me a step further. I simply had not set clustersymbol type correct to "flare" and had not configured <media> correct for imagesource. Now it works.

Still I face the problem that some points are still clustered a maximum zoom level and thus may not be displayed by popup window. Are popup not working for the flared points.

In addition to this I don't succeed getting popups to work for dynamic layers. As I understand the documentation for Flexviewer 2.4 the new popups should work for tiled, dynamic and feature layers???

Ivan Baehr
UNOSAT
0 Kudos
IvanBaehr
New Contributor
Hi,

I found the solution for popups with dynamic layers using sublayers. The new popups are just amazing. Sometime reading carefully the ArcGIS viewer for Flex documentation is really a very good place to start... 🙂

Ivan Baehr
UNOSAT
0 Kudos
JosVroegop
New Contributor II
I can't get a popup to work on flared points either, is there something i am doing wrong?

<layer label="Test Clustering" type="feature" visible="true"
     popupconfig="popups/PopUp_SR_Ultrasoon.xml"
     url="http://gistest.railinfra.local/ArcGIS/rest/services/US_Data/MapServer/0">
     <clustering mingraphiccount="2" sizeinpixels="80">
        <clustersymbol type="flare" alpha="1" alphas="0.7,0.8,1" bordercolor="0x000000" color="0xFF4242" colors="0xFF837E,0xFF4242,0xFF4242" flaremaxcount="10" size="90" sizes="30,60,90" textcolor="0x000000" textsize="14" weights="10,100,200" /> 
       </clustering>
     </layer>


Thanks in advance.
0 Kudos
BjornSvensson
Esri Regular Contributor
I can't get a popup to work on flared points either, is there something i am doing wrong?


No, you're not.  This isn't supported in the current release, but is something we are looking at for version 2.5.
0 Kudos
JosVroegop
New Contributor II
Ah, so I can stop trying now, haha. Thanks for the info!
0 Kudos
KennethLyons
New Contributor
does the clustering not work for "dynamic" layers?  I have been able to make the sample data work in my viewer, but when I try to apply it to some of my real data it does nothing.  The only major difference between the 2 that I've been able to see is the "type" in the sample data is "feature" and in MY data is "dynamic".  Any help with this would be great.

Thanks
0 Kudos