Could anyone explain the strategy OpenLayers take to determine the layer's projection?
For example, if I didn't explicitly specify any projection for a marker layer, what projection would the layer take?
If you don't specify a projection the projection will be null (undefined) - when the layer is added to the map it will inherit the map's projection.
This is easily verified with the following code:
aLayer = new OpenLayers.Layer.Markers(); alert("Projection : " + aLayer.projection); // Projection: null map.addLayer(aLayer); alert("Projection after adding to map: " + aLayer.projection); // Projection: EPSG: 900913