${Mapping_TiledDynamicRESTLayer_Tile}

${Mapping_TiledDynamicRESTLayer_Description}

Inheritance: TiledDynamicLayer
Ejemplo n.º 1
0
 public MainPage()
 {
     this.InitializeComponent();
     _eLayer = MyMap.Layers["ELayer"] as ElementsLayer;
     _fLayer=MyMap.Layers["FLayer"] as FeaturesLayer;
     _layer=MyMap.Layers["TDLayer"] as TiledDynamicRESTLayer;
 }
        public CustomGeoCircle()
        {
            InitializeComponent();
            double[] resolutions = new double[14];
            double resolution = 0.28526148969889065;
            for (int i = 0; i < 14; i++)
            {
                resolutions[i] = resolution;
                resolution /= 2;
            }
            MyMap.Resolutions = resolutions;
            FeaturesLayer featuresLayer = MyMap.Layers["MyFeaturesLayer"] as FeaturesLayer;
            Feature feature = new Feature();

            GeoCircle circle = new GeoCircle();
            circle.Center = new GeoPoint(0, 0);
            circle.Radius = 20;

            feature.Geometry = circle;
            featuresLayer.Features.Add(feature);
            _layer = MyMap.Layers["tiledLayer"] as TiledDynamicRESTLayer;
            _layer.LocalStorage = new OfflineStorage("World");
            _layer.Failed += CustomGeoCircle_Failed;
            this.Unloaded += CustomGeoCircle_Unloaded;
        }
        public RESTFindMTSPPath()
        {
            InitializeComponent();
            double[] resolutions = new double[14];
            double resolution = 9.9772839315388211;
            for (int i = 0; i < 14; i++)
            {
                resolutions[i] = resolution;
                resolution /= 2;
            }
            MyMap.Resolutions = resolutions;

            elementsLayer = this.MyMap.Layers["MyElementsLayer"] as ElementsLayer;

            featuresLayer = this.MyMap.Layers["MyFeaturesLayer"] as FeaturesLayer;
            featuresLayerCenterPoints = this.MyMap.Layers["MyFeaturesLayer1"] as FeaturesLayer;

            Feature feature1 = new Feature
            {
                Geometry = new GeoPoint(4100, -4100),
                Style = new PredefinedMarkerStyle
                {
                    Color = new SolidColorBrush(Colors.Red),
                    Size = 20,
                    Symbol = PredefinedMarkerStyle.MarkerSymbol.Star
                }
            };

            featuresLayerCenterPoints.Features.Add(feature1);

            Feature feature2 = new Feature
            {
                Geometry = new GeoPoint(4500, -3000),
                Style = new PredefinedMarkerStyle
                {
                    Color = new SolidColorBrush(Colors.Red),
                    Size = 20,
                    Symbol = PredefinedMarkerStyle.MarkerSymbol.Star
                }
            };
            featuresLayerCenterPoints.AddFeature(feature2);

            Feature feature3 = new Feature
            {
                Geometry = new GeoPoint(5000, -3500),
                Style = new PredefinedMarkerStyle
                {
                    Color = new SolidColorBrush(Colors.Red),
                    Size = 20,
                    Symbol = PredefinedMarkerStyle.MarkerSymbol.Star
                }
            };
            featuresLayerCenterPoints.AddFeature(feature3);
            _layer = MyMap.Layers["tiledDynamicRESTLayer"] as TiledDynamicRESTLayer;
            _layer.LocalStorage = new OfflineStorage("长春市区图");
            _layer.Failed += RESTFindMTSPPath_Failed;
            this.Unloaded += RESTFindMTSPPath_Unloaded;
        }
Ejemplo n.º 4
0
        public MainPage()
        {
            this.InitializeComponent();
            layer=MyMap.Layers["TDLayer"] as TiledDynamicRESTLayer;
            Double[] resolutions = new Double[] {0.28526148969889065,0.14263074484944532,0.071315372424722662,0.035657686212361331,0.017828843106180665,0.0089144215530903327,0.0044572107765451664,0.0022286053882725832,
 0.0011143026941362916,0.00055715134706814579,0.0002785756735340729,0.00013928783676703645,0.000069643918383518224,0.000034821959191759112};
            MyMap.Resolutions = resolutions;
            MyMap.ViewBoundsChanged += MyMap_ViewBoundsChanged;
        }
