[OpenLayers-Dev] [OpenLayers-Trac] [OpenLayers] #686: Treat Google Layer as projected data

Andrew Hughes ahhughes at gmail.com
Sun Sep 2 21:23:40 EDT 2007


Sounds good to me!

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 'entire
earth'*. I know that people would really need to pick a maxExtent that is
relative to the 900913 grid.  I'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'd like the clarification of others.

--AH


On 9/1/07, Christopher Schmidt <crschmidt at metacarta.com> wrote:
>
> On Fri, Aug 31, 2007 at 08:18:50PM -0000, OpenLayers wrote:
> > #686: Treat Google Layer as projected data
>
> >  I don't know how much testing we want to do on this, but I'm tapped out
> on
> >  it: for now, marking review just to garner comments from anyone
> interested
> >  in the code. This is just a diff between
> >  http://dev.openlayers.org/sandbox/tschaub/google/ and trunk -- The code
> >  can be checked out from:
> >
> >  http://svn.openlayers.org/sandbox/tschaub/google/
> >
> >  and the way you use it is to set:
> >
> >  sphericalMercator: true
> >
> >  as an option on the layer.
> >
> >  I think this is going to be the final API: the GoogleMercator layer is
> >  going to go away, and it's just going to be an option on the layer.
>
> Essentially, this is probably now API complete:
> * You create your map with a maxExtent in spherical-mercator projected
>    meters.
> * You add a Commercial base layer to that map with the
>    'sphericalMercator': true option set.
> * You add overlays to that map.
>
> This means that your overlays must support EPSG:900913 (or you can
> override it after creating your layer if they support it via some other
> number) -- the proj4/WKT is in the SphericalMercator.js file (which will
> also show in the docs once this is in trunk).
>
> The canonical example is:
>
>
> http://dev.openlayers.org/sandbox/tschaub/google/examples/spherical-mercator.html
>
> Tim's put together a number of different layers here, demonstrating the
> functionality of the layer with a TileCache-powered WMS overlay, to
> demonstrate that yes, Virginia, there really is a Google layer you can
> lay TileCache down on top of.
>
> Now is the time for API complaints -- and also the time for tests, if
> you want to write them. Things which could use testing:
> * In the test_SphericalMercator.html file, add functions for
>    initialization of each:
>     * Google
>     * VirtualEarth
>     * Yahoo
>    and ensure that:
>     * If sphericalMercator is set, they have inverse/forward proj
>       functions
>     * RESOLUTIONS is set to appropriate values if sphericalMercator is
>       set
>     * If sphericalMercator is not set, those layers dont have the
>       inverse/forward projection functions
>     * if sphericalMercator is not set, units aren't touched
> * Create a test in SphericalMercator.html for checking tha
>    initMercatorParameters sets the proper units, and resolutions  based
>    on MIN_ZOOM_LEVEL and MAX_ZOOM_LEVEL.
>
> If you've got a sandbox account, feel free to commit tests directly into
> the sandbox.
>
> Questions? Comments? Complaints?
>
> Regards,
> --
> Christopher Schmidt
> MetaCarta
> _______________________________________________
> Dev mailing list
> Dev at openlayers.org
> http://openlayers.org/mailman/listinfo/dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20070903/c8de5067/attachment.html


More information about the Dev mailing list