Sounds good to me!<br><br>Just a consideration here... is there any way to easily limit the maxExtent of commercial coverage? Because I can see the zoom levels and the max/min resolutions... but this does not limit the coverage, just the scale of the &#39;
<span style="font-style: italic;">entire earth</span>&#39;*. I know that people would really need to pick a maxExtent that is relative to the 900913 grid.&nbsp; I&#39;m sure calculating this is most certainly possible, just wondering if this option could be addressed with the proposed API in the future. I think it can, but I&#39;d like the clarification of others.
<br><br>--AH<br><br><br><div><span class="gmail_quote">On 9/1/07, <b class="gmail_sendername">Christopher Schmidt</b> &lt;<a href="mailto:crschmidt@metacarta.com">crschmidt@metacarta.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Fri, Aug 31, 2007 at 08:18:50PM -0000, OpenLayers wrote:<br>&gt; #686: Treat Google Layer as projected data<br><br>&gt;&nbsp;&nbsp;I don&#39;t know how much testing we want to do on this, but I&#39;m tapped out on<br>&gt;&nbsp;&nbsp;it: for now, marking review just to garner comments from anyone interested
<br>&gt;&nbsp;&nbsp;in the code. This is just a diff between<br>&gt;&nbsp;&nbsp;<a href="http://dev.openlayers.org/sandbox/tschaub/google/">http://dev.openlayers.org/sandbox/tschaub/google/</a> and trunk -- The code<br>&gt;&nbsp;&nbsp;can be checked out from:
<br>&gt;<br>&gt;&nbsp;&nbsp;<a href="http://svn.openlayers.org/sandbox/tschaub/google/">http://svn.openlayers.org/sandbox/tschaub/google/</a><br>&gt;<br>&gt;&nbsp;&nbsp;and the way you use it is to set:<br>&gt;<br>&gt;&nbsp;&nbsp;sphericalMercator: true
<br>&gt;<br>&gt;&nbsp;&nbsp;as an option on the layer.<br>&gt;<br>&gt;&nbsp;&nbsp;I think this is going to be the final API: the GoogleMercator layer is<br>&gt;&nbsp;&nbsp;going to go away, and it&#39;s just going to be an option on the layer.<br><br>
Essentially, this is probably now API complete:<br> * You create your map with a maxExtent in spherical-mercator projected<br>&nbsp;&nbsp; meters.<br> * You add a Commercial base layer to that map with the<br>&nbsp;&nbsp; &#39;sphericalMercator&#39;: true option set.
<br> * You add overlays to that map.<br><br>This means that your overlays must support EPSG:900913 (or you can<br>override it after creating your layer if they support it via some other<br>number) -- the proj4/WKT is in the 
SphericalMercator.js file (which will<br>also show in the docs once this is in trunk).<br><br>The canonical example is:<br><br><a href="http://dev.openlayers.org/sandbox/tschaub/google/examples/spherical-mercator.html">http://dev.openlayers.org/sandbox/tschaub/google/examples/spherical-mercator.html
</a><br><br>Tim&#39;s put together a number of different layers here, demonstrating the<br>functionality of the layer with a TileCache-powered WMS overlay, to<br>demonstrate that yes, Virginia, there really is a Google layer you can
<br>lay TileCache down on top of.<br><br>Now is the time for API complaints -- and also the time for tests, if<br>you want to write them. Things which could use testing:<br> * In the test_SphericalMercator.html file, add functions for
<br>&nbsp;&nbsp; initialization of each:<br>&nbsp;&nbsp;&nbsp;&nbsp;* Google<br>&nbsp;&nbsp;&nbsp;&nbsp;* VirtualEarth<br>&nbsp;&nbsp;&nbsp;&nbsp;* Yahoo<br>&nbsp;&nbsp; and ensure that:<br>&nbsp;&nbsp;&nbsp;&nbsp;* If sphericalMercator is set, they have inverse/forward proj<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;functions<br>&nbsp;&nbsp;&nbsp;&nbsp;* RESOLUTIONS is set to appropriate values if sphericalMercator is
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;set<br>&nbsp;&nbsp;&nbsp;&nbsp;* If sphericalMercator is not set, those layers dont have the<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;inverse/forward projection functions<br>&nbsp;&nbsp;&nbsp;&nbsp;* if sphericalMercator is not set, units aren&#39;t touched<br> * Create a test in SphericalMercator.html
 for checking tha<br>&nbsp;&nbsp; initMercatorParameters sets the proper units, and resolutions&nbsp;&nbsp;based<br>&nbsp;&nbsp; on MIN_ZOOM_LEVEL and MAX_ZOOM_LEVEL.<br><br>If you&#39;ve got a sandbox account, feel free to commit tests directly into<br>
the sandbox.<br><br>Questions? Comments? Complaints?<br><br>Regards,<br>--<br>Christopher Schmidt<br>MetaCarta<br>_______________________________________________<br>Dev mailing list<br><a href="mailto:Dev@openlayers.org">
Dev@openlayers.org</a><br><a href="http://openlayers.org/mailman/listinfo/dev">http://openlayers.org/mailman/listinfo/dev</a><br></blockquote></div><br>