FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
SharpMap/Examples/WinFormSamples/Samples/TiledWmsSample.cs at main · SharpMap/SharpMap · GitHub
SharpMap
SharpMap
Repository navigation
Code
Issues
42
(42)
Pull requests
6
(6)
Discussions
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
SharpMap
/
Examples
/
WinFormSamples
/
Samples
/
TiledWmsSample.cs
Copy path
More file actions
More file actions
Latest commit
History
History
History
45 lines (37 loc) · 1.78 KB
Breadcrumbs
SharpMap
/
Examples
/
WinFormSamples
/
Samples
/
TiledWmsSample.cs
Copy path
File metadata and controls
45 lines (37 loc) · 1.78 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
using
BruTile
.
Wmsc
;
using
SharpMap
;
using
SharpMap
.
Layers
;
using
BruTile
.
Web
;
using
BruTile
;
using
System
.
Collections
.
Generic
;
namespace
WinFormSamples
.
Samples
{
internal
class
TiledWmsSample
{
public
static
Map
InitializeMap
(
)
{
Map
map
=
new
Map
(
)
;
//string url = "http://labs.metacarta.com/wms-c/tilecache.py?version=1.1.1&request=GetCapabilities&service=wms-c";
string
url
=
"http://resource.sgu.se/service/wms/130/brunnar?SERVICE=WMS&VERSION=1.3&REQUEST=getcapabilities&TILED=true"
;
//string url = "http://dev:8080/geoserver/gwc/service/wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=getcapabilities&TILED=true";
//string url = "http://dev:8080/geoserver/ows?service=wms&version=1.3.0&request=GetCapabilities&tiled=true";
//TiledWmsLayer tiledWmsLayer = new TiledWmsLayer("Metacarta", url);
//tiledWmsLayer.TileSetsActive.Add(tiledWmsLayer.TileSets["avalon"].Name);
//map.Layers.Add(tiledWmsLayer);
//map.ZoomToBox(new BoundingBox(-180.0, -90.0, 180.0, 90.0));
//WmscRequest req;
//ITileSource tileSource;
TileAsyncLayer
tileLayer
;
//BruTile.Web.TmsTileSource source2 = new TmsTileSource(url);
var
source
=
new
List
<
ITileSource
>
(
WmscTileSource
.
CreateFromWmscCapabilties
(
new
System
.
Uri
(
url
)
)
)
;
// foreach (ITileSource src in source)
// {
tileLayer
=
new
TileAsyncLayer
(
source
[
16
]
,
"tileLayer"
+
source
[
16
]
)
;
tileLayer
.
MapNewTileAvaliable
+=
map
.
MapNewTileAvaliableHandler
;
map
.
BackgroundLayer
.
Add
(
tileLayer
)
;
// }
map
.
ZoomToExtents
(
)
;
return
map
;
}
}
}
Back
|
FazBrowse Home
|
New Git URL