Update demos to use new controls system

This commit is contained in:
Tom Payne
2012-09-28 12:53:44 +02:00
parent e2e983728e
commit a46e251eb2
3 changed files with 17 additions and 26 deletions

View File

@@ -31,6 +31,10 @@ var webglMap = new ol.Map(document.getElementById('webglMap'), {
zoom: 5
});
webglMap.getControls().push(new ol.control.Attribution({
target: document.getElementById('attribution')
}));
var domMap = new ol.Map(document.getElementById('domMap'), {
renderer: ol.RendererHint.DOM
});
@@ -38,8 +42,3 @@ domMap.bindTo('center', webglMap);
domMap.bindTo('layers', webglMap);
domMap.bindTo('resolution', webglMap);
domMap.bindTo('rotation', webglMap);
var attributionControl = new ol.control.Attribution({
map: webglMap,
target: document.getElementById('attribution')
});