Ejemplo n.º 5
0
 public MainPage()
 {
     this.InitializeComponent();
     layer=MyMap.Layers["TDLayer"] as TiledDynamicRESTLayer;
    
     //double[] sacles = new double[] {0.000000025,0.00000005, 0.0000001, 0.0000002, 0.0000004, 0.0000008 };
     MyMap.Scales = new double[] { 6.4e-9, 1.1e-8, 3.0e-8, 2.4e-7 };
     MyMap.ViewBoundsChanged += MyMap_ViewBoundsChanged;
     MyMap.Scales = new double[] { 5e-5, 1.25e-4, 2e-4, 5e-4 };
    
     
 }
Ejemplo n.º 6
0
 public MainPage()
 {
     this.InitializeComponent();
     layer=MyMap.Layers["TDLayer"] as TiledDynamicRESTLayer;
    
     double[] sacles = new double[] {0.000000025,0.00000005, 0.0000001, 0.0000002, 0.0000004, 0.0000008 };
     
     MyMap.ViewBoundsChanged += MyMap_ViewBoundsChanged;
     MyMap.Scales = sacles;
    
     
 }
 public MapHistroyControl( )
 {
     InitializeComponent();
     double[] resolutions = new double[14];
     double resolution = 0.28526148969889065;
     for (int i = 0; i < 14; i++)
     {
         resolutions[i] = resolution;
         resolution /= 2;
     }
     MyMap.Resolutions = resolutions;
     _layer = MyMap.Layers["tiledLayer"] as TiledDynamicRESTLayer;
     _layer.LocalStorage = new OfflineStorage("World");
 }
Ejemplo n.º 8
0
 public MainPage()
 {
     this.InitializeComponent();
     double[] resolutions = new double[14];
     double resolution = 0.28526148969889065;
     for (int i = 0; i < 14; i++)
     {
         resolutions[i] = resolution;
         resolution /= 2;
     }
    _tdLayer=MyMap.Layers["TDLayer"] as TiledDynamicRESTLayer;
    _tdLayer.LocalStorage = new OfflineKitaroDB(Windows.Storage.ApplicationData.Current.LocalFolder.Path+"\\World.ism");
    _tdLayer.Failed += TiledDynamicRESTLayerTest_Failed;
    this.Unloaded += TiledDynamicRESTLayerTest_Unloaded;
 }
 public Navigation()
 {
     InitializeComponent();
     double[] resolutions = new double[14];
     double resolution = 0.28526148969889065;
     for (int i = 0; i < 14; i++)
     {
         resolutions[i] = resolution;
         resolution /= 2;
     }
     MyMap.Resolutions = resolutions;
     _layer = MyMap.Layers["restLayer"] as TiledDynamicRESTLayer;
     _layer.LocalStorage = new OfflineStorage("World");
     _layer.Failed += Navigation_Failed;
 }
 public RESTThemeLabel()
 {
     InitializeComponent();
     double[] resolutions = new double[14];
     double resolution = 0.28526148969889065;
     for (int i = 0; i < 14; i++)
     {
         resolutions[i] = resolution;
         resolution /= 2;
     }
     MyMap.Resolutions = resolutions;
     _layer = MyMap.Layers["tiledDynamicRESTLayer"] as TiledDynamicRESTLayer;
     _layer.LocalStorage = new OfflineStorage("World");
     _layer.Failed += RESTThemeLabel_Failed;
     this.Unloaded += RESTThemeLabel_Unloaded;
 }
 public RESTThemeUnique()
 {
     InitializeComponent();
     double[] resolutions = new double[14];
     double resolution = 0.0055641857128792931;
     for (int i = 0; i < 14; i++)
     {
         resolutions[i] = resolution;
         resolution /= 2;
     }
     MyMap.Resolutions = resolutions;
     _layer = MyMap.Layers["tiledDynamicRESTLayer"] as TiledDynamicRESTLayer;
     _layer.LocalStorage = new OfflineStorage("京津地区土地利用现状图");
     _layer.Failed += RESTThemeUnique_Failed;
     this.Unloaded += RESTThemeUnique_Unloaded;
 }
 public CustomDrawStar()
 {
     InitializeComponent();
     double[] resolutions = new double[14];
     double resolution = 0.28526148969889065;
     for (int i = 0; i < 14; i++)
     {
         resolutions[i] = resolution;
         resolution /= 2;
     }
     MyMap.Resolutions = resolutions;
     elementslayer = MyMap.Layers["MyElementsLayer"] as ElementsLayer;
     _layer = MyMap.Layers["tiledLayer"] as TiledDynamicRESTLayer;
     _layer.LocalStorage = new OfflineStorage("World");
     _layer.Failed += CustomDrawStar_Failed;
     this.Unloaded += CustomDrawStar_Unloaded;
 }
 public GetFeaturesByIDsTest()
 {
     InitializeComponent();
     double[] resolutions = new double[14];
     double resolution = 0.28526148969889065;
     for (int i = 0; i < 14; i++)
     {
         resolutions[i] = resolution;
         resolution /= 2;
     }
     MyMap.Resolutions = resolutions;
     flayer = MyMap.Layers["FeaturesLayer"] as FeaturesLayer;
     _layer = MyMap.Layers["restLayer"] as TiledDynamicRESTLayer;
     _layer.LocalStorage = new OfflineStorage("World");
     _layer.Failed += GetFeaturesByIDsTest_Failed;
     this.Unloaded += GetFeaturesByIDsTest_Unloaded;
 }
 public TiledDynamicRESTLayerTest()
 {
     InitializeComponent();
     double[] resolutions = new double[14];
     double resolution=0.28526148969889065;
     for (int i = 0; i < 14; i++)
     {
         resolutions[i] = resolution;
         resolution /= 2;
     }
     MyMap.Resolutions = resolutions;
     MyMap.ViewBoundsChanged += new EventHandler<SuperMap.WinRT.Mapping.ViewBoundsEventArgs>(MyMap_ViewBoundsChanged);
     _layer=MyMap.Layers["tiledLayer"] as TiledDynamicRESTLayer;
     _layer.LocalStorage = new OfflineStorage("World");
     _layer.Failed += TiledDynamicRESTLayerTest_Failed;
     this.Unloaded += TiledDynamicRESTLayerTest_Unloaded;
 }
 public RESTFindPath()
 {
     InitializeComponent();
     double[] resolutions = new double[14];
     double resolution = 9.9772839315388211;
     for (int i = 0; i < 14; i++)
     {
         resolutions[i] = resolution;
         resolution /= 2;
     }
     MyMap.Resolutions = resolutions;
     elementsLayer = this.MyMap.Layers["MyElementsLayer"] as ElementsLayer;
     featuresLayer = this.MyMap.Layers["MyFeaturesLayer"] as FeaturesLayer;
     _layer = MyMap.Layers["tiledDynamicRESTLayer"] as TiledDynamicRESTLayer;
     _layer.LocalStorage = new OfflineStorage("长春市区图");
     _layer.Failed += RESTFindPath_Failed;
     this.Unloaded += RESTFindPath_Unloaded;
 }
