This is a migrated thread and some comments may be shown as answers.

geoserver geowebcache source

1 Answer 115 Views
Map
This is a migrated thread and some comments may be shown as answers.
ARNAUD
Top achievements
Rank 1
ARNAUD asked on 04 May 2012, 11:09 AM
hello, 
i am  trying to convert a silverlight DeepEarth project  over a geoserver into a WPF control. i have some problem trying to understand how the new WmsTiled Source work ( for example what kind of uri should i put in the string parameter?). Furthermore  i was able to connect to a GeoWebCache using this litlle class overriding  microsoft MapControl TileSource : 

public class GWCTileSource :  Microsoft.Maps.MapControl.TileSource
    {
        private const string TilePath = @"{GWC_ADDRESS}/service/gmaps?layers={L}&zoom={Z}&x={X}&y={Y}";
        private string gwc_address;
        private string layername;
 
         
        public GWCTileSource()
            : base()
        {
        }
 
        public GWCTileSource(string gwc_address, string layername)
            : base()
        {
             
            this.gwc_address = gwc_address;
            this.layername = layername;
             
        }
 
        public override Uri GetUri(int x, int y, int zoom)
        {
               string url = TilePath;
                url = url.Replace("{GWC_ADDRESS}", gwc_address);
                url = url.Replace("{L}", layername);
                url = url.Replace("{Z}", zoom.ToString());
                url = url.Replace("{X}", x.ToString());
                url = url.Replace("{Y}", y.ToString());
                return new Uri(url);
          
        }
    }

any advice on how should i proceed to manage both wms and wms through GeowebCache sources ?

1 Answer, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 09 May 2012, 09:12 AM
Hello Arnaud,

First of all, you shouldn't use WmsTiledSource with RadMap. You should use WmsTiledProvider. The only property you should set is BaseUri. This is a part of the URL before the "?" sign. 

Kind regards,
Andrey Murzov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
Map
Asked by
ARNAUD
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Share this question
or