none
Base map layers obscured when printing TileLayer in IE8 RRS feed

  • Question

  • I have run into an issue while trying to print a BingMap Ajax v7 map containing a custom tile layer in IE8 (works fine in FF). 

    When I use IE8's printing, the map is fine is print preview, but when actually printed to paper the custom layer is not printed with transparency (i.e. you can't see the base map tiles).

    I've managed to recreate the issue using the iSDK "Tile Layer with options".  You can also reproduce it by creating an html page with the following:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <script type="text/javascript" src="</script">http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0"></script>
        <script type="text/javascript">
            var mapCredentials = "YOUR_KEY HERE";
            var map = null;

            function GetMap() {
                var mapOptions = { credentials: mapCredentials,
                    mapTypeId: Microsoft.Maps.MapTypeId.road,
                    enableClickableLogo: false,
                    enableSearchLogo: false,
                    showCopyright: false,
                    showDashboard: true,
                    showLogo: false
                }

                map = new Microsoft.Maps.Map(document.getElementById("mapDiv"), mapOptions);

                var loc = new Microsoft.Maps.Location(48.03, -122.4);

                var tileSource = new Microsoft.Maps.TileSource({ uriConstructor: 'http://www.microsoft.com/maps/isdk/ajax/layers/lidar/{quadkey}.png' });

                // Construct the layer using the tile source
                var tilelayer = new Microsoft.Maps.TileLayer({ mercator: tileSource, opacity: 0.5, zIndex: 1 });

                // Push the tile layer to the map
                map.entities.push(tilelayer);

                // Center the map on the location
                map.setView({ center: loc, zoom: 12 });
            }
    </script>
    </head>
    <body onload="GetMap();">
    <div id='mapDiv' style='position:relative; width: 621px; height: 550px;'>

    </div>
    </body>
    </html>

    I realize this is probalby an issue with IE8, but I'm pretty sure I can be the only one with a requirement to print the map using IE print and was hopiing a work around had been found.

    Thanks in advance for your help,

    Shawn

    Friday, June 8, 2012 3:25 PM

Answers

  • An update for anyone tracking this issue.  Microsoft has opened a defect but at this point they do not have a timeline to address the issue.  They suggested I contact them in a few months to check the status.

    As a workaround they suggest I have my users print the map using another browser.

    I'll post updates when I receive them.

    Shawn

    Monday, July 9, 2012 5:58 PM

All replies

  • An update for anyone tracking this issue.  Microsoft has opened a defect but at this point they do not have a timeline to address the issue.  They suggested I contact them in a few months to check the status.

    As a workaround they suggest I have my users print the map using another browser.

    I'll post updates when I receive them.

    Shawn

    Monday, July 9, 2012 5:58 PM
  • Did you ever get any additional feedback from Microsoft on this issue?

    Regards,

    Erik

    Tuesday, November 20, 2012 9:28 PM