Rework examples to new API

This commit is contained in:
Tim Schaub
2015-04-05 18:51:55 +02:00
parent e1079ab9a3
commit 814fb078cf
7 changed files with 54 additions and 48 deletions

View File

@@ -2,7 +2,6 @@ goog.require('ol.Map');
goog.require('ol.View');
goog.require('ol.control');
goog.require('ol.control.ScaleLine');
goog.require('ol.dom.Input');
goog.require('ol.layer.Tile');
goog.require('ol.source.OSM');
@@ -31,5 +30,8 @@ var map = new ol.Map({
});
var unitsSelect = new ol.dom.Input(document.getElementById('units'));
unitsSelect.bindTo('value', scaleLineControl, 'units');
var unitsSelect = $('#units');
unitsSelect.on('change', function() {
scaleLineControl.setUnits(this.value);
});
unitsSelect.val(scaleLineControl.getUnits());