Sign in to follow this  
kmorse

Changing canvas background color on Fusion Map

Recommended Posts

I have two maps on a page:

 

 

 

 

 

 

 

 

 

 

I would like the color of the map canvas to match the color of the surrounding page's background.

 

 

 

I saw a discussion on the Fusion Charts forum and tried using the canvasBaseColor and showCanvasBase attributes, but was not able to change the color from white.

 

 

 

 

 

 

 

I put the attribute calls at the top of the map's xml file like this:

 

 

 

map borderColor='FFFFFF' baseFontColor='FFFFFF' connectorColor='000000' showLabels='0' fillAlpha='70' hoverColor='FFFFFF' showBevel='0' showToolTip='1' showMarkerToolTip='1' markerBgColor='FF0000' canvasBaseColor='000000' canvasBgColor='000000' showCanvasBg ='1' showCanvasBase='1'

 

 

 

Do these attribute calls belong at the top or near the bottom, where I have the style definitions such as?

 

 

 

styles>

 

definition>

 

style type='animation' name='animX' param='_xscale' start='0' duration='1' />

 

style type='animation' name='animY' param='_yscale' start='0' duration='1' />

 

style name='TTipFont' type='font' isHTML='1' color='FFFFFF' bgColor='330033' size='11' />

 

style name='HTMLFont' type='font' color='333333' borderColor='CCCCCC' bgColor='FF0000' />

 

style name='myShadow' type='Shadow' distance='1'/>

 

/definition>

 

application>

 

apply toObject="PLOT" styles="animX,animY"/>

 

apply toObject='MARKERLABELS' styles='HTMLFont,myShadow' />

 

apply toObject='TOOLTIP' styles='TTipFont' />

 

/application>

 

/styles>

 

 

 

Thanks in advance for your help

 

 

 

Keith Morse

 

The Denver Post

Edited by Guest

Share this post


Link to post
Share on other sites

Hi,

Could you please use SWF wmode transparent with setTransparent(true) and set Maps attribute bgalpha='0' with in Map XML? Please follow the attachment.

MapDemo.zip

Edited by Guest

Share this post


Link to post
Share on other sites

Arindam,

 

 

 

Thank you very much. That worked. I now have the option of making the canvas and border transparent.

 

 

 

Next question: Is it possible to reduce the size of the canvas or remove it altogether? I would like to move some other elements on the page closer to the actual map.

 

 

 

Thanks in advance,

 

 

 

Keith Morse

 

Denver Post

Edited by Guest

Share this post


Link to post
Share on other sites

Hi,

If i am using FusionMapsRenderer.jsp to generate map insted of using js.

how i can set  setTranparent?

i try to modify in jsp by adding below line

  map_<%= mapId%>.setTransparent(true);

but it doesnt work.

Let me know any other solution.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this