[OpenLayers-Dev] projection API for Map
Bart van den Eijnden
bartvde at opengeo.org
Wed Mar 14 04:20:13 EDT 2012
Hey,
our API docs for Map state that projection is always a string, but it can also be a Projection object [1].
/**
* APIProperty: projection
* {String} Set in the map options to override the default projection
* string this map. When using a projection other than EPSG:4326
* (CRS:84, Geographic) or EPSG:3857 (EPSG:900913, Web Mercator),
* also set maxExtent and maxResolution. Default is "EPSG:4326".
*/
projection: "EPSG:4326",
So there are several options to fix this:
A) make projection just a property, and not an API property, and have people use getProjection or getProjectionObject API methods instead
B) update the API docs for projection stating that it can be a string or an OpenLayers.Projection object.
Thoughts?
[1]
var projCode = this.projection instanceof OpenLayers.Projection ?
this.projection.projCode : this.projection;
Best regards,
Bart
--
Bart van den Eijnden
OpenGeo - http://opengeo.org
Expert service straight from the developers.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20120314/c2afe360/attachment-0001.html
More information about the Dev
mailing list