private static void LoadBingRoad(LayerHelper layerHelper)
        {
            var bingRoad = new BaseTileLayer(new BingTileSource(new BingRequest("http://h3.ortho.tiles.virtualearth.net/tiles", null, BingMapType.Roads)))
            {
                LayerName = "Bing Road",
                TumbnailPath = "Resources/Images/bingStreet.jpg",
                CopyrightImage = "Resources/Images/bing.png",
                Enabled = false
            };

            layerHelper.AddBaseLayer(bingRoad);
        }
        private static void LoadOsmMapnik(LayerHelper layerHelper)
        {
            var osmLayer = new BaseTileLayer(new OsmTileSource())
            {
                LayerName = "OSM",
                TumbnailPath = "Resources/Images/osm.png",
                CopyrightText = "CC-BY-SA Open Street Map and Contributors",
                Enabled = false
            };

            layerHelper.AddBaseLayer(osmLayer);
        }
Esempio n. 3
0
        private static void LoadBingRoad(LayerHelper layerHelper)
        {
            var bingRoad = new BaseTileLayer(new BingTileSource(new BingRequest("http://h3.ortho.tiles.virtualearth.net/tiles", null, BingMapType.Roads)))
            {
                LayerName      = "Bing Road",
                TumbnailPath   = "Resources/Images/bingStreet.jpg",
                CopyrightImage = "Resources/Images/bing.png",
                Enabled        = false
            };

            layerHelper.AddBaseLayer(bingRoad);
        }
Esempio n. 4
0
        private static void LoadOsmMapnik(LayerHelper layerHelper)
        {
            var osmLayer = new BaseTileLayer(new OsmTileSource())
            {
                LayerName     = "OSM",
                TumbnailPath  = "Resources/Images/osm.png",
                CopyrightText = "CC-BY-SA Open Street Map and Contributors",
                Enabled       = false
            };

            layerHelper.AddBaseLayer(osmLayer);
        }
Esempio n. 5
0
        private static void LoadEsriImagery(LayerHelper layerHelper)
        {
            var tileSource = new ArcGisTileSource("http://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer", EsriWorldSchema.GetSchema());
            var esri       = new BaseTileLayer(tileSource)
            {
                LayerName      = "World Imagery",
                TumbnailPath   = "Resources/Images/world_imagery.png",
                CopyrightImage = "Resources/Images/esriLogo.png",
                Enabled        = true
            };

            layerHelper.AddBaseLayer(esri);
        }
        public void SetLayerActive(BaseTileLayer layer)
        {
            if (currentLayer != null)
                currentLayer.Enabled = false;            

            layer.Enabled = true;
            currentLayer = layer;

            layerImage.Source = ResourceHelper.GetBitmap(layer.TumbnailPath);

            System.Windows.Controls.ToolTipService.SetToolTip(layerImage, layer.LayerName);
            //txtLayerName.Text = layer.LayerName;

            var mapControl = Current.Instance.MapControl;
            mapControl.clearCopyright();

            if (currentLayer.CopyrightImage != null)
                mapControl.SetCopyrightImage(ResourceHelper.GetBitmap(currentLayer.CopyrightImage));

            if (currentLayer.CopyrightText != null)
                mapControl.SetCopyrightText(currentLayer.CopyrightText);
           
            mapControl.OnViewChanged(true);
        }
        private static void LoadEsriImagery(LayerHelper layerHelper)
        {
            var tileSource = new ArcGisTileSource("http://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer", EsriWorldSchema.GetSchema());
            var esri = new BaseTileLayer(tileSource)
            {
                LayerName = "World Imagery",
                TumbnailPath = "Resources/Images/world_imagery.png",
                CopyrightImage = "Resources/Images/esriLogo.png",
                Enabled = true
            };

            layerHelper.AddBaseLayer(esri);
        }