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