none
MapTileLayer.Opacity

    Question

  • I'm running VS2013 Win8.1 app with Bing.Maps.Xaml, Version=1.313.0825.0

    Seems no matter what I set the MapTileLayer.Opacity value to, nothing changes.

    MapTileLayer.Opacity = 0.3 looks the same as MapTileLayer.Opacity = 1

    Is this a bug?  

    Thursday, November 07, 2013 11:00 PM

Answers

All replies

  • I just tested this and its working fine. I'm assuming you have created an instance of a MapTileLayer and changed the opacity on that. Something like this:

    MapTileLayer tileLayer = new MapTileLayer();
    tileLayer.GetTileUri += tileLayer_GetTileUri;
    tileLayer.Opacity = 0.1;
    MyMap.TileLayers.Add(tileLayer);

    http://rbrundritt.wordpress.com


    Friday, November 08, 2013 9:55 AM
  • I have setup a very simple example project with code as follows:

    _mapTileLayer = new MapTileLayer();
    //_mapTileLayer.Opacity = 0.1;
    _mapTileLayer.Opacity = 0.8;
    _mapTileLayer.GetTileUri += MapTileLayer_GetTileUri;
    
    MainMap.TileLayers.Add(_mapTileLayer);

    The tile layer appears correctly (GetTileUri is returning valid urls to map tiles) but there is no visual difference between 0.1 and 0.8 opacity values

    Fortunately, we kept the .vsix intallers in source control.  I installed the previous version of bing maps (on a win 8 machine, not my 8.1 machine) and the opacity works as expected.  I gathered a few details about the version numbers (as they appear in VS Extensions).  Any thoughts/help is appreciated!

    //Opacity works:
    Bing Maps SDK for Windows Store Apps Version 1.1.20120927.4
    File Location: C:\Users\[Username]\AppData\Local\Microsoft SDKs\Windows\v8.0\ExtensionSDKs\Bing.Maps.Xaml\1.0\

    //Broken Opacity:
    Bing Maps SDK for Windows Store Apps Version 1.113.601.1
    C:\Users\[Username]\AppData\Local\Microsoft SDKs\Windows\v8.0\ExtensionSDKs\Bing.Maps.Xaml\1.113.0601.1\


    Friday, November 08, 2013 7:17 PM
  • Oh yes. I remember this issue now. This was discussed in a previous forum post. This was fixed in the Windows 8.1 version of the map control here: http://visualstudiogallery.msdn.microsoft.com/224eb93a-ebc4-46ba-9be7-90ee777ad9e1

    http://rbrundritt.wordpress.com

    Friday, November 08, 2013 7:21 PM
  • I have that version installed on a Win 8.1 machine with VS2013 Ultimate and with the following code snippet, I see no change in opacity:

    _mapTileLayer = new MapTileLayer();
    //_mapTileLayer.Opacity = 0.1;
    _mapTileLayer.Opacity = 0.8;
    _mapTileLayer.GetTileUri += MapTileLayer_GetTileUri;
    
    MainMap.TileLayers.Add(_mapTileLayer);

    Is this something we should move off the forums and into a support ticket?  Opacity worked in V1.1.20120927.4.  It stopped working in V1.113.0601.1.  It still isn't working in 1.313.825.0.

    • Edited by acme_hap Friday, November 08, 2013 7:27 PM
    Friday, November 08, 2013 7:26 PM
  • I have the same version and the opacity works fine. An opacity of 0.8 is hardly noticeable. Try a smaller number like 0.5 or lower.

    If you want to make a support ticket you have to be a licensed Bing Maps customer. If this is the case them simply send them an email, if you are a licensed customer the email address will appear in the Bing Maps portal on the left side panel.


    http://rbrundritt.wordpress.com

    Monday, November 11, 2013 10:13 AM