On Jul 15, 2010, at 19:39 , David Winslow wrote: > On 07/14/2010 10:22 AM, David Winslow wrote: >> <snip/> >> >>> For the sake of simplicity, I'm in favor of going with center+zoom, but I'm >>> willing to make the necessary changes to gxp.Viewer if extent should also >>> be supported. >>> >>> Regards, >>> Andreas. >>> >>> >> Okay, let's stick with center+zoom. I'll try and move around the >> appropriate bits in time for this week's deployment/migration. >> >> -- >> David Winslow >> OpenGeo - http://opengeo.org/ >> > Ah. The new configuration structure also adds a few other details about > the projection: > > "units":"m", > "maxResolution":156543.0339, > "maxExtent":[-20037508.34,-20037508.34,20037508.34,20037508.34], > > Are these things we could/should store as part of the configuration, or > should they be computed/looked up somehow based on projection?
Ah right, had forgotten about these. How we proceed with them depends on the GWC integration, especially the grid origin, because it relates to the maxExtent. Since we don't rely on a base layer that determines these properties for the map, I'd propose the following: We should look up these properties based on the projection. In the EPSG database, there is an extent for every projection. We can use this as maxExtent. The units can also be taken from the EPSG database. And the maxResolution is just the maximum distance from the left to the right edge of the max extent divided by 256. In the future, when the user creates a new map, we will have to ask her for the target projection of the map. Then the new map (/maps/new) will have to be created with the appropriate values for the selected projection. Makes sense? -Andreas.
