﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>FusionCharts Forum / FusionMaps v3 / Using FusionMaps  / Map Sizing / Latest Posts</title><generator>InstantForum.NET v4.1.4</generator><description>FusionCharts Forum</description><link>http://www.fusioncharts.com/forum/</link><webMaster>support@fusioncharts.com</webMaster><lastBuildDate>Fri, 10 Oct 2008 17:17:05 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Map Sizing</title><link>http://www.fusioncharts.com/forum/Topic3096-11-1.aspx</link><description>Dear Pallav,&lt;br&gt;&lt;br&gt;I also face the same sizing problem. Please see the code for generating and rendering the map and please help me if there is any solution.&lt;br&gt;&lt;br&gt;Code To Render:&lt;br&gt;&lt;br&gt;public static string RenderChart(string chartSWF, string strURL, string strXML, string chartId, string chartWidth, string chartHeight, bool debugMode, bool registerWithJS)&lt;br&gt;		{&lt;br&gt;			strXML = strXML.Replace("&amp;", "and");&lt;br&gt;			StringBuilder builder = new StringBuilder();&lt;br&gt;			builder.AppendFormat("&amp;lt!-- START Script Block for Chart {0} --&amp;gt" + Environment.NewLine, chartId);&lt;br&gt;			builder.AppendFormat("&amp;ltdiv id='{0}Div' align='left'&amp;gt" + Environment.NewLine, chartId );&lt;br&gt;			builder.Append("Chart." + Environment.NewLine);&lt;br&gt;			builder.Append("&amp;lt/div&amp;gt" + Environment.NewLine);&lt;br&gt;			builder.Append("&amp;ltscript type=\"text/javascript\"&amp;gt" + Environment.NewLine);&lt;br&gt;			builder.AppendFormat("var chart_{0} = new FusionCharts(\"{1}\", \"{0}\", \"{2}\", \"{3}\", \"{4}\", \"{5}\");" + Environment.NewLine, chartId, chartSWF, chartWidth, chartHeight, boolToNum(debugMode), boolToNum(registerWithJS));&lt;br&gt;			&lt;br&gt;			if (strXML.Length == 0)&lt;br&gt;			{&lt;br&gt;				builder.AppendFormat("chart_{0}.setDataURL(\"{1}\");" + Environment.NewLine, chartId, strURL);&lt;br&gt;			}&lt;br&gt;			else&lt;br&gt;			{&lt;br&gt;				builder.AppendFormat("chart_{0}.setDataXML(\"{1}\");" + Environment.NewLine, chartId, strXML);&lt;br&gt;			}&lt;br&gt;			&lt;br&gt;			&lt;br&gt;			builder.AppendFormat("chart_{0}.render(\"{1}Div\");" + Environment.NewLine, chartId, chartId);&lt;br&gt;			builder.Append("&amp;lt/script&amp;gt" + Environment.NewLine);&lt;br&gt;			builder.AppendFormat("&amp;lt!-- END Script Block for Chart {0} --&amp;gt" + Environment.NewLine, chartId);&lt;br&gt;			return builder.ToString();&lt;br&gt;		}&lt;br&gt;----------------------------------------------------------------------------------------------------&lt;br&gt;&lt;br&gt;Code to Create the XML Data:&lt;br&gt;public string DisplayChartBasicWithClubs(string powerMapType, DataTable iTable, string parameterColumn)&lt;br&gt;		{&lt;br&gt;			//*** Create an XML data document in a string variable&lt;br&gt;			StringBuilder xmlData = new StringBuilder();&lt;br&gt;&lt;br&gt;			xmlData.Append("&amp;ltmap fillcolor='99CCFF' showToolTip='0' animation='0' showShadow='0' showBevel='0' showLegend='0' showLabels='0' showMarkerLabels='1' " +&lt;br&gt;			" borderColor='000000'  baseFont='Verdana' baseFontSize='10' " + &lt;br&gt;			" markerBorderColor='000000' markerBgColor='FF5904' markerRadius='3' legendPosition='bottom' useHoverColor='0' showMarkerToolTip='1'  &amp;gt");&lt;br&gt;&lt;br&gt;			xmlData.Append("&amp;ltmarkers&amp;gt");&lt;br&gt;&lt;br&gt;			xmlData.Append("&amp;ltdefinition&amp;gt");&lt;br&gt;&lt;br&gt;				foreach(DataRow myRow in iTable.Rows)&lt;br&gt;				{&lt;br&gt;					xmlData.Append("&amp;ltmarker id='" + myRow["ID"].ToString() + "' x='" + myRow["X"].ToString() + "' y='" + myRow["Y"].ToString() + "' label='" + myRow["Name"].ToString() + "' color='00ff00' labelPos='"+ GetTextAlignment(myRow["TextAlignId"].ToString()) +"' /&amp;gt");&lt;br&gt;				}&lt;br&gt;			xmlData.Append("&amp;lt/definition&amp;gt");&lt;br&gt;&lt;br&gt;			xmlData.Append("&amp;ltapplication&amp;gt");&lt;br&gt;&lt;br&gt;				foreach(DataRow myRow in iTable.Rows)&lt;br&gt;				{&lt;br&gt;					xmlData.Append("&amp;ltmarker id='" + myRow["ID"].ToString() + "' shapeId='circle' link='" + HttpUtility.UrlEncode(new Link().ClubInformationLink(myRow[parameterColumn].ToString())) + "' /&amp;gt");&lt;br&gt;				}&lt;br&gt;			xmlData.Append("&amp;lt/application&amp;gt");&lt;br&gt;&lt;br&gt;			xmlData.Append("&amp;lt/markers&amp;gt");&lt;br&gt;			xmlData.Append("&amp;lt/map&amp;gt");&lt;br&gt;&lt;br&gt;			//*** loopthrought datatable rows&lt;br&gt;			/*foreach(DataRow dr in iTable.Rows)&lt;br&gt;			{&lt;br&gt;				//*** append xml string to add a label, value and colour for each row&lt;br&gt;				xmlData.Append("&amp;ltset label='" + dr[0].ToString() + "' value='" + dr[1].ToString() + "' " + colours[1].ToString() + " /&amp;gt");&lt;br&gt;			}*/&lt;br&gt;&lt;br&gt;			//*** close chart tag&lt;br&gt;			//xmlData.Append("&amp;lt/chart&amp;gt");&lt;br&gt;&lt;br&gt;			return RenderChart(powerMapsPath + "FCMap_" + powerMapType + ".swf", "", xmlData.ToString(), graphName, graphWidth, graphHeight, graphDebug, false);&lt;br&gt;		}&lt;br&gt;----------------------------------------------------------------------------------------------------------------&lt;br&gt;&lt;br&gt;Code which calls for creating the map:&lt;br&gt;&lt;br&gt;private void ViewCountry(int[]  compIDs, string countryID)&lt;br&gt;		{&lt;br&gt;			DataSet iSet = new DataSet();&lt;br&gt;			DbHelper.FillFromSql(iSet, string.Format(@"Select Name&lt;br&gt;														From Country&lt;br&gt;														Where PowerMapID = '{0}'", countryID));&lt;br&gt;&lt;br&gt;			DataTable iTable;&lt;br&gt;            if (compIDs.Length == 0)&lt;br&gt;            {&lt;br&gt;                iTable = new PowerMap().GetClubPositioningByCountry(countryID);&lt;br&gt;            }&lt;br&gt;            else&lt;br&gt;            {&lt;br&gt;                iTable = new PowerMap().GetClubsForCompetition(compIDs[0].ToString(), countryID);&lt;br&gt;                for (int i = 1; i &lt; compIDs.Length; i++)&lt;br&gt;                {&lt;br&gt;                    DataTable tmpTable = new PowerMap().GetClubsForCompetition(compIDs[i].ToString(), countryID);&lt;br&gt;                    foreach(DataRow dr in tmpTable.Rows)&lt;br&gt;                    {&lt;br&gt;                        iTable.Rows.Add(dr.ItemArray);&lt;br&gt;                    }&lt;br&gt;                }&lt;br&gt;            }&lt;br&gt;&lt;br&gt;&lt;br&gt;			foreach(DataRow myRow in iTable.Rows)&lt;br&gt;			{&lt;br&gt;				myRow[iTable.Columns.Count-1] = "clubid=" + myRow["ID"].ToString();&lt;br&gt;			}&lt;br&gt;&lt;br&gt;			powerMapsChart.Text = new PowerMap().DisplayChartBasicWithClubs(iSet.Tables[0].Rows[0][0].ToString(), iTable, "ParameterColumn");&lt;br&gt;&lt;br&gt;			iSet.Dispose();&lt;br&gt;		}&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Please find the attachment and kindly help me.&lt;br&gt;&lt;br&gt;&lt;br&gt;Thanks&lt;br&gt;</description><pubDate>Wed, 06 Aug 2008 01:49:20 GMT</pubDate><dc:creator>suan.ngaihte</dc:creator></item><item><title>RE: Map Sizing</title><link>http://www.fusioncharts.com/forum/Topic3096-11-1.aspx</link><description>Per Pallav's suggestion I changed my code to the following and it fixed the problem...&lt;P&gt;[code]&lt;/P&gt;&lt;P&gt;&amp;lt;%&lt;/P&gt;&lt;P&gt;strXML17 = "&amp;lt;your XML&amp;gt;"&lt;/P&gt;&lt;P&gt;%&amp;gt;&lt;/P&gt;&lt;P&gt; &amp;lt;div id="mapdiv1" align="center"&amp;gt; &lt;BR&gt;        FusionMaps. &amp;lt;/div&amp;gt;&lt;BR&gt;        &amp;lt;script type="text/javascript"&amp;gt;&lt;BR&gt;    var map1 = new FusionMaps("Maps/FCMap_USA.swf", "Map1Id1", "440", "254", "0", "0");&lt;BR&gt;    map1.setDataXML("&amp;lt;%=strXML17%&amp;gt;");     &lt;BR&gt;    map1.render("mapdiv1");&lt;BR&gt; &amp;lt;/script&amp;gt;&lt;/P&gt;&lt;P&gt;[/code]</description><pubDate>Wed, 09 Apr 2008 15:54:45 GMT</pubDate><dc:creator>mbaith</dc:creator></item><item><title>RE: Map Sizing</title><link>http://www.fusioncharts.com/forum/Topic3096-11-1.aspx</link><description>Please do not use renderChart - instead there's renderMap function for FusionMaps.</description><pubDate>Tue, 08 Apr 2008 22:27:48 GMT</pubDate><dc:creator>Pallav</dc:creator></item><item><title>RE: Map Sizing</title><link>http://www.fusioncharts.com/forum/Topic3096-11-1.aspx</link><description>I'm having the same problem. Can you solve it?&lt;br&gt;&lt;br&gt;&lt;br&gt;I notice that when you render the map using the RenderChartHTML, the sizing is OK, but when you use RenderChar there is the problem&lt;br&gt;&lt;br&gt;Regards</description><pubDate>Mon, 07 Apr 2008 08:39:27 GMT</pubDate><dc:creator>avalera</dc:creator></item><item><title>RE: Map Sizing</title><link>http://www.fusioncharts.com/forum/Topic3096-11-1.aspx</link><description>Both look the same to me too. Is there a possibility you can share a live URL with us?</description><pubDate>Thu, 28 Feb 2008 07:52:12 GMT</pubDate><dc:creator>Pallav</dc:creator></item><item><title>RE: Map Sizing</title><link>http://www.fusioncharts.com/forum/Topic3096-11-1.aspx</link><description>Here is the code on the page when the map scales correctly:&lt;/P&gt;&lt;P&gt; &amp;lt;!-- START Script Block for Chart myNext11 --&amp;gt;&lt;BR&gt; &amp;lt;div id='myNext11Div' align='center'&amp;gt;&lt;BR&gt;  Chart.&lt;BR&gt;  &lt;BR&gt; &amp;lt;/div&amp;gt;&lt;BR&gt;  &lt;BR&gt; &amp;lt;script type="text/javascript"&amp;gt; &lt;BR&gt;  //Instantiate the Chart &lt;BR&gt;  var chart_myNext11 = new FusionCharts("Maps/FCMap_USA.swf", "myNext11", "440", "254", "0", "0");&lt;BR&gt;  &lt;BR&gt;  //Provide entire XML data using dataXML method &lt;BR&gt;  chart_myNext11.setDataXML("&amp;lt;map showShadow='1' showBevel='1' showLegend='0' showLabels='0' showMarkerLabels='0' includeNameInLabels='0' showCanvasBorder='0' fillColor='F1f1f1' borderColor='000000' hoverColor='999999' baseFont='Verdana' baseFontSize='10' markerBgColor='FF5904' legendPosition='bottom' useHoverColor='1' showToolTip='1' showMarkerToolTip='0' formatNumberScale='0' mapLeftMargin='1' mapRightMargin='1' mapTopMargin='1' mapBottomMargin='1'&amp;gt;&amp;lt;data&amp;gt;&amp;lt;entity id='CA' color='FF0000'  /&amp;gt;&amp;lt;entity id='NV' color='FF0000'  /&amp;gt;&amp;lt;/data&amp;gt;&amp;lt;/map&amp;gt;");&lt;BR&gt;    &lt;BR&gt;  //Finally, render the chart.&lt;BR&gt;  chart_myNext11.render("myNext11Div");&lt;BR&gt; &amp;lt;/script&amp;gt; &lt;BR&gt; &amp;lt;!-- END Script Block for Chart myNext11 --&amp;gt;&lt;/P&gt;&lt;P&gt;Here is the code on the page when the map doesn't scale correctly:&lt;/P&gt;&lt;P&gt; &amp;lt;!-- START Script Block for Chart myNext11 --&amp;gt;&lt;BR&gt; &amp;lt;div id='myNext11Div' align='center'&amp;gt;&lt;BR&gt;  Chart.&lt;BR&gt;  &lt;BR&gt; &amp;lt;/div&amp;gt;&lt;BR&gt;  &lt;BR&gt; &amp;lt;script type="text/javascript"&amp;gt; &lt;BR&gt;  //Instantiate the Chart &lt;BR&gt;  var chart_myNext11 = new FusionCharts("Maps/FCMap_USA.swf", "myNext11", "440", "254", "0", "0");&lt;BR&gt;  &lt;BR&gt;  //Provide entire XML data using dataXML method &lt;BR&gt;  chart_myNext11.setDataXML("&amp;lt;map showShadow='1' showBevel='1' showLegend='0' showLabels='0' showMarkerLabels='0' includeNameInLabels='0' showCanvasBorder='0' fillColor='F1f1f1' borderColor='000000' hoverColor='999999' baseFont='Verdana' baseFontSize='10' markerBgColor='FF5904' legendPosition='bottom' useHoverColor='1' showToolTip='1' showMarkerToolTip='0' formatNumberScale='0' mapLeftMargin='1' mapRightMargin='1' mapTopMargin='1' mapBottomMargin='1'&amp;gt;&amp;lt;data&amp;gt;&amp;lt;entity id='CA' color='FF0000'  /&amp;gt;&amp;lt;entity id='NV' color='FF0000'  /&amp;gt;&amp;lt;/data&amp;gt;&amp;lt;/map&amp;gt;");&lt;BR&gt;    &lt;BR&gt;  //Finally, render the chart.&lt;BR&gt;  chart_myNext11.render("myNext11Div");&lt;BR&gt; &amp;lt;/script&amp;gt; &lt;BR&gt; &amp;lt;!-- END Script Block for Chart myNext11 --&amp;gt;&lt;/P&gt;&lt;P&gt;Looks the same to me... Any ideas?</description><pubDate>Wed, 27 Feb 2008 19:25:47 GMT</pubDate><dc:creator>mbaith</dc:creator></item><item><title>RE: Map Sizing</title><link>http://www.fusioncharts.com/forum/Topic3096-11-1.aspx</link><description>I copied the code for the map to a page by itself, but it doesn't have the same problem on this page. See attached.</description><pubDate>Wed, 27 Feb 2008 19:17:13 GMT</pubDate><dc:creator>mbaith</dc:creator></item><item><title>RE: Map Sizing</title><link>http://www.fusioncharts.com/forum/Topic3096-11-1.aspx</link><description>Hi,&lt;br&gt;&lt;br&gt;Can you post the HTML code (as attachment) that you're using to embed the map?</description><pubDate>Thu, 21 Feb 2008 03:57:40 GMT</pubDate><dc:creator>Pallav</dc:creator></item><item><title>RE: Map Sizing</title><link>http://www.fusioncharts.com/forum/Topic3096-11-1.aspx</link><description>I am having the same problem with the charts not sizing correctly. Was there a fix?&lt;P&gt;I was working on setting up a sample to send to &lt;A href="mailto:support@fusioncharts.com"&gt;support@fusioncharts.com&lt;/A&gt;, but it only seems to happen if the map is on the page with other charts/gadgets. &lt;/P&gt;&lt;P&gt;If it is on the page by itself, it works correctly. (See MapGood.gif)&lt;/P&gt;&lt;P&gt;If it is on a page with other charts/gadgets it will intermittently show correctly, but most of the time it doesn't scale down the map to fit correctly. (See MapBad.gif).&lt;/P&gt;&lt;P&gt;Any ideas?</description><pubDate>Mon, 18 Feb 2008 19:12:57 GMT</pubDate><dc:creator>mbaith</dc:creator></item><item><title>RE: Map Sizing</title><link>http://www.fusioncharts.com/forum/Topic3096-11-1.aspx</link><description>Acknowledged. I will send code at first chance.</description><pubDate>Mon, 26 Nov 2007 10:12:19 GMT</pubDate><dc:creator>omegnman</dc:creator></item><item><title>RE: Map Sizing</title><link>http://www.fusioncharts.com/forum/Topic3096-11-1.aspx</link><description>Hi,&lt;br&gt;&lt;br&gt;Can you please email us the code at support@fusioncharts.com?</description><pubDate>Fri, 23 Nov 2007 23:03:20 GMT</pubDate><dc:creator>Pallav</dc:creator></item><item><title>RE: Map Sizing</title><link>http://www.fusioncharts.com/forum/Topic3096-11-1.aspx</link><description>Should this question be placed in the Bug section?</description><pubDate>Tue, 20 Nov 2007 14:47:29 GMT</pubDate><dc:creator>omegnman</dc:creator></item><item><title>Map Sizing</title><link>http://www.fusioncharts.com/forum/Topic3096-11-1.aspx</link><description>I'm using V3 maps and they do not always maintain there sizing after a page refresh or after I return to the page later in my session and an entity attribute has changed (e.g. color change). They do occupy the same space but appear zoomed and cropped.&lt;P&gt;One of the maps that I'm using is the "FCMap_USA.swf" with W = 580 and H = 356. &lt;/P&gt;&lt;P&gt;Is there anything I can do to prevent this? I have demonstrated this problem with several different browsers.&lt;/P&gt;&lt;P&gt;Thanks,</description><pubDate>Mon, 19 Nov 2007 22:39:17 GMT</pubDate><dc:creator>omegnman</dc:creator></item></channel></rss>