One of the field in my shapefile has a URL (i.e. www.google.com). Using the old ThematicQueryWidget, I am able to list that field be it is not clickable as a URL. Can you please tell me how can I make this field clickable. I know it would be much simpler with the new popus but I would appreciate someone can tell me how to do this.
<?xml version="1.0" encoding="utf-8"?> <!-- //////////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2010 ESRI // // All rights reserved under the copyright laws of the United States. // You may freely redistribute and use this software, with or // without modification, provided you include the original copyright // and use restrictions. See use restrictions in the file: // <install location>/License.txt // //////////////////////////////////////////////////////////////////////////////// --> <s:ItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" autoDrawBackground="false" dataChange="itemRenderer_dataChangeHandler(event)"> <fx:Script> <![CDATA[ import mx.events.FlexEvent; [Bindable] private var fieldName:String; [Bindable] private var fieldValue:String; private function itemRenderer_dataChangeHandler(event:FlexEvent):void { if (data) { if (data.alias) { fieldName = data.alias; } else { fieldName = data.field; } if (data.value != null && data.value is String && data.value.substr(0,7) == "http://") { fieldValue = "<a href='" + data.value + "'>" + data.value + "</a>"; }else { fieldValue = data.value; } } } ]]> </fx:Script> <s:layout> <s:HorizontalLayout verticalAlign="middle"/> </s:layout> <s:Label id="field" width="100%" text="{fieldName} : "/> <mx:Text id="value" htmlText="{fieldValue}"/> </s:ItemRenderer>
will submit after more testing tomorrow..
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.