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);
        }
        public void SetLayerHelper(LayerHelper layerHelper)
        {
            this.layerHelper = layerHelper;

            var hexLayer = layerHelper.FindLayer(Constants.Hexagonlayername);
            if (hexLayer == null)
                return;

            hexagonOnOff = new LayerControlOnOff(hexLayer, true);
            hexagonOnOff.VisibilityChanged += hexagonLayerOnOff_VisibilityChanged;
            layerWrapper.Children.Add(hexagonOnOff);
        }
        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);
        }
Exemplo n.º 4
0
        public void SetLayerHelper(LayerHelper layerHelper)
        {
            this.layerHelper = layerHelper;
            layerWrapper.Children.Add(new TimeLineControl());

            var hexLayer = layerHelper.FindLayer(Constants.Hexagonlayername);
            if (hexLayer == null)
                return;

            layerWrapper.Children.Add(new LayerControlOnOff(hexLayer));


            //layerHelper.BaseLayersChanged += LayerHelperBaseLayersChanged;
            //layerHelper.LayersChanged += LayerHelperLayersChanged;
        }
 public static void Initialize(LayerHelper layerHelper)
 {
     //LoadArcGisImageserver(layerHelper);
     LoadEsriImagery(layerHelper);
     LoadBasecamps(layerHelper);
     //LoadOsmMapnik(layerHelper);
     //LoadBingHybrid(layerHelper);
     //LoadBingRoad(layerHelper);
     //TODO: descomentar
     LoadArgentineLaw(layerHelper);
     LoadHexagon(layerHelper);
     //LoadLandDemand(layerHelper);
     //LoadAlertedLand(layerHelper);
     //LoadFlags(layerHelper);
     LoadJaguar(layerHelper);
     LoadFincasNombre(layerHelper);
 }
        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 LoadFincasNombre(LayerHelper layerHelper)
 {
     var layer = new FincasNameLayer(Constants.fincasLayerName) { Enabled = true };
     layerHelper.AddLayer(layer);
 }
 private static void LoadJaguar(LayerHelper layerHelper)
 {
     var layer = new JaguarLayer(Constants.jaguarLayerName) { Enabled = true };
     layerHelper.AddLayer(layer);
 }
Exemplo n.º 10
0
 private static void LoadArcGisImageserver(LayerHelper layerHelper)
 {
     // layerHelper.AddLayer(ArcGISImageServiceSample.Create2());
     // layerHelper.AddLayer(ArcGISImageServiceSample.Create());
 }
Exemplo n.º 11
0
 private static void LoadLandDemand(LayerHelper layerHelper)
 {
     var layer = new LandDemandLayer(Constants.DemandAuthoritiesLayerName) { Enabled = true, LayerName = Constants.DemandAuthoritiesLayerName };
     layerHelper.AddLayer(layer);
 }
Exemplo n.º 12
0
 private static void LoadAlertedLand(LayerHelper layerHelper)
 {
     var layer = new AlertedLandLayer(Constants.AlertedLandLayername) { Enabled = true, LayerName = Constants.AlertedLandLayername };
     layerHelper.AddLayer(layer);            
 }
Exemplo n.º 13
0
 private static void LoadBasecamps(LayerHelper layerHelper)
 {
     var layer = new BasecampLayer(Constants.BasecampsLayer) { Enabled = true, Opacity = 1 };
     layerHelper.AddLayer(layer);
 }
Exemplo n.º 14
0
 private static void LoadArgentineLaw(LayerHelper layerHelper)
 {
     var layer = new ArgentineLawLayer(Constants.ArgentineLawlayername) { Enabled = true, Opacity = 0 };
     layerHelper.AddLayer(layer);
 }
