Support placeholders for map service and layer names in InfoTemplate and PopupTemplate

327
0
01-07-2016 03:49 PM
Status: Open
GarySinner
New Contributor III
I'm using the JavaScript API to build customized functionality into a Web AppBuilder application.  One feature we're using are map popups.  The configuration data includes lists of fields to show in the popups for the various map service layers, along with titles for the popups.  We're currently using placeholders in the title of the popup so that we can include attribute data from the feature in the popup.

Some of our data is pretty dense, so when popups are opened, they often contain many features.  The user can click on the arrows in the title bar to step through the set of located features.  The title region and the table of field values displayed in the popup change according to the current feature.  

We have had requests to include the name of the map service and the name of the sublayer within the map service where the current feature was located.  At present the only apparent way to achieve this is to use the InfoTemplate and a custom function.  Within the custom function we can get to the layer name and attribute values.  But this seems to be a very heavy-handed way to get the layer name.

Our suggestion is to have placeholders like {MAPSERVICE_NAME} and {LAYER_NAME} that could be used (at minimum) in the title, similar to how we can currently use placeholders to include attribute values for the feature in the title.  This would allow developers to easily include the map service and layer names without the overhead of developing a custom function that would build the HTML for the popup content.

Thanks for considering this option!

Gary Sinner
petroWEB