map.BackColor = Color.Transparent;

Topics: General Topics
Jan 22, 2007 at 3:24 PM
Hi all
I have this problem
I was able to successfully add tiles from sharpmap wms to googlemaps but the background color of the tiles is not transparent (I set map.BackColor = Color.Transparent) but brown.
I have this problem with every map I generate with sharpmap and show on a page.

How can i have a real transparent background?
Jan 24, 2007 at 11:07 AM
That works fine for me. What image format are you outputting your map as, and in which browser are you viewing it? The only format that truly supports transparent backgrounds for mapping images is PNG (24-bit, as 8-bit images show aliased edges) but they don't work properly in IE6.
Jan 26, 2007 at 12:49 PM
that's exactly the case!!
my app works perfectly in Firefox

Any workaround to make it working in IE too?
Jan 26, 2007 at 1:53 PM
This page will help:

The "fix" involves using Javascript to replace the images in IE6 (and lower) with <div> elements that have their background image set to an ActiveX object containing the problem-PNG. You don't have to understand that though :) The above site has a script that you can include that will do it all for you.