[MapQuery] defaults on the map

Volker Mische volker.mische at gmail.com
Sat Jun 11 13:41:29 EDT 2011


On 06/11/2011 05:20 PM, Steven Ottens wrote:
> Hi all,
> 
> Playing around with map.defaults I realized that the map options pretty much directly map to the OpenLayers.Map properties. Obviously we are not going to wrap them all but there are a few we probably want to at least document; the ones which have defaults in OpenLayer that are commonly used to setup WMS/TMS/WMTS layers:
> 
> projection: "EPSG:4326",   
> units: 'degrees',
> numZoomLevels: 16,
> maxResolution: 1.40625,
> this.maxExtent = new OpenLayers.Bounds(-180, -90, 180, 90);
> 
> -projection can be mapped 1to1; proper name and sane values
> -units can be mapped 1to1; proper name and sane values
> -numZoomlevels can be mapped 1to1 decent name and sane value
> -maxResolution is not a very nice one, I propose that if it is not set we try to calculate it from maxExtent since it is a difficult concept and tends to depend on maxExtent and tilesize anyway and as such do not document this one as a public property
> -maxExtent needs to be wrapped; it currently takes a openlayers.bounds object and we most likely need the mapExtent within MapQuery for instance to calculate the maxResolution
> 
> 
> What are your thoughts?
> Steven

Hi Steven,

my only comment is: sounds good I guess with wrapping maxExtent you mean
that MapQuery will use maxExtent: [-180,-90.180,90] instead of using an
OpenLauers.Bounds object, right? That's cool.

Cheers,
  Volker


More information about the MapQuery mailing list