This commit is contained in:
Éric Lemoine
2013-03-06 18:06:39 +01:00
parent bac0f304de
commit 849774dceb
153 changed files with 12810 additions and 1916 deletions
+8 -2
View File
@@ -4,6 +4,7 @@ goog.require('ol.Map');
goog.require('ol.RendererHint');
goog.require('ol.View2D');
goog.require('ol.control.ScaleLineUnits');
goog.require('ol.control.defaults');
goog.require('ol.layer.TileLayer');
goog.require('ol.projection');
goog.require('ol.source.TiledWMS');
@@ -24,11 +25,16 @@ var layers = new ol.Collection([
]);
var map = new ol.Map({
controls: ol.control.defaults({
scaleLine: true,
// FIXME The typecast here is only needed if the example is compiled
scaleLineOptions: /** @type {ol.control.ScaleLineOptions} */ ({
units: ol.control.ScaleLineUnits.DEGREES
})
}),
layers: layers,
// The OSgeo server does not set cross origin headers, so we cannot use WebGL
renderers: [ol.RendererHint.CANVAS, ol.RendererHint.DOM],
scaleLineControl: true,
scaleLineUnits: ol.control.ScaleLineUnits.DEGREES,
target: 'map',
view: new ol.View2D({
projection: ol.projection.getFromCode('EPSG:4326'),