[OpenLayers-Users] maxResolution change

Chris Holmes cholmes at openplans.org
Mon Jun 19 22:08:28 CDT 2006



Schuyler Erle wrote:
> * On 19-Jun-2006 at  3:14PM EDT, Chris Holmes said:
>>> * Matches the Google Maps zoom levels, making it easier to convert
>>>   Google Maps  style applications to OpenLayers.
>> Interesting.  Does it match it at the levels all the way zoomed out?  My 
>> understanding is that Gmaps uses Mercator for the first five or so zoom 
>> levels...
> 
> Well, we haven't gotten that far yet. It's an interesting
> consideration if true. I'd had the impression they used Mercator all
> the way down.
See: 
http://cfis.savagexi.com/articles/2006/05/03/google-maps-deconstructed 
for the real deal on what they're doing.

http://docs.codehaus.org/display/GEOSDOC/Google+Maps is what we've been 
doing see: 
http://dist.codehaus.org/geoserver/gmaps-geoserver_scripts/wms-gs-1_0_0.js 
for the script that works with geoserver.  On close zoom levels it 
switches to 4326

> 
>> so for getting gmaps working with GeoServer we have it request
>> EPSG:41001 (mercator) when zoomed out, and EPSG:4326 (lat/long) when
>> zoomed in.  Is openlayers doing something similar?  Or just using
>> 4326 the whole time?
> 
> That's even more interesting. Where did you get EPSG 41001 from? It
> doesn't appear in the EPSG list that ships with PROJ.4.
Yeah, it's a default in GeoServer.  It's simple mercator.  I'm not sure 
where it comes from, but I _think_ it's official epsg.  Note the 
original source of this stuff for me was: http://johndeck.blogspot.com/ 
who had some posts on the subject, though he just made up EPSG:54004 to 
put in the params to proj4/mapserver

James MacGill now of Google just joined the wms tiling list, and is very 
interested in this subject, and is going to try to dig in to what 
they're doing.  Raj is also now on that list, I'm hoping we can start up 
the conversation and get something more formal on how to divide up the 
earth and get caching.  We can likely do the same route as GeoRSS.  I'd 
really like to get Openlayers + GeoServer + Squid up soon and get it 
live and working.

Chris

> 
> The way that projections work in OL right now is as follows: By
> default, the projection used is EPSG 4326, longitude/latitude, with
> the WGS-84 ellipsoid and datum. Consequently the default maxExtent is
> (-180, -90, 180, 90).
> 
> If you want to use a different projection in OpenLayers, you need to
> provide three things to the OpenLayers.Map constructor:
> 
>     1. projection: "EPSG:2805" (or other OGC WMS compatible SRS string)
>     2. maxExtent: new OpenLayers.Bounds(minx, miny, maxx, maxy)
>     3. maxResolution: ... (which can be "null" if you want the whole
>         map always shown at zoom level 0)
> 
>     ... and optionally...
> 
>     4. maxZoomLevel: 8 (or other integer, if the default of 16 is too
>         many or not enough)
> 
> Adding support for non-WMS basemaps means that the Map class may have
> to support having the projection changed out from under it. While this
> presents little or no problem for displaying point markers -- since
> the basemap should always be able to tell us what pixel location
> matches a geographic coordinate -- but this will pose problems for
> displaying WMS overlays that don't support Mercator projection. Not
> sure what else can be done about that, though. Suggestions welcome.
> 
> SDE
> 
> !DSPAM:1003,4497131d26672081064789!
> 

-- 
Chris Holmes
The Open Planning Project
http://topp.openplans.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cholmes.vcf
Type: text/x-vcard
Size: 269 bytes
Desc: not available
Url : http://mailman-viper.python-hosting.com/pipermail/users/attachments/20060619/c04519c6/cholmes.vcf


More information about the Users mailing list