Ejemplo n.º 16
0
 public Code()
 {
     InitializeComponent();
     double[] resolutions = new double[14];
     double resolution = 0.28526148969889065;
     for (int i = 0; i < 14; i++)
     {
         resolutions[i] = resolution;
         resolution /= 2;
     }
     MyMap.Resolutions = resolutions;
     elementsLayer = this.MyMap.Layers["MyElementsLayer"] as ElementsLayer;
     MyMap.ViewBoundsChanged += MyMap_ViewBoundsChanged;
     _layer = MyMap.Layers["DynamicRESTLayer"] as TiledDynamicRESTLayer;
     _layer.LocalStorage = new OfflineStorage("World");
     _layer.Failed += Code_Failed;
     this.Unloaded += Code_Unloaded;
 }
Ejemplo n.º 17
0
 public AddByCode()
 {
     InitializeComponent();
     double[] resolutions = new double[14];
     double resolution = 0.28526148969889065;
     for (int i = 0; i < 14; i++)
     {
         resolutions[i] = resolution;
         resolution /= 2;
     }
     MyMap.Resolutions = resolutions;
     this.MyMap.Loaded += new RoutedEventHandler(MyMap_Loaded);
     featuresLayer = this.MyMap.Layers["MyFeaturesLayer"] as FeaturesLayer;
     _layer = MyMap.Layers["tiledDynamicRESTLayer"] as TiledDynamicRESTLayer;
     _layer.LocalStorage = new OfflineStorage("World");
     _layer.Failed += AddByCode_Failed;
     this.Unloaded += AddByCode_Unloaded;
 }
 public SurfaceAnalyst()
 {
     InitializeComponent();
         
     double[] resolutions = new double[6];
     double resolution = 5304.9925191265474;
     for (int i = 0; i < 6; i++)
     {
         resolutions[i] = resolution;
         resolution /= 2;
     }
     MyMap.Resolutions = resolutions;
     featuresLayer = this.MyMap.Layers["MyFeaturesLayer"] as FeaturesLayer;
     _layer = MyMap.Layers["tiledDynamicRESTLayer"] as TiledDynamicRESTLayer;
     _layer.LocalStorage = new OfflineStorage("全国温度变化图");
     _layer.Failed += SurfaceAnalyst_Failed;
     this.Unloaded += SurfaceAnalyst_Unloaded;
 }
        public CustomMarkerStyle()
        {
            InitializeComponent();
            double[] resolutions = new double[14];
            double resolution = 0.28526148969889065;
            for (int i = 0; i < 14; i++)
            {
                resolutions[i] = resolution;
                resolution /= 2;
            }
            MyMap.Resolutions = resolutions;

            _layer = MyMap.Layers["tiledLayer"] as TiledDynamicRESTLayer;
            _layer.LocalStorage = new OfflineStorage("World");
            _layer.Failed += CustomMarkerStyle_Failed;
            this.Unloaded += CustomMarkerStyle_Unloaded;
            FeaturesLayer featureslayer = MyMap.Layers["MyFeaturesLayer"] as FeaturesLayer;

            for (int i = 1; i <= 27; i++)
            {
                double x;
                double y;
                if (i <= 9)
                {
                    x = 80 + 5 * i;
                    y = 40;
                }
                else if (i > 9 && i <= 18)
                {
                    x = 80 + 5 * (i - 9);
                    y = 30;
                }
                else
                {
                    x = 80 + 5 * (i - 18);
                    y = 20;
                }

                Feature f = new Feature();
                f.Geometry = new GeoPoint(x, y);
                f.Style = LayoutRoot.Resources[string.Format("MyMarkerStyle{0}", i)] as MarkerStyle;
                featureslayer.Features.Add(f);
            }
        }
        public InRegionCheck()
        {
            InitializeComponent();

            double[] resolutions = new double[14];
            double resolution = 0.28526148969889065;
            for (int i = 0; i < 14; i++)
            {
                resolutions[i] = resolution;
                resolution /= 2;
            }
            MyMap.Resolutions = resolutions;
            pointsLayer = this.MyMap.Layers["MyPointsLayer"] as FeaturesLayer;
            regionLayer = this.MyMap.Layers["MyRegionLayer"] as FeaturesLayer;
            _layer = MyMap.Layers["tiledLayer"] as TiledDynamicRESTLayer;
            _layer.LocalStorage = new OfflineStorage("World");
            _layer.Failed += InRegionCheck_Failed;
            this.Unloaded += InRegionCheck_Unloaded;
            random = new Random();
            for (int i = 0; i < 100; i++)
            {
                X = random.Next(-160, 160);
                Y = random.Next(-60, 60);

                Feature feature = new Feature
                {
                    Geometry = new GeoPoint
                    {
                        X = X,
                        Y = Y
                    },
                    Style = new PredefinedMarkerStyle
                    {
                        Color = new SolidColorBrush
                        {
                            Color = Colors.Red
                        }
                    }
                };

                pointsLayer.AddFeature(feature);
            }
        }
 public RESTSQLQueryTest()
 {
     InitializeComponent();
     double[] resolutions = new double[14];
     double resolution = 0.28526148969889065;
     for (int i = 0; i < 14; i++)
     {
         resolutions[i] = resolution;
         resolution /= 2;
     }
     MyMap.Resolutions = resolutions;
     flayer = MyMap.Layers["FeaturesLayer"] as FeaturesLayer;
     //当在 FeaturesLayer 上通过鼠标左键点击触发的事件
     flayer.PointerPressed += flayer_MouseLeftButtonDown;
     _layer = MyMap.Layers["tiledDynamicRESTLayer"] as TiledDynamicRESTLayer;
     _layer.LocalStorage = new OfflineStorage("World");
     _layer.Failed += RESTSQLQueryTest_Failed;
     this.Unloaded += RESTSQLQueryTest_Unloaded;
 }
        public CustomGeoRectangle()
        {
            InitializeComponent();
            double[] resolutions = new double[14];
            double resolution = 0.28526148969889065;
            for (int i = 0; i < 14; i++)
            {
                resolutions[i] = resolution;
                resolution /= 2;
            }
            MyMap.Resolutions = resolutions;
            FeaturesLayer featuresLayer = MyMap.Layers["MyFeaturesLayer"] as FeaturesLayer;
            Feature feature = new Feature();

            feature.Geometry = new GeoRectangle(new Point2D(10, -10), new Point2D(30, 30));
            featuresLayer.Features.Add(feature);
            _layer = MyMap.Layers["tiledLayer"] as TiledDynamicRESTLayer;
            _layer.LocalStorage = new OfflineStorage("World");
            _layer.Failed += CustomGeoRectangle_Failed;
            this.Unloaded += CustomGeoRectangle_Unloaded;
        }
        public UIActionsInElementsLayer( )
        {
            InitializeComponent();
            double[] resolutions = new double[14];
            double resolution = 0.28526148969889065;
            for (int i = 0; i < 14; i++)
            {
                resolutions[i] = resolution;
                resolution /= 2;
            }
            MyMap.Resolutions = resolutions;

            MyMap.Theme = new RawTheme();

            elementsLayer = MyMap.Layers["MyElementsLayer"] as ElementsLayer;
            featuresLayer = MyMap.Layers["MyFeaturesLayer"] as FeaturesLayer;
            _layer = MyMap.Layers["tiledLayer"] as TiledDynamicRESTLayer;
            _layer.LocalStorage = new OfflineStorage("World");
            _layer.Failed += UIActionsInElementsLayer_Failed;
            this.Unloaded += UIActionsInElementsLayer_Unloaded;
        }
