Imports InfoSoftGlobal 'FusionMaps.dll in bin folder Partial Class BasicArrayExample_dataXML Inherits System.Web.UI.Page ''' This Function will Help to Generate US Map. Protected Sub Page_Load(ByVal ob As Object, ByVal e As EventArgs) Handles Me.Load ' Declare array entity to store world population ' We use world map with 8 entities/continents ' this 2 dimensional array will store 8 rows of data for each continent of the map ' first column of each row will store the Internal Id of each entity on the map ' second column will store population data of each entity 'Store population data Dim dataArray(7, 2) As String dataArray(0, 0) = "01" dataArray(0, 1) = "3779000000" dataArray(1, 0) = "02" dataArray(1, 1) = "727000000" dataArray(2, 0) = "03" dataArray(2, 1) = "877500000" dataArray(3, 0) = "04" dataArray(3, 1) = "421500000" dataArray(4, 0) = "05" dataArray(4, 1) = "379500000" dataArray(5, 0) = "06" dataArray(5, 1) = "80200000" dataArray(6, 0) = "07" dataArray(6, 1) = "32000000" dataArray(7, 0) = "08" dataArray(7, 1) = "179000000" 'Now, we need to convert this data into XML. 'We convert using string concatenation. 'Declare strXML to store dataXML of the map Dim strXML As New StringBuilder 'Initialize element strXML.Append("") 'Set Color ranges : 4 color ranges for population ranges strXML.Append("") strXML.Append("") strXML.Append("") strXML.Append("") strXML.Append("") strXML.Append("") 'Open data element that will store map data strXML.Append("") 'Use Data from array for each entity Dim i As Integer For i = dataArray.GetLowerBound(0) To dataArray.GetUpperBound(0) 'Set each map id and value strXML.Append("") Next 'close data element strXML.Append("") 'close map element strXML.Append("") 'Create the Map with data contained in strXML 'and Return HTML output that embeds the Map 'We use FusionCharts class of InfoSoftGlobal namespace (FusionMaps.dll in BIN folder) 'RenderMap() generates the necessary HTML needed to render the map Dim mapHTML As String = FusionMaps.RenderMap("../Maps/FCMap_World8.swf", "", strXML.ToString(), "mapid", "600", "400", False, False) 'embed the chart rendered as HTML into Literal - WorldPopulationMap WorldPopulationMap.Text = mapHTML End Sub End Class