Advanced Flash Components
Search!
Search!
Home >  Knowledge Base >   >  Links in Info Window
Links in Info Window
Date: Feb 2, 2009   Views: 5246  
Question:
How do I add links to the Info Window?
Answer:

admin (Admin)
You can find the complete documentation of Info Window styles here:
http://www.afcomponents.com/content/documentation/umap_as3/com/afcomponents/umap/display/InfoWindow.html

You can add links to Info Windows by enabling HTML. Here is a quick sample:

import com.afcomponents.umap.core.UMap;
import com.afcomponents.umap.styles.*;
import com.afcomponents.umap.display.InfoWindow;
import com.afcomponents.umap.types.Size;



// define info window style
var style:InfoWindowStyle = new InfoWindowStyle();
style.strokeAlpha = 0.8;
style.size = new Size(200,100);
style.tailSize.height = 30;
style.tailOffset = 0.10;
style.contentStyle.html = true;
style.contentStyle.styleSheet = new StyleSheet();
style.contentStyle.styleSheet.setStyle("html", {fontFamily:"arial", fontSize:12, color:"#555555"});

// define info window parameters
var param:Object = new Object();
param.title = "Info window title";
param.content = "Info window content...<br/>can be multiline<br/>and contain <b><u>HTML</u></b> tags.";

// open new info window
map.openInfoWindow(param, style);
Component Info