示例#1
0
        private async void Initialize()
        {
            var templateUri = "https://cyberjapandata.gsi.go.jp/xyz/std/{level}/{col}/{row}.png";

            //var templateUri = "https://{subDomain}.tile.stamen.com/terrain/{level}/{col}/{row}.png";
            //List<String> subDomains = new List<String> { "a", "b", "c", "d" };

            var webTiledLayer = new WebTiledLayer(templateUri);

            await webTiledLayer.LoadAsync();

            if (webTiledLayer.LoadStatus == Esri.ArcGISRuntime.LoadStatus.Loaded)
            {
                Map myMap = new Map(new Basemap(webTiledLayer));

                Envelope initialLocation = new Envelope(
                    136.6, 35.72, 139.65, 35.68, SpatialReferences.Wgs84);

                myMap.InitialViewpoint = new Viewpoint(initialLocation);

                MyMapView.Map = myMap;

                var attribution = @"<a href=""http://maps.gsi.go.jp/development/ichiran.html"" target=""_blank"">地理院タイル</a>";
                //var attribution = "<a href='http://maps.gsi.go.jp/development/ichiran.html' target='_blank'>地理院タイル</a>";

                webTiledLayer.Attribution = attribution;
            }
            else
            {
                // todo
            }
        }
        private async void Initialize()
        {
            // Create the layer from the URL and the subdomain list.
            WebTiledLayer baseLayer = new WebTiledLayer(TemplateUri, _tiledLayerSubdomains);

            // Wait for the layer to load.
            await baseLayer.LoadAsync();

            // Create a basemap from the layer.
            Basemap layerBasemap = new Basemap(baseLayer);

            // Apply the attribution for the layer.
            baseLayer.Attribution = Attribution;

            // Show the tiled layer basemap.
            _myMapView.Map = new Map(layerBasemap);
        }
示例#3
0
        private async void Initialize()
        {
            // Create the layer from the URL and the subdomain list
            WebTiledLayer myBaseLayer = new WebTiledLayer(_templateUri, _tiledLayerSubdomains);

            // Wait for the layer to load
            await myBaseLayer.LoadAsync();

            // Create a basemap from the layer
            Basemap layerBasemap = new Basemap(myBaseLayer);

            // Apply the attribution for the layer
            myBaseLayer.Attribution = _attribution;

            // Create a map to hold the basemap
            Map myMap = new Map(layerBasemap);

            // Add the map to the map view
            MyMapView.Map = myMap;
        }