Exemplo n.º 15
0
 private static void LoadHexagon(LayerHelper layerHelper)
 {
     var layer = new HexagonLayer(Constants.Hexagonlayername) {Enabled = true};
     layerHelper.AddLayer(layer);
 }
        private void MainPageLoaded(object sender, RoutedEventArgs e)
        {
            //Land Events
            landRequest.LandReceived += LandChanged;
            landRequest.LandsReceived += landRequest_LandsReceived;
            landRequest.VerifiedLandCodesReceived += landRequest_VerifiedLandCodesReceived;
            landRequest.CheckPercentageReceived += landRequest_CheckPercentageReceived;
            landRequest.PresicionPercentageReceived += landRequest_PresicionPercentageReceived;

            //Jaguar, DailyMessage, Contest Events
            jaguarRequests.PositionReceived += jaguarRequests_PositionReceived;
            popupMessageRequests.MessageReceived += popupMessageRequests_MessageReceived;
            contestRequests.ContestReceived += contestRequests_ContestReceived;

            //Tutorial Events
            StoryBoardTutorialUI0.Completed += StoryBoardTutorialUI0_Completed; //termino de mostrar el mapa y los textos
            StoryBoardLoadingTutorialUI0.Completed += StoryBoardLoadingTutorialUI0_Completed; //termino de mostrar el mapa y el loading para cargarlos
            StoryBoardTutorialUI1.Completed += StoryBoardTutorialUI1_Completed; //termino de presentarle la parcela y dejo el boton [mi parcela] titilando

            //Layers Events
            this.OpacitiesStoryBoard.Completed += OpacitiesStoryBoard_Completed;
            this.layerList.ChangingOpacity += layerList_ChangingOpacity;
            this.layerList.HexLayerVisibilityChanged += layerList_HexLayerVisibilityChanged;
            this.layerList.ArgentineLawLayerLayerVisibilityChanged += layerList_ArgentineLawLayerLayerVisibilityChanged;
            this.layerList.ArgentineLawLoaded += layerList_ArgentineLawLoaded;
            this.layerList.ArgentineLawLoading += layerList_ArgentineLawLoading;
            this.ChangeOpacityStoryBoard.Completed += ChangeOpacityStoryBoard_Completed;

            HtmlPage.RegisterScriptableObject("Credentials", this);

            //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);

            //Activate GeoHexCode Search only if admin
            if (Current.Instance.Earthwatcher.Role == Role.Admin)
            {
                this.TestGeoHexTextBox.Visibility = Visibility.Visible;
            }

            Current.Instance.LayerHelper = layerHelper;

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

            //Report Window First And Unic Inicialization
            reportWindow = new ReportWindow(new Land(), Current.Instance.Earthwatcher);
            reportWindow.ReportWindowClosed += reportWindow_ReportWindowClosed;
            reportWindow.CollectionCompleted += reportWindow_CollectionCompleted;
            reportWindow.ReportWindowDemand += reportWindow_ReportWindowDemand;
            reportWindow.Shared += reportWindow_Shared;
            reportWindow.ReportWindowConfirmationEnded += reportWindow_ReportWindowConfirmationEnded;
            reportWindow.ReportWindowLandStatusChanged += reportWindow_ReportWindowLandStatusChanged;
            landInfoWrapper.Children.Add(reportWindow);

            //Get PlayingRegion Object
            regionRequest.GetById(Current.Instance.Earthwatcher.PlayingRegion);

            //GetShareTexts for region and language
            customShareTextRequest.GetByRegionIdAndLanguage(Current.Instance.Earthwatcher.PlayingRegion, Current.Instance.Earthwatcher.Language);

            MapControl_zoomFinished(null, null);
            MapControl_zoomStarted(null, null);
            scoreRequest.GetByUser(Current.Instance.Earthwatcher.Id);
        }
Exemplo n.º 17
0
 private static void LoadFlags(LayerHelper layerHelper)
 {
     var layer = new FlagLayer(Constants.flagLayerName) { Enabled = true};
     layerHelper.AddLayer(layer);
 }
Exemplo n.º 18
0
        private void MainPageLoaded(object sender, RoutedEventArgs e)
        {
            landRequest.LandReceived += LandChanged;
            landRequest.LandsReceived += landRequest_LandsReceived;
            landRequest.VerifiedLandCodesReceived += landRequest_VerifiedLandCodesReceived;
            jaguarRequests.PositionReceived += jaguarRequests_PositionReceived;
            popupMessageRequests.MessageReceived += popupMessageRequests_MessageReceived;
            contestRequests.ContestReceived += contestRequests_ContestReceived;

            Tutorial0StoryBoard.Completed += Tutorial0StoryBoard_Completed;
            Tutorial0LoadingStoryBoard.Completed += Tutorial0LoadingStoryBoard_Completed;
            Tutorial1StoryBoard.Completed += Tutorial1StoryBoard_Completed;
            Tutorial3StoryBoard.Completed += Tutorial3StoryBoard_Completed;
            this.OpacitiesStoryBoard.Completed += OpacitiesStoryBoard_Completed;
            this.layerList.ChangingOpacity += layerList_ChangingOpacity;
            this.layerList.HexLayerVisibilityChanged += layerList_HexLayerVisibilityChanged;
            this.layerList.ArgentineLawLayerLayerVisibilityChanged += layerList_ArgentineLawLayerLayerVisibilityChanged;
            this.layerList.ArgentineLawLoaded += layerList_ArgentineLawLoaded;
            this.layerList.ArgentineLawLoading += layerList_ArgentineLawLoading;
            this.ChangeOpacityStoryBoard.Completed += ChangeOpacityStoryBoard_Completed;

            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;

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

            hexagonInfo = new HexagonInfo();
            hexagonInfo.ReportWindowClosed += hexagonInfo_ReportWindowClosed;
            hexagonInfo.CollectionCompleted += hexagonInfo_CollectionCompleted;
            hexagonInfo.ReportWindowDemand += hexagonInfo_ReportWindowDemand;
            hexagonInfo.Shared += hexagonInfo_Shared;
            hexagonInfo.ReportWindowConfirmationEnded += hexagonInfo_ReportWindowConfirmationEnded;
            hexagonInfo.ReportWindowLandStatusChanged += hexagonInfo_ReportWindowLandStatusChanged;
            landInfoWrapper.Children.Add(hexagonInfo);

            //var flagLayer = Current.Instance.LayerHelper.FindLayer(Constants.flagLayerName) as FlagLayer;
            //if (flagLayer != null) flagLayer.RequestFlags();
            MapControl_zoomFinished(null, null);
            MapControl_zoomStarted(null, null);
            scoreRequest.GetByUser(Current.Instance.Earthwatcher.Id);

      
        

        }