Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a problem with displaying map with WMS layer in Openlayers. I'm able to display it but the image of the map is not sharp especially at higher zooms.

I have a documentation from the map provider and below is part of description: The data scale set is:

1:20 mil., 1:6 200 000, 1:3 000 000, 1:1mil., 1:500 000, 1:200 000, 1:75 000, 1:25 000, 1:12 500 , 1:6 250

For the best quality of displayed data while zooming is recommended to count with recalculation 96dpi/200dpi (Map DPI = 200), it means 0,48 x default scale set.

I'm not sure if this DPI setting that is wrong in my code. I found out that Openlayers standard DPI is 72 DPI.

Can you suggest anything how can I fix it?

WMS getcapabilities:

<LatLonBoundingBox minx="-8.060897" miny="32.143274" maxx="56.352488" maxy="66.324824"/>
<BoundingBox SRS="EPSG:32633" minx="-1700000" miny="3800000" maxx="2300000" maxy="8000000"/>

My code:

<!DOCTYPE html>
    <title>WMS map</title>
    <script src=""></script>

<script type='text/javascript'> 

var map; function init() {

   var mapoptions = {
      maxExtent: new OpenLayers.Bounds(-1700000, 3800000, 2300000, 8000000),
      scale: [20000000, 6200000, 3000000, 1000000, 500000, 200000, 75000, 
      25000, 12500, 6250],
      maxResolution: "auto",
      projection: "EPSG:32633",
      displayProjection: new OpenLayers.Projection("EPSG:32633")

    map = new OpenLayers.Map( 'map',mapoptions );

   var wms = new OpenLayers.Layer.WMS( "layer_name" ,'', 
   {layers: 'layer_name',
   format: "image/png"}, 
if(!map.getCenter()){ map.zoomToMaxExtent(); } } 

<body onload='init();'>
    <div id='map' style='width: 1000px; height: 1000px;'>
share|improve this question

This article should help you Configuring ZoomLevels in OpenLayers

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.