Ejemplo n.º 24
0
 public MainPage()
 {
     this.InitializeComponent();
     layer=MyMap.Layers["TDLayer"] as TiledDynamicRESTLayer;
     double[] resolutions = new double[14];
     double resolution = 0.28526148969889065;
     for (int i = 0; i < 14; i++)
     {
         resolutions[i] = resolution;
         resolution /= 2;
     }
     MyMap.Resolutions = resolutions;
     double[] resolutions1 = new double[14];
     double resolution1 = 0.18526148969889065;
     for (int i = 0; i < 14; i++)
     {
         resolutions[i] = resolution;
         resolution /= 2;
     }
     MyMap.Resolutions = resolutions1;
     MyMap.ViewBoundsChanged += MyMap_ViewBoundsChanged;
 }
 public CustomLineStyle()
 {
     InitializeComponent();
     double[] resolutions = new double[14];
     double resolution = 0.28526148969889065;
     for (int i = 0; i < 14; i++)
     {
         resolutions[i] = resolution;
         resolution /= 2;
     }
     MyMap.Resolutions = resolutions;
     _layer = MyMap.Layers["tiledLayer"] as TiledDynamicRESTLayer;
     _layer.LocalStorage = new OfflineStorage("World");
     _layer.Failed += CustomLineStyle_Failed;
     this.Unloaded += CustomLineStyle_Unloaded;
     MyMap.ViewBounds = new Rectangle2D(75.0, 5.0, 138.0, 55.0);
     FeaturesLayer featureslayer = MyMap.Layers["MyFeaturesLayer"] as FeaturesLayer;
     for (int i = 1; i <= 10; i++)
     {
         int j = i * 7 + 70;
         Feature f = new Feature();
         f.Geometry =
             new GeoLine
             {
                 Parts = new System.Collections.ObjectModel.ObservableCollection<Point2DCollection>
                 {
                     new Point2DCollection
                     {
                         new Point2D(j,10),
                         new Point2D(j,50)
                     }
                 }
             };
         f.Style = LayoutRoot.Resources[string.Format("MyLineStyle{0}", i)] as LineStyle;
         featureslayer.Features.Add(f);
     }
 }
        private async System.Threading.Tasks.Task getLayerInfo()
        {
            layersStatus = new List<LayerStatus>();
            layer = new TiledDynamicRESTLayer
            {
                Url = url,
                EnableServerCaching = false,
            };
            
            layer.Failed += layer_Failed;
            this.MyMap.Layers.Add(layer);

            //获取图层信息
            try
            {
                GetLayersInfoService getInfoServer = new GetLayersInfoService(url);
                var result = await getInfoServer.ProcessAsync();

                if (result.LayersInfo.Count > 0)
                {
                    foreach (var layer1 in result.LayersInfo)
                    {
                        layersStatus.Add(new LayerStatus { IsVisible = layer1.IsVisible, LayerName = layer1.Name });
                    }
                    await MyMap.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
                        {
                            layersList.ItemsSource = layersStatus;
                        });
                    
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }