public static void Initialize(LayerHelper layerHelper)
 {
     //LoadArcGisImageserver(layerHelper);
     LoadEsriImagery(layerHelper);
     LoadOsmMapnik(layerHelper);
     LoadBingHybrid(layerHelper);
     LoadBingRoad(layerHelper);
     LoadHexagon(layerHelper);
     //LoadAlertedLand(layerHelper);
     //LoadFlags(layerHelper);
 }
        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);
        }
Beispiel #4
0
 private static void LoadArcGisImageserver(LayerHelper layerHelper)
 {
     // layerHelper.AddLayer(ArcGISImageServiceSample.Create2());
     // layerHelper.AddLayer(ArcGISImageServiceSample.Create());
 }
        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);
        }
 private static void LoadArcGisImageserver(LayerHelper layerHelper)
 {
    // layerHelper.AddLayer(ArcGISImageServiceSample.Create2());
    // layerHelper.AddLayer(ArcGISImageServiceSample.Create());
    
 }
 private static void LoadFlags(LayerHelper layerHelper)
 {
     var layer = new FlagLayer(Constants.flagLayerName) { Enabled = true};
     layerHelper.AddLayer(layer);
 }
 private static void LoadAlertedLand(LayerHelper layerHelper)
 {
     var layer = new AlertedLandLayer(Constants.AlertedLandLayername) { Enabled = true, LayerName = Constants.AlertedLandLayername };
     layerHelper.AddLayer(layer);            
 }
 private static void LoadHexagon(LayerHelper layerHelper)
 {
     var layer = new HexagonLayer(Constants.Hexagonlayername) {Enabled = true};
     layerHelper.AddLayer(layer);
 }
        private void MainPageLoaded(object sender, RoutedEventArgs e)
        {
            landRequest.LandReceived += LandChanged;
            Tutorial0StoryBoard.Completed += Tutorial0StoryBoard_Completed;
            Tutorial3StoryBoard.Completed += Tutorial3StoryBoard_Completed;
            Tutorial25StoryBoard.Completed += Tutorial25StoryBoard_Completed;
            this.OpacitiesStoryBoard.Completed += OpacitiesStoryBoard_Completed;
            this.layerList.AddingLayer += layerList_AddingLayer;
            this.layerList.LayerAdded += layerList_LayerAdded;

            HtmlPage.RegisterScriptableObject("Credentials", this);
            //SizeChanged += MainPageSizeChanged;

            //Create and set map
            var map = new Map();
            mapControl.Map = map;

            //Initialize the singleton
            Current.Instance.MapControl = mapControl;

            //Pass the LayerCollection used on the map to the helper, this is used to distinguish base, normal, ... layers 
            layerHelper = new LayerHelper(map.Layers);

            Current.Instance.LayerHelper = layerHelper;
            layerList.SetLayerHelper(layerHelper);

            //Load the preset layers
            LayerInitialization.Initialize(layerHelper);

            hexagonInfo = new HexagonInfo();
            hexagonInfo.ReportWindowClosed += hexagonInfo_ReportWindowClosed;
            landInfoWrapper.Children.Add(hexagonInfo);

            var flagLayer = Current.Instance.LayerHelper.FindLayer(Constants.flagLayerName) as FlagLayer;
            if (flagLayer != null) flagLayer.RequestFlags();

            scoreRequest.GetByUser(Current.Instance.Earthwatcher.Id);
        }
 public void SetLayerHelper(LayerHelper layerHelper)
 {
     this.layerHelper = layerHelper;
     layerHelper.BaseLayersChanged += LayerHelperBaseLayersChanged;
     layerHelper.LayersChanged += LayerHelperLayersChanged;
 }