Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 7 down vote accepted

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
alert("Projection after adding to map: " + aLayer.projection);  // Projection: EPSG: 900913
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.