Add typecasts so examples compile

This commit is contained in:
Tom Payne
2013-12-13 19:16:05 +01:00
parent 59779bdcc5
commit e96d56215b
2 changed files with 4 additions and 3 deletions

View File

@@ -57,9 +57,10 @@ brightness.bindTo('value', layer, 'brightness')
var rotation = new ol.dom.Input(document.getElementById('rotation')); var rotation = new ol.dom.Input(document.getElementById('rotation'));
rotation.bindTo('value', map.getView(), 'rotation') rotation.bindTo('value', /** @type {ol.View2D} */ (map.getView()), 'rotation')
.transform(parseFloat, String); .transform(parseFloat, String);
var resolution = new ol.dom.Input(document.getElementById('resolution')); var resolution = new ol.dom.Input(document.getElementById('resolution'));
resolution.bindTo('value', map.getView(), 'resolution') resolution.bindTo('value',
/** @type {ol.View2D} */ (map.getView()), 'resolution')
.transform(parseFloat, String); .transform(parseFloat, String);

View File

@@ -24,7 +24,7 @@ var map = new ol.Map({
}); });
var geolocation = new ol.Geolocation(); var geolocation = new ol.Geolocation();
geolocation.bindTo('projection', map.getView()); geolocation.bindTo('projection', /** @type {ol.View2D} */ (map.getView()));
var track = new ol.dom.Input(document.getElementById('track')); var track = new ol.dom.Input(document.getElementById('track'));
track.bindTo('checked', geolocation, 'tracking'); track.bindTo('checked', geolocation, 'tracking');