Select to view content in your preferred language

Is it possible to apply Clustering to Story Map Shortlist Template

5927
9
03-17-2016 02:32 PM
CameronBlandy
Regular Contributor

We have created a Story Map Shortlist application that is hosted on our servers. We'd like to be able to apply clustering to the graphics points for the tabs as in some cases the points overlap.

Is this possible? I assume it will be difficult because the graphics are already created when the Web Map is initialized.

Any thoughts appreciated.

Cameron,

City of Surrey.

0 Kudos
9 Replies
AdrianWelsh
MVP Honored Contributor

Hi Cameron,

I believe it is possible but you will have to dig into the JavaScript of the application. Esri has an example of how to apply clustering to a map on their site, here:

Point clustering | ArcGIS API for JavaScript

0 Kudos
CameronBlandy
Regular Contributor

Hi Adrian,

Yes, I had already seen that posting. That’s was essentially the reason of my posting, implementing the Point Cluster into the Shortlist template. I would essentially have to re-create the graphics of the web map after it is read in which I am sure is do-able.

Cameron

CAMERON BLANDY | GIS ANALYST

GIS Section

13450 104 Ave, Surrey, BC, V3T 1V8

T 604.591.4699 | F 604.598.5781 |www.surrey.ca

<http://www.surrey.ca/12392.aspx>[Social Media Icons_City Speaks_GREEN]<https://www.cityspeaks.ca/Portal/default.aspx> <https://twitter.com/cityofsurrey> <https://www.facebook.com/TheCityofSurrey> <http://www.youtube.com/TheCityofSurrey> <http://www.linkedin.com/company/city-of-surrey>

Connect, Share and Engage with your City

0 Kudos
AdrianWelsh
MVP Honored Contributor

Cameron, it does not appear to be an easy task, but, like you said, it is do-able.

If you just used the template to create your story map, then this won't work. You will have to download the source code of the story map and modify that code. You can get the code for it here (if you have not already done this):

GitHub - Esri/shortlist-storytelling-template-js: The Shortlist story map application template by Es...

0 Kudos
CameronBlandy
Regular Contributor

Hi Adrian,

So it does not seem easy at all. Do you have any idea where I should inject the cluster code in the main.js of the Shortlist template. The graphics are already created so I seem to need the ability to overwrite the graphic with the cluster graphics??

Any thoughts?

Cameron

0 Kudos
AdrianWelsh
MVP Honored Contributor

Hmmm, that's a tough one. It seems like (from reading the point clustering example) that there are many places in which you would put in the code. But, after looking through the main.js document from the shortlist template, it is more confusing than I would have thought. I am not a web developer so I am not sure on where things should and shouldn't go... I wish I could help more, sorry about that.

(though, when you get things figured out, please share with us here!)

0 Kudos
ChelseaRozek
MVP Regular Contributor

Cameron Blandy Did you figure out a solution?

0 Kudos
CameronBlandy
Regular Contributor

Hi Chelsea,

No not yet. I haven’t spent much time on it lately. Will probably have time to go through it again in a month or two.

Cameron

CAMERON BLANDY | GIS ANALYST

GIS Section

13450 104 Ave, Surrey, BC, V3T 1V8

T 604.591.4699 | F 604.598.5781 |www.surrey.ca

<http://www.surrey.ca/12392.aspx>[Social Media Icons_City Speaks_GREEN]<https://www.cityspeaks.ca/Portal/default.aspx> <https://twitter.com/cityofsurrey> <https://www.facebook.com/TheCityofSurrey> <http://www.youtube.com/TheCityofSurrey> <http://www.linkedin.com/company/city-of-surrey>

Connect, Share and Engage with your City

0 Kudos
ChelseaRozek
MVP Regular Contributor

Can this thread get revived now that AGO has clustering? I tried making a shortlist app on AGO and switching the webmap it generates to use clustering, but then the app doesn't work properly. Will this functionality be coming to shortlist soon?

0 Kudos
RupertEssinger
Esri Alum

Hi Chelsea, thanks for the note. Shortlist doesn't support clustering. It is on our list as something that people have requested in this app, and also in Story Map Tour. We won't be adding clustering to Shortlist in the near term, but it is on our list for future development. Our future plans include standardizing and merging more of our code so that the different app layouts work the same behind the scenes and support the same things. 

Rupert