[OpenLayers-Users] Openlayers map WMS stretched by latitude

qacer qacer8 at gmail.com
Sun Feb 16 02:52:57 PST 2014


Thanks, it works, but it helped me only with half of "problem":
Without any display settings, it is displayed like this:
http://postimg.org/image/czs81gzwj/
When I used:

var ol_cz = new OpenLayers.Layer.WMS(
    "Czech",
   
"http://geoportal.gov.cz/ArcGIS/services/CENIA/cenia_t_podklad/MapServer/WMSServer",
    {layers: "blablabla"},
 		{ projection: new OpenLayers.Projection('EPSG:3857')} 
);

it looks like this: http://postimg.org/image/vm8rkxgoz/ so exactly what I
want!
However problem is with another WMS server. When I was trying to change
projection, or displayProjection in:
var ol_wms = new OpenLayers.Layer.WMS(
    "NP Podyji WMS",
   
"http://mapy.nppodyji.cz/cgi-bin/mapserv.exe?map=f:/mapserv/projects/map/nppodyji_wms.map",
    {
       layers: "nppodyji_wms,hranice_npt,hranice_np,cyklo_CR",
       transparent: "true",
      format: "image/png"
    },
    { isBaseLayer: false, visibility: true } ,
 		{ projection: new OpenLayers.Projection('EPSG:XXX'),
	displayProjection: new OpenLayers.Projection("EPSG:XXX")
	} 
);

It has basicly no efect :/. I was trying several projections in "projection"
attribute, also in "displayProjection", but only visible output was
http://postimg.org/image/yv0oe22tf/ (note the pink square on the bottom). So
it get some parameters, but they are wrong, or maybe he server is wrong, I'm
not really sure.

The 2nd wms did not fit in the baselayer (1st WMS)



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Openlayers-map-WMS-stretched-by-latitude-tp5097957p5104041.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.


More information about the Users mailing list