Add view abstraction

This commit is contained in:
Éric Lemoine
2013-01-04 17:07:20 +01:00
parent 21331d1065
commit 927cffb2b7
34 changed files with 934 additions and 690 deletions
+5 -2
View File
@@ -5,6 +5,7 @@ goog.require('ol.Collection');
goog.require('ol.Coordinate');
goog.require('ol.Map');
goog.require('ol.Projection');
goog.require('ol.View2D');
goog.require('ol.source.TiledWMS');
@@ -50,12 +51,14 @@ var layers = new ol.Collection([
]);
var map = new ol.Map({
center: new ol.Coordinate(660000, 190000),
projection: epsg21781,
// By setting userProjection to the same as projection, we do not need
// proj4js because we do not need any transforms.
userProjection: epsg21781,
layers: layers,
target: 'map',
zoom: 9
view: new ol.View2D({
center: new ol.Coordinate(660000, 190000),
zoom: 9
})
});