Select to view content in your preferred language

LayerList widget - description button

2336
4
Jump to solution
07-30-2013 03:51 AM
PEREZvincent
Emerging Contributor
Hi,

is it possible to configure the description button of the LayerListWidget?
I want, for all my layers, to make links toward HTML pages that describe the layers.
I don't wanted to be redirected on the REST services directory.

(my config : AGS 10.1 - flex 3.0)

thank you,
Vincent
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus
Vincent,

   That is not a currently supported configurable option. It is easy to change in the code (not xml) if you have access to the source code and a Flex IDE like Flash Builder.


You would make your changes in the:

The function descriptionOrDownloadLabel_clickHandler is what gets called when you click the description button:

src/com/esri/viewer/components/toc/tocClasses/TocLayerMenu.mxml      

Don't forget to click the Mark as answer check on this post and to click the top arrow (promote).
Follow these steps as shown in the below graphic:

View solution in original post

0 Kudos
4 Replies
RobertScheitlin__GISP
MVP Emeritus
Vincent,

   That is not a currently supported configurable option. It is easy to change in the code (not xml) if you have access to the source code and a Flex IDE like Flash Builder.


You would make your changes in the:

The function descriptionOrDownloadLabel_clickHandler is what gets called when you click the description button:

src/com/esri/viewer/components/toc/tocClasses/TocLayerMenu.mxml      

Don't forget to click the Mark as answer check on this post and to click the top arrow (promote).
Follow these steps as shown in the below graphic:

0 Kudos
PEREZvincent
Emerging Contributor
ok thank you Robert.
I don't have Flash builder and I don't speak flex...
I'll see if I can learn it!

regards,
Vincent
0 Kudos
PEREZvincent
Emerging Contributor
First, as said Robert, I solved my problem by modifying the contents of the descriptionOrDownloadLabel function by :
var request:URLRequest = new URLRequest("http://xxx");
navigateToURL(request, "_blank");

It work fine. But users are redirect toward the same html page

But now I would like to redirect the users towards differents metadatas (1 layer => 1 html page).
Is it possible to include a new XML tag in the main config file (for each operationallayers) and call this XML tag in the descriptionOrDownloadLabel function of the tocLayermenu.mxml ?
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Vincent,

   It might be possible but as the layers in the main config.xml can be individual layer (feature type) or mapservices (dynamic type) which would contain many layers, this would not work well. It would also involve changing/adding code to many file in the viewer and is to in depth for me to help with.

You do have access to the layer from the descriptionOrDownloadLabel function and could use the copyright property to hold the url you want to use.
0 Kudos