Example #1
0
 public void WmscRequest_Version130()
 {
     var request = new WmscRequest(new Uri("http://testserver.com"), new SphericalMercatorWorldSchema(), new List<string>(new string[] { "Layer One" }), null, null, "1.3.0");
     var ti = new TileInfo();
     var uri = request.GetUri(ti);
     StringAssert.Contains("VERSION=1.3.0", uri.ToString());
     StringAssert.Contains("CRS=", uri.ToString());
 }
 private static IRequest GetRequestBuilder(ITileSchema schema)
 {
     const string url = "http://geoserver.nl/tiles/tilecache.aspx?";
     var parameters = new Dictionary<string, string>();
     var request = new WmscRequest(new Uri(url), schema,
       new List<string>(new[] { "world_GM" }), new List<string>(), parameters);
     return request;
 }
 public GeodanWorldWmsTileSource()
 {
     var schema = new SphericalMercatorInvertedWorldSchema();
     schema.Srs = "EPSG:900913";
     const string url = "http://geoserver.nl/world/mapserv.cgi?map=world/world.map&VERSION=1.1.1";
     var request = new WmscRequest(new Uri(url), schema,
       new List<string>(new [] { "world" }), new List<string>(), new Dictionary<string, string>());
     Provider = new WebTileProvider(request);
     Schema = new SphericalMercatorInvertedWorldSchema();
 }
Example #4
0
        public static WmsTileSource Create(WmsServerInfo serverInfo)
        {
            var href = serverInfo.OnlineResource;
            var layers = new List<string>
                             {
                                 serverInfo.Layer
                             };

            var schema = 
                //new GlobalMercator("image/png");
                new UnProjected();
            var request = new WmscRequest(new Uri(href), schema, layers,
                                          new List<string>(),               // styles
                                          new Dictionary<string, string>(), // custom parameters
                                          serverInfo.Version);
            var provider = new WebTileProvider(request);
            return new WmsTileSource(provider, schema);
        }
Example #5
0
        public static WmsTileSource Create(WmsServerInfo serverInfo)
        {
            var href = serverInfo.OnlineResource;
            var layers = new List<string>
                             {
                                 serverInfo.Layer
                             };

            var schema =
                //new GlobalMercator("image/png");
                //new UnProjected();
                new WmsTileSchema("schema", new Extent(-180, -90, 180, 90), "CRS:84", "image/png", 256, 4.291534423828125e-10, AxisDirection.Normal); 
            var request = new WmscRequest(new Uri(href), schema, layers,
                                          new List<string>(),               // styles
                                          new Dictionary<string, string>(), // custom parameters
                                          serverInfo.Version);
            var provider = new WebTileProvider(request);
            return new WmsTileSource(provider, schema);
        }