none
Display MapTileLayer only without Background Bing map. RRS feed

  • Question

  • Hi,

    I'm using the bing Map SDK for UWP Windows 8.1 and i would like to show only the Maptilelayer without bing map as background.
    it's a optional feature i would like to add in the app to show layer like cadastral plan.

    This a sample to show how i'm using MaptileLayer, But i didn't found any option to hide bing map when we need.

    public async void InnitMap()
            {
                //PhileasMainMaps.ZoomLevel = 15;
    
                PhilMainMaps.Credentials = "key";
                PhilMainMaps.ShowTraffic = false;
    
                if (await Connect())
                {
                    AutoLocation = true;
                    _geolocator.PositionChanged += new TypedEventHandler<Geolocator, PositionChangedEventArgs>(geolocator_PositionChanged);
    
                    MainLayer = new MapTileLayer();
                    MainLayer.GetTileUri += delegate (object sender, GetTileUriEventArgs e)
                    {
                        //WMS
                        //e.Uri = new Uri(string.Format(_wmsUrl, XYZoomToBBox(e.X, e.Y, e.LevelOfDetail)));
                        _levelOfZoom = e.LevelOfDetail;
                        //WMTS
                        e.Uri = new Uri(string.Format(_LayerWMTSTransMNetWork, _levelOfZoom, e.Y, e.X));
    
                    };

    Any suggestions?
    thanks Again


    Edit: i'm forced to be on Windows 8.1, it's for a enterprise app.

    • Edited by Guillaume E Monday, December 18, 2017 5:45 PM
    Monday, December 18, 2017 5:39 PM

Answers

  • Setting the Style to MapStyle.None will cause no background data to be loaded.
    • Marked as answer by Guillaume E Monday, December 18, 2017 5:50 PM
    Monday, December 18, 2017 5:45 PM
    Moderator

All replies

  • Setting the Style to MapStyle.None will cause no background data to be loaded.
    • Marked as answer by Guillaume E Monday, December 18, 2017 5:50 PM
    Monday, December 18, 2017 5:45 PM
    Moderator
  • Thanks for the reply!

    You are right, it's work with:

    PhilMainMaps.MapType = MapType.Empty;
    i don't know why i didn't saw this before :)

    Monday, December 18, 2017 5:52 PM