This project has moved and is read-only. For the latest updates, please go here.

static wms-c

Oct 17, 2011 at 12:16 PM
Edited Oct 18, 2011 at 1:37 PM


i have a wms server with static wms-c capacity, i seem i can acceed map image with url like

i seach with sharpmap how i can use this map.

With open layer i use this code :

function init(){
    OpenLayers.IMAGE_RELOAD_ATTEMPTS = 10;
    OpenLayers.Util.onImageLoadErrorColor = "transparent";
    // Créer la map
    var options={
                numZoomLevels: 14,
                projection: new OpenLayers.Projection("EPSG:900913"),
                displayProjection: new OpenLayers.Projection("EPSG:4326"),
                units: 'm',
                resolutions:[ 156543.0339,78271.51695,39135.758475,19567.879237500,9783.939618750,
                maxResolution: 156543.0339,
                maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34, 20037508.34, 20037508.34),
                controls: [new OpenLayers.Control.MouseDefaults()]
    map = new OpenLayers.Map( 'map',options);
        var TiledExtraOptions = { format: 'image/png',
                            isBaseLayer: true,
                            visibility: true};
        var oLayerTuile = new OpenLayers.Layer.TileCache(
      "Carte routiere MSP",
    /* Ajouter le layer à la map*/
    /* Ajout des controls de base*/
    map.addControl(new OpenLayers.Control.Attribution());
    map.addControl(new OpenLayers.Control.PanZoomBar());
    map.addControl(new OpenLayers.Control.MousePosition());
    map.addControl(new OpenLayers.Control.LayerSwitcher());
    /* Cadrer sur l'étendue demandé*/
    map.zoomToExtent(new OpenLayers.Bounds(-8143094,5809805,-8053511,6070882));

There other one option it a wms-c with a cgi and this one can produce a getcapability but i not sure how to use it.
Oct 31, 2011 at 12:06 PM

i succed to use wms-c with the cgi with the version 93847 on this way


string url = ""; 

List<ITileSource> source = WmscTileSource.TileSourceBuilder(new System.Uri(url), null);


TileLayer myTiledLayer = new SharpMap.Layers.TileLayer(source[2], url); 
myTiledLayer.SRID = mapEPSG;