<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt"><div id="yiv1663947099"><div><div style="color:#000;background-color:#fff;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt;"><div id="yiv1663947099"><div id="yiv1663947099yui_3_13_0_ym1_1_1385048340202_20489"><div class="yiv1663947099yui_3_13_0_ym1_1_1385048340202_20475" id="yiv1663947099yui_3_13_0_ym1_1_1385048340202_20488" style="color:#000;background-color:#fff;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt;"><div id="yiv1663947099yui_3_13_0_ym1_7_1385048340202_18"><span id="yiv1663947099yui_3_13_0_ym1_7_1385048340202_28">Hello Arnd,</span></div><div class="yiv1663947099yui_3_13_0_ym1_1_1385048340202_20476" id="yiv1663947099yui_3_13_0_ym1_7_1385048340202_30" style="color:rgb(0, 0,
 0);font-size:16px;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;background-color:transparent;font-style:normal;"><br clear="none"><span id="yiv1663947099yui_3_13_0_ym1_7_1385048340202_28"></span></div><div class="yiv1663947099yui_3_13_0_ym1_1_1385048340202_20477" id="yiv1663947099yui_3_13_0_ym1_7_1385048340202_34" style="color:rgb(0, 0, 0);font-size:16px;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;background-color:transparent;font-style:normal;"><span id="yiv1663947099yui_3_13_0_ym1_7_1385048340202_28">Thanks very much for your help.  The OLC 210 Cache site is very helpful, as was your message. <br><br>I was able to fix my OpenLayers projection by switching to meters, and removing the resolution values I had declared.  They were calculated for degrees, not meters!  You can see from the map image I have attached that it looks much better now.<br
 clear="none"><br clear="none">You can also see from the black lines in the center and the black smear at the bottom that the graticule does not work for this projection.  It worked fine for the default projection, EPSG:4326.<br clear="none"><br>So I
 have one more question for you, if you can help.  It is about a mesage that you answered on this mailing list last year.<br clear="none"><br clear="none">From this message thread: <a rel="nofollow" shape="rect" id="yiv1663947099yui_3_13_0_ym1_1_1385048340202_21584" target="_blank" href="http://osgeo-org.1560.x6.nabble.com/Graticule-Layer-not-in-latlng-td4989063.html"><font id="yiv1663947099yui_3_13_0_ym1_8_1385048340202_21">http://osgeo-org.1560.x6.nabble.com/Graticule-Layer-not-in-latlng-td4989063.html</font></a><br clear="none">You mention that the OpenLayers Graticule control does not work correctly for projections that use units of meters.  You also mention that you needed to re-implement the <span style="font-weight: bold;">Graticule.js</span> code to use map units.  And on the http://gis.ibbeck.de/OLClient, I see that there is OpenLayers.Control.GraticuleXY().<br clear="none"><br clear="none">My question relates to the Graticule
 Demo for OpenLayers v2.13, located here:<br clear="none"><a rel="nofollow" shape="rect" id="yiv1663947099yui_3_13_0_ym1_1_1385048340202_23903" target="_blank" href="http://dev.openlayers.org/releases/OpenLayers-2.13.1/examples/graticule.html"><span id="yiv1663947099yui_3_13_0_ym1_8_1385048340202_42">http://dev.openlayers.org/releases/OpenLayers-2.13.1/examples/graticule.html</span></a><span id="yiv1663947099yui_3_13_0_ym1_8_1385048340202_48" style="text-decoration:underline;"><br clear="none"></span><a rel="nofollow" shape="rect" id="yiv1663947099yui_3_13_0_ym1_1_1385048340202_23903" target="_blank" href="http://dev.openlayers.org/releases/OpenLayers-2.13.1/examples/graticule.html"><span id="yiv1663947099yui_3_13_0_ym1_8_1385048340202_42"></span></a><br clear="none"></span></div><div id="yiv1663947099yui_3_13_0_ym1_7_1385048340202_20">If you look at the map on the right side, you can see that it uses a graticule for a polar projection.  If you look
 at the page source, you will see that the projection is defined for Proj.4 and has units of meters.  This graticule control (graticuleCtl2) is using OpenLayers.Control.Graticule().<br><br>So my question is simply, why does this demo work?  Has support for the Graticule in map units been added to OpenLayers?  It is certainly not working on my map, which uses nearly identical syntax to define the graticule control.  <br><br>In fact, if I view my map with its broken graticule and then display this demo web page, it stops working there too  :-P<br><br>Thanks again for any clues!  I really appreciate the help.<br><br>Scott<br><br></div><div id="yiv1663947099yui_3_13_0_ym1_7_1385048340202_22">--<br clear="none">Scott Chilcote<br clear="none">scottchilcote@yahoo.com<br></div><div class="yiv1663947099yqt3831795361" id="yiv1663947099yqt96392"><div class="yiv1663947099yqt1115818892" id="yiv1663947099yqt15488"><div
 class="yiv1663947099yahoo_quoted" id="yiv1663947099yui_3_13_0_ym1_7_1385048340202_24" style="display: block;"> <br clear="none"> <br clear="none"> <div class="yiv1663947099yui_3_13_0_ym1_1_1385048340202_16806 yiv1663947099yui_3_13_0_ym1_1_1385048340202_20479" id="yiv1663947099yui_3_13_0_ym1_1_1385048340202_18424" style="font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt;"> <div class="yiv1663947099yui_3_13_0_ym1_1_1385048340202_16807 yiv1663947099yui_3_13_0_ym1_1_1385048340202_20480" id="yiv1663947099yui_3_13_0_ym1_1_1385048340202_18423" style="font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt;"> <div dir="ltr" id="yiv1663947099yui_3_13_0_ym1_1_1385048340202_18425"> <font id="yiv1663947099yui_3_13_0_ym1_1_1385048340202_18426" face="Arial" size="2"> On Tuesday, November 19, 2013 4:47 PM, Arnd Wippermann <arnd.wippermann@web.de> wrote:<br
 clear="none"> </font> </div>  <div class="yiv1663947099y_msg_container" id="yiv1663947099yui_3_13_0_ym1_1_1385048340202_18422">Hi Scott,<br clear="none"><br clear="none">The maxExtent have to be set in map projections coordinates. <br clear="none">EPSG:3995 is a projection with the north pole as center and the coordinates<br clear="none">0,0. <br clear="none">The maxExtent in the OL example describe a square with the north pole in the<br clear="none">center.<br clear="none"><br clear="none">As you want your map in projection EPSG:3995, you don't need the maxExtent<br clear="none">in UTM coordinates.<br clear="none"><br clear="none">Add maxResolution: 43008.234375 ( = 5505054 / 128) to your map options and<br clear="none">zoom to maxExtent.<br clear="none"><br clear="none">See this example<br clear="none"><a rel="nofollow" shape="rect" target="_blank"
 href="http://gis.ibbeck.de/OLClient/OLClient.asp?WMC=data/wmc/epsg_3995_Arctic_pol">http://gis.ibbeck.de/OLClient/OLClient.asp?WMC=data/wmc/epsg_3995_Arctic_pol</a><br clear="none">ar.wmc.xml<br clear="none"><br clear="none">Arnd<br clear="none"><br clear="none"><br clear="none">-----Ursprüngliche Nachricht-----<br clear="none">Von: <a rel="nofollow" shape="rect" ymailto="mailto:openlayers-users-bounces@lists.osgeo.org" target="_blank" href="mailto:openlayers-users-bounces@lists.osgeo.org">openlayers-users-bounces@lists.osgeo.org</a><br clear="none">[mailto:<a rel="nofollow" shape="rect" ymailto="mailto:openlayers-users-bounces@lists.osgeo.org" target="_blank" href="mailto:openlayers-users-bounces@lists.osgeo.org">openlayers-users-bounces@lists.osgeo.org</a>] Im Auftrag von ScottCh<br clear="none">Gesendet: Dienstag, 19. November 2013 18:16<br clear="none">An: <a rel="nofollow" shape="rect" ymailto="mailto:openlayers-users@lists.osgeo.org"
 target="_blank" href="mailto:openlayers-users@lists.osgeo.org">openlayers-users@lists.osgeo.org</a><br clear="none">Betreff: [OpenLayers-Users] Problem Setting maxExtent for Polar<br clear="none">Projection(EPSG:3995)<br clear="none"><br clear="none">Hello OpenLayers Users,<br clear="none"><br clear="none">I appear to be setting the maxExtent values
 for my EPSG:3995 projection<br clear="none">incorrectly.<br clear="none"><br clear="none">According to  <a rel="nofollow" shape="rect" target="_blank" href="http://spatialreference.org/ref/epsg/3995/">http://spatialreference.org/ref/epsg/3995/</a><br clear="none"><<a rel="nofollow" shape="rect" target="_blank" href="http://spatialreference.org/ref/epsg/3995/">http://spatialreference.org/ref/epsg/3995/</a>>  , the bounds for this<br clear="none">projection in degrees are "everything north of 60 degrees north latitude" or<br clear="none">bounds -180, 60 and 180, 90.<br clear="none"><br clear="none">I used the Earth Point online calculator (<br clear="none"><a rel="nofollow" shape="rect" target="_blank" href="http://www.earthpoint.us/convert.aspx">http://www.earthpoint.us/convert.aspx</a><br clear="none"><<a rel="nofollow" shape="rect" target="_blank"
 href="http://www.earthpoint.us/convert.aspx">http://www.earthpoint.us/convert.aspx</a>>  ) to convert this to UTM.  This<br clear="none">gave me 332705mE 6655205mN and 2000000mE 2000000mN.<br clear="none"><br clear="none">Does this mean that I need to use 332705, 6655205, 2000000, 2000000 as the<br clear="none">bounds in meters?  <br clear="none"><br clear="none">This seems incorrect to me, in part because of this OpenLayers<br clear="none">implementation example:<br clear="none"><a rel="nofollow" shape="rect" target="_blank" href="http://dev.openlayers.org/releases/OpenLayers-2.13.1/examples/polar-projecti">http://dev.openlayers.org/releases/OpenLayers-2.13.1/examples/polar-projecti</a><br clear="none">ons.html<br clear="none"><<a rel="nofollow" shape="rect" target="_blank"
 href="http://dev.openlayers.org/releases/OpenLayers-2.13.1/examples/polar-project">http://dev.openlayers.org/releases/OpenLayers-2.13.1/examples/polar-project</a><br clear="none">ions.html><br clear="none">The bounds used for each polar projection it provides are -5505054,<br clear="none">-5505054, 5505054, 5505054.<br clear="none"><br clear="none">I looked up EPSG:3576 (which it uses), and it uses "everything above 45<br clear="none">degrees" for its bounds.  This suggests that my guess (to use UTM<br clear="none">conversion) is wrong.<br clear="none"><br clear="none">I decided to try using the same maxExtent values as the polar projection<br clear="none">demo.<br clear="none"><br clear="none">This gave me:<br clear="none"><br clear="none">      map0 = new OpenLayers.Map(<br clear="none">        "Map", {<br clear="none">          controls:[<br clear="none">       
     new
 OpenLayers.Control.PanZoomBarMod({zoomWorldIcon:true,<br clear="none">forceFixedZoomLevel:true}),<br clear="none">            new OpenLayers.Control.ArgParser(),<br clear="none">            new OpenLayers.Control.Navigation(),<br clear="none">            new OpenLayers.Control.Attribution()<br clear="none">          ],<br clear="none">          projection: new OpenLayers.Projection('EPSG:3995'),<br clear="none">          units: 'm',<br clear="none">          //maxExtent:new OpenLayers.Bounds(-180,60,180,90),<br clear="none">          maxExtent:new OpenLayers.Bounds(-5505054, -5505054, 5505054,<br clear="none">5505054),<br clear="none">          <br clear="none">          numZoomLevels: 7<br
 clear="none">        }<br clear="none">      );<br clear="none"><br clear="none">I show the bounds in degrees commented out as a form of documentation.  The<br clear="none">problem
 with this code is that it does not work properly.  When I display my<br clear="none">map in Firefox, it takes several seconds before showing a blank rectangle<br clear="none">for the map.  Then I get an "unresponsive script" alert box.  The map never<br clear="none">draws.  <br clear="none"><br clear="none">I have experimented with other values for the maxExtent, and the results<br clear="none">vary a lot.  If I use the degree values on the commented out line, I get a<br clear="none">map that looks like this:<br clear="none"><br clear="none"><<a rel="nofollow" shape="rect" target="_blank" href="http://osgeo-org.1560.x6.nabble.com/file/n5089954/olprojection.jpg">http://osgeo-org.1560.x6.nabble.com/file/n5089954/olprojection.jpg</a>> <br clear="none"><br clear="none">This map rendering has several problems. You can see from the edges of the<br clear="none">graticule that the extents are not set correctly.  The graticule
 is supposed<br clear="none">to be radial with the center at the north pole instead of rectangular.<br clear="none"><br clear="none">At this point I have tried several different sets of values - admittedly<br clear="none">guesses - as
 the maxExtent bounds, and the results are always similar to<br clear="none">these two situations.  Either it times out and does not draw, or it draws<br clear="none">something similar to the standard EPSG:4326 projection over my base layer<br clear="none">map.  I have looked through a lot of documentation, but haven't found enough<br clear="none">clues yet.  Can someone point me in the right direction where to find out<br clear="none">how to correctly set the maxExtent bounds for my projection?<br clear="none"><br clear="none">Thanks for your help,<br clear="none"><br clear="none">Scott C.<br clear="none"><br clear="none"><br clear="none"><br clear="none"><br clear="none">--<br clear="none">View this message in context:<br clear="none"><a rel="nofollow" shape="rect" target="_blank"
 href="http://osgeo-org.1560.x6.nabble.com/Problem-Setting-maxExtent-for-Polar-Proj">http://osgeo-org.1560.x6.nabble.com/Problem-Setting-maxExtent-for-Polar-Proj</a><br clear="none">ection-EPSG-3995-tp5089954.html<br clear="none">Sent from the OpenLayers Users mailing list archive at Nabble.com.<br clear="none">_______________________________________________<br clear="none">Users mailing list<br clear="none"><a rel="nofollow" shape="rect" ymailto="mailto:Users@lists.osgeo.org" target="_blank" href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a><br clear="none"><a rel="nofollow" shape="rect" target="_blank" href="http://lists.osgeo.org/mailman/listinfo/openlayers-users">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a><br clear="none"><br clear="none"><br clear="none"></div>  </div> </div>  </div></div></div> </div></div></div></div></div></div></div></body></html>