Set default user projection to EPSG:4326
This commit is contained in:
@@ -22,6 +22,12 @@ goog.require('ol.webgl.Map');
|
|||||||
ol.DEFAULT_PROJECTION_CODE = 'EPSG:3857';
|
ol.DEFAULT_PROJECTION_CODE = 'EPSG:3857';
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @define {string} Default user projection code.
|
||||||
|
*/
|
||||||
|
ol.DEFAULT_USER_PROJECTION_CODE = 'EPSG:4326';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @define {boolean} Whether to enable DOM.
|
* @define {boolean} Whether to enable DOM.
|
||||||
*/
|
*/
|
||||||
@@ -84,6 +90,11 @@ ol.createMap = function(target, opt_values, opt_rendererHints) {
|
|||||||
ol.Projection.getFromCode(ol.DEFAULT_PROJECTION_CODE);
|
ol.Projection.getFromCode(ol.DEFAULT_PROJECTION_CODE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!goog.object.containsKey(values, ol.MapProperty.USER_PROJECTION)) {
|
||||||
|
values[ol.MapProperty.USER_PROJECTION] =
|
||||||
|
ol.Projection.getFromCode(ol.DEFAULT_USER_PROJECTION_CODE);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type {Array.<ol.RendererHint>}
|
* @type {Array.<ol.RendererHint>}
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user