public MainWindow()
        {
            InitializeComponent();

            MapControl.Map.Layers.Add(new TileLayer(KnownTileSources.Create())
            {
                Name = "OpenStreetMap"
            });

            _httpVectorTileSource = CreateVectorTileTileSource();
            _vectorTileLayer      = new TileLayer(_httpVectorTileSource)
            {
                Opacity = 0.5, Name = "Mapzen vector tiles"
            };
            MapControl.Map.Layers.Add(_vectorTileLayer);

            MapsuiLayerList.Initialize(MapControl.Map.Layers);
        }
Example #2
0
        public MainWindow()
        {
            InitializeComponent();

            MapControl.Map.Layers.Add(new TileLayer(KnownTileSources.Create())
            {
                Name = "OpenStreetMap"
            });

            _httpVectorTileSource = CreateVectorTileTileSource();
            // FUTURE_httpVectorTileSource = new HttpTileSource (new GlobalSphericalMercator(), "https://tile.mapzen.com/mapzen/vector/v1/all/{z}/{x}/{y}.mvt?api_key=mapzen-tnjqimH");

            _vectorTileLayer = new TileLayer(_httpVectorTileSource)
            {
                Opacity = 0.5, Name = "Mapzen vector tiles"
            };
            // FUTURE: _vectorTileLayer = new VectorTileLayer(_httpVectorTileSource);

            MapControl.Map.Layers.Add(_vectorTileLayer);

            MapsuiLayerList.Initialize(MapControl.Map.Layers);
        }