コード例 #1
0
        public void LoadData()
        {
            Loading(this, EventArgs.Empty);

            var layerName = Earthwatchers.Models.KmlModels.Layers.LeyBosquesSalta.GetStringValue();

            layerRequest.GetLayersByName(layerName);

            Current.Instance.MapControl.OnViewChanged(true);
        }
コード例 #2
0
        public void LoadData()
        {
            var             region           = Current.Instance.Earthwatcher.PlayingRegion != 0 ? Current.Instance.Earthwatcher.PlayingRegion : 1;
            var             layerName        = Earthwatchers.Models.KmlModels.Layers.FincasName.GetStringValue() + region.ToString();
            FincasNameLayer fincasLayerNames = Current.Instance.LayerHelper.Layers.Where(x => x.LayerName == "NombreFincas").FirstOrDefault() as FincasNameLayer;

            if (isFirstTime || _regionId != region) //Para no agregarlo cada vez
            {
                if (_regionId != region)
                {
                    //Saco las fincas de otra region
                    _source.Features.Clear();
                    //Regcargo los nombres para la nueva region
                    fincasLayerNames.ReloadNames();
                }

                layerRequest.GetLayersByName(layerName, true);
                Current.Instance.MapControl.OnViewChanged(true);
                _regionId = region;
            }
        }