This project has moved. For the latest updates, please go here.

How can I can change Projection Code

Topics: SharpMap Project, SharpMap v2.0, Web Controls
Jul 28, 2010 at 2:31 AM

Hi all, I set my CRS the value Crs="EPSG:2044"


                        <WmsParameters WmsVersion="1.3.0" Crs="EPSG:2044">                     
                                <cc1:StringValue Value="vn_tinh" />                                
                                <cc1:UriValue Value="http://thuan-pc:2001/Maps/Map.ashx" />

But, the url of image query is: http://thuan-pc:2001/Maps/Map.ashx?VERSION=1.3.0&LAYERS=vn_tinh&CRS=EPSG%3A2044&TRANSPARENT=true&FORMAT=image%2Fpng&SERVICE=WMS&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A4326&BBOX=0,-270,180,-90&WIDTH=256&HEIGHT=256

with the parametres: CRS=EPSG:2044 and SRS=EPSG:4326.

I don't know why the value of SRS is not equal to CRS?

CRS and SRS are the same?

 I'm in use of code from trunk in Sharpmap v2. And this exemple is in the demo of SharpMap.Demo.AspNet and SharpMap.Demo.SharpLayers.

Jul 28, 2010 at 9:03 AM
Edited Jul 28, 2010 at 9:05 AM

Hi thuanvh,

I haven't had a chance to test thoroughly, but I suspect that it is due to changes in the OpenLayers library itself - by the look of it they have changed the logic for WmsVersion >= 1.3. If you use the tagged version of SharpLayers (OL2.8) I would expect you to see different behaviour.

The trunk version is basically pegged to the trunk of OpenLayers (though it hasn't had any work to update/ bugfix since OL2.8), the tagged version is pegged against OpenLayers 2.8.

BTW I unfortunately had to make edits to the tagged version - while I tried to make sure I updated the trunk accordingly it is possible that there is still more recent code in the tag.

hth jd
Jul 28, 2010 at 11:01 AM
Edited Jul 28, 2010 at 11:02 AM

Hi jd.

I fixed this error.

I set simplement the value of Projection = "EPSG:2044". So SRS and CRS have the same value.

<BuilderParams Projection="EPSG:2044" Attribution="Newgrove &copy; 2008" Visibility="true" Units ="degrees"


DisplayInLayerSwitcher="true" IsBaseLayer="true" WrapDateLine="true">

Jul 28, 2010 at 12:52 PM
Glad you are looking at SharpLayers, I am not really sure how many people have really played with it :)