<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial, helvetica, sans-serif;font-size:10pt;color:#000000;"><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; ">Hi,</div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; "><br></div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; ">Iīve been trying to set variables for the intitial state of a map and am having real problems understanding which variables affect which properties and where they should be set.</div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; "><br></div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; ">My problem lies firstly with the fact that I donīt know how to calculate the map resolution. Also what is the
 relationship between maxResolution, maxExtent, restricted extent and setting a mapcenter?</div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; "><br></div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; ">here are my qustions...</div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; "><br></div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; ">1. My baselayer is mapnik so Iīm using a spherical mercator projection. All the examples I have seen use "maxResolution: 156543.0339"...but what is that actually doing?</div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; "><br></div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; ">2. I want to restrict the extent so that users canīt pan out of my
 area of interest ...therefore I have used "restrictedExtent: new OpenLayers.Bounds(847533.769522, 6676621.545731, 1559315.376786, 7025785.890876),"</div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; "><br></div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; ">3. my maxExtent is set to "maxExtent: new OpenLayers.Bounds(-20037508, -20037508,20037508, 20037508),"..otherwise I have found my wms layer isnīt shown...but what is the real definition of this property?</div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; "><br></div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; ">4. If I want to setcenter, which of these property need to be taken away? I could see that in order the setcenter, the restrictedExtents might need to be removed..but is there a "best practice" way of
 doing these things?</div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; "><br></div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; "><br></div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; ">It would be great to get some user help, because the documentation is mostly pretty uncomprehensible for people who donīt spend all day programming openlayers.</div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; "><br></div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; ">thanks,</div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; "><br></div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; "><br></div><div style="color: rgb(0, 0, 0); font-family:
 arial, helvetica, sans-serif; font-size: 10pt; "><br></div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; ">my code...</div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; "><br></div><div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">var map = new OpenLayers.Map("map",{</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                </span>projection:epsg3857,</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; displayProjection: epsg4326,</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; units: "m",</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span
 class="Apple-tab-span" style="white-space:pre">                </span>numZoomLevels: 21,</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                </span>maxResolution: 156543.0339,</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                </span>restrictedExtent: new OpenLayers.Bounds(847533.769522, 6676621.545731, 1559315.376786, 7025785.890876),</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                </span>maxExtent: new OpenLayers.Bounds(-20037508, -20037508,20037508, 20037508),</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; controls: [new OpenLayers.Control.MouseDefaults()</font></div><div><font class="Apple-style-span"
 face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                </span>,new OpenLayers.Control.PanZoomBar()</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                </span>,new OpenLayers.Control.MousePosition()</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                </span>,new OpenLayers.Control.ScaleLine({geodesic: true})]</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; });</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">        </span>var mapnik = new
 OpenLayers.Layer.OSM();</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">        </span>map.addLayer(mapnik);</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space: pre; ">        </span>var proj = new OpenLayers.Projection("EPSG:4326");</font></div></div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; "><br></div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; "><br></div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; ">Rob</div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; "><br></div><div style="color:
 rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; "><br></div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; "><br></div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; "><br></div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; "><br></div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; "><br></div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; position: fixed; "></div>


</div></body></html>