Alex81 Report post Posted November 29, 2011 I'm trying to integrate fusionmaps into test OpenLaszlo application. Code is pretty simple: <canvas proxied="false" bgcolor="blue"> <view width="750" height="400" id="a" resource="http:FCMap_World.swf"> </view> </canvas> Basically what OpenLaszlo framework does it creates stage:Stage->sprite:Sprite->imgLoader:Loader hierarchy and loads swf resource using imgLoader. The problem is that map is always rendered full screen .OpenLaszlo debugger allows to watch object properties and here is what I can see: a.sprite.imgLoader.width = 1335; a.sprite.imgLoader.height = 916; a.sprite.root.stageWidth = 1235; (width of browser window) a.sprite.root.stageHeight = 816; (height of browser window) Why does map always occupy even more space than a stage size? Is there any way I can control size of the map? How can I make it draw 750x400? Thanks, Alex Share this post Link to post Share on other sites
FusionCharts Support Report post Posted November 30, 2011 Hi, Could you please let us know if you are using FusionMaps for Flex for this? http://www.fusioncharts.com/flex Share this post Link to post Share on other sites
Alex81 Report post Posted November 30, 2011 Sudipto, Initially I used swf file from the FusionMaps_Trial package. Now I tried to replace it with swf file from FusionMapsFlex package and behavior was a little bit different: Data.xml was not requested by default and map was rendered 750x400 with black areas. If I supply xml config (for example add dataXML='<maps/>' request parameter) map again occupies full screen. Then I tried to link FusionMaps.swc an load map using FusionMaps class: <canvas proxied="false"> <view width="750" height="400" id="a"> <passthrough> import com.fusionmaps.components.FusionMaps; </passthrough> <handler name="oninit"> <![CDATA[ addMap(); ]]> </handler> <method name="addMap"> <![CDATA[ var myFirstMap:FusionMaps = new FusionMaps(); myFirstMap.FMMapType = "World"; myFirstMap.FMSetDataXML("<map/>"); this.sprite.addChild(myFirstMap); //myFirstMap.FMRender(); ]]> </method> </view> </canvas> But this code caused: TypeError: Error #1009: Cannot access a property or method of a null object reference. at com.fusionmaps.components::FusionMaps/draw()[F:\work\sudipto\_SVN\development\fmflex\fmflex\trunk\core\swc\core\sources\FlexBuilder3\source\com\fusionmaps\components\FusionMaps.as:573] at com.fusionmaps.components::FusionMaps/stageEnter()[F:\work\sudipto\_SVN\development\fmflex\fmflex\trunk\core\swc\core\sources\FlexBuilder3\source\com\fusionmaps\components\FusionMaps.as:489] Any ideas what is causing this exception? Thanks, Alex Share this post Link to post Share on other sites
Sanjukta Report post Posted December 5, 2011 Hi Alex, Please note that FusionMaps for Flex doesn't support Open Laszlo, as of now. However, you may try doing the following and check if this helps. 1. Use the core maps/charts, i.e, from the FusionCharts core pack (not FusionCharts/FusionMaps for Flex) 2. Use query string when loading map/chart SWF as mentioned below. Ref.- .../FCMap_Asia.swf?mapwidth=750&mapheight=400&dataURL=demoMapData.xml... Hope this helps. Share this post Link to post Share on other sites
Alex81 Report post Posted December 7, 2011 Unfortunately "?mapwidth=750&mapheight=400" didn't help. Share this post Link to post Share on other sites
Alex81 Report post Posted January 23, 2012 Unfortunately "?mapwidth=750&mapheight=400" didn't help. Adding mode=laszlo request parameter solved the issue. Share this post Link to post Share on other sites
Guest Angshu Report post Posted January 23, 2012 Hi, Glad to know that you have managed to resolve your problem. Happy FusionCharting!!! Share this post Link to post Share on other sites