Select to view content in your preferred language

SUPPORTING_LAYERS_THAT_ARE_CLICKABLE not working for ArcGIS for Server Map Service (shortlist)

5739
9
Jump to solution
10-26-2015 01:38 PM
CameronBlandy
Regular Contributor

I have a polygon layer within a ArcGIS for Server Map Service that I would like to be used as a Supporting Layer that is clickable. I have added it to the web map (see below, Map service is called Applications, Layer Cultural Corridor) and configured it using the SUPPORTING_LAYERS_THAT_ARE_CLICKABLE (="Applications -  Cultural Corridor") variable in index.html. The layer contains both a name and Description field. Any clues why this is not working?

I am hosting this app on my own server.

temp.png

Regards,

Cameron

0 Kudos
1 Solution

Accepted Solutions
RupertEssinger
Esri Alum

Thanks. Your ArcGIS Online organization doesn't have anonymous access enabled, so we can't access those item pages directly but can if we use the neutral domain:

http://www.arcgis.com/home/item.html?id=0ecbc3e4fe1d4605860dd65b1a7a4b43

http://www.arcgis.com/home/item.html?id=c810caafbd0a4579a3a804ecba815330

To tell the Shortlist to handle your feature layer as a clickable supporting layer you would just specify its name in this line

var SUPPORTING_LAYERS_THAT_ARE_CLICKABLE = "StoryMaps";

The problem with the feature layer that you want to make clickable is that it doesn't use the Shortlist attribute schema, so Shortlist doesn't treat it as clickable. In order to be treated as clickable, supporting layers need to use the same attribute schema as the layers that define your tabs, with a picture, etc,

Also looking at your Shortlist in our test instance:

http://storymaps.esri.com/templates/shortlist/?webmap=c810caafbd0a4579a3a804ecba815330&GEOLOCATOR=tr...

your clickable layer is just a single polygon. Why not just upload that directly into the web map as a shapefile instead of a feature service. That's simpler and doesn't use up any ArcGIS Online credits.

View solution in original post

0 Kudos
9 Replies
RupertEssinger
Esri Alum

Hi Cameron

For the optional clickable supporting layers in a Shortlist, the layers need to be 'feature collections': so they need to feature services (from ArcGIS Online, Portal for ArcGIS or Server for ArcGIS), shapefiiles, or CSV files. Map Services aren't supported.

0 Kudos
CameronBlandy
Regular Contributor

Hi Rupert,

I tried the following steps to create a Feature Layer and added it to my Map to use for the Shortlist template. But it does not work. The Supporting Layer is not identifiable. It does show though.

1) I exported the layer in question into a filegdb and zipped it.

2) In ArcGIS online (Organization account) I clicked Add Item then From My Computer.

3) I navigated to the zip file and checked on "

4) A Feature Layer is created and the filegdb is uploaded as well.

5) In may map I add the Feature Layer (the feature layer has name and Description fields)

6) In my index.html (for the hosted shortlist template) I add a reference to SUPPORTING_LAYERS_THAT_ARE_CLICKABLE to the Feature Layer. (which I assume is <Feature Layer> - <layername> (i.e. Story Maps - CulturalCorridor)

Are these steps correct. Is there something I have forgotten.

Regards,

Cameron

0 Kudos
RupertEssinger
Esri Alum

If this data is publicly accessible, could you share a link to the service you created, and also the web map you are using in your Shortlist that contains that service so we can have a look.

Rupert

0 Kudos
CameronBlandy
Regular Contributor

Feature Layer that I want ot use as a Supporting Layer:

https://surrey.maps.arcgis.com/home/item.html?id=0ecbc3e4fe1d4605860dd65b1a7a4b43

Web Map to use in the Shortlist template (hosted).

https://surrey.maps.arcgis.com/home/item.html?id=c810caafbd0a4579a3a804ecba815330

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
CameronBlandy
Regular Contributor

Hi Rupert,

Further to my issue. In Firebug I went into debug mode (placed a breakpoint) to see what happens when the story map is loaded (main.js). When using a breakpoint the supporting layer does indeed work. It seems that when running live a timing issue happens whereby the supporting layer may not be loaded before it checks to see if it is available. There may be an issue with the mapdeferred function. Not sure.

Maybe you have more insight into this,

Regards,

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
RupertEssinger
Esri Alum

Thanks. Your ArcGIS Online organization doesn't have anonymous access enabled, so we can't access those item pages directly but can if we use the neutral domain:

http://www.arcgis.com/home/item.html?id=0ecbc3e4fe1d4605860dd65b1a7a4b43

http://www.arcgis.com/home/item.html?id=c810caafbd0a4579a3a804ecba815330

To tell the Shortlist to handle your feature layer as a clickable supporting layer you would just specify its name in this line

var SUPPORTING_LAYERS_THAT_ARE_CLICKABLE = "StoryMaps";

The problem with the feature layer that you want to make clickable is that it doesn't use the Shortlist attribute schema, so Shortlist doesn't treat it as clickable. In order to be treated as clickable, supporting layers need to use the same attribute schema as the layers that define your tabs, with a picture, etc,

Also looking at your Shortlist in our test instance:

http://storymaps.esri.com/templates/shortlist/?webmap=c810caafbd0a4579a3a804ecba815330&GEOLOCATOR=tr...

your clickable layer is just a single polygon. Why not just upload that directly into the web map as a shapefile instead of a feature service. That's simpler and doesn't use up any ArcGIS Online credits.

0 Kudos
RupertEssinger
Esri Alum

In the Shortlist samples folder: \samples\Popup_Only\Shapefiles , you can use the Polygons shapefile as a template for your supporting layer to get the attributes..

With respect to iOS 9 it should just work. Here's your Shortlist in our test instance:

http://storymaps.esri.com/templates/shortlist/?webmap=c810caafbd0a4579a3a804ecba815330&GEOLOCATOR=tr...

0 Kudos
MichaelSnook
Frequent Contributor

Did you get any more info on the timing issue...I'm seeing the same thing in my shortlist application...I put a few console logs to see what supportLayerNames are coming through (around line 796 in main.js)...it changes on page refresh...sometimes all of them appear to be loaded, sometimes a few, sometimes none.

Any help would be great.

Thanks,

Mike

0 Kudos
CameronBlandy
Regular Contributor

Hi Rupert,

Another issue we are having is getting the shortlist to work on an iPhone using iOS 9.1 (works on iOS 9.0). Are you aware of any issues with respect to iOS 9.1??

Cameron

0 Kudos