Skip to content

Commit

Permalink
Merge pull request openlayers#1105 from twpayne/example-fixes
Browse files Browse the repository at this point in the history
Example type-related fixes
  • Loading branch information
twpayne committed Oct 9, 2013
2 parents f302fee + 1a000c3 commit 7be9087
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
12 changes: 6 additions & 6 deletions examples/animation.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ var panToLondon = document.getElementById('pan-to-london');
panToLondon.addEventListener('click', function() {
var pan = ol.animation.pan({
duration: 2000,
source: view.getCenter()
source: /** @type {ol.Coordinate} */ (view.getCenter())
});
map.beforeRender(pan);
view.setCenter(london);
Expand All @@ -66,7 +66,7 @@ elasticToMoscow.addEventListener('click', function() {
var pan = ol.animation.pan({
duration: 2000,
easing: ol.easing.elastic,
source: view.getCenter()
source: /** @type {ol.Coordinate} */ (view.getCenter())
});
map.beforeRender(pan);
view.setCenter(moscow);
Expand All @@ -77,7 +77,7 @@ bounceToIstanbul.addEventListener('click', function() {
var pan = ol.animation.pan({
duration: 2000,
easing: ol.easing.bounce,
source: view.getCenter()
source: /** @type {ol.Coordinate} */ (view.getCenter())
});
map.beforeRender(pan);
view.setCenter(istanbul);
Expand All @@ -89,7 +89,7 @@ spinToRome.addEventListener('click', function() {
var start = +new Date();
var pan = ol.animation.pan({
duration: duration,
source: view.getCenter(),
source: /** @type {ol.Coordinate} */ (view.getCenter()),
start: start
});
var rotate = ol.animation.rotate({
Expand All @@ -107,7 +107,7 @@ flyToBern.addEventListener('click', function() {
var start = +new Date();
var pan = ol.animation.pan({
duration: duration,
source: view.getCenter(),
source: /** @type {ol.Coordinate} */ (view.getCenter()),
start: start
});
var bounce = ol.animation.bounce({
Expand All @@ -125,7 +125,7 @@ spiralToMadrid.addEventListener('click', function() {
var start = +new Date();
var pan = ol.animation.pan({
duration: duration,
source: view.getCenter(),
source: /** @type {ol.Coordinate} */ (view.getCenter()),
start: start
});
var bounce = ol.animation.bounce({
Expand Down
3 changes: 2 additions & 1 deletion examples/mouse-position.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ projectionSelect.on('change:value', function() {

var precisionInput = new ol.dom.Input(document.getElementById('precision'));
precisionInput.on('change:value', function() {
var format = ol.coordinate.createStringXY(precisionInput.getValue());
var precision = /** @type {number} */ (precisionInput.getValueAsNumber());
var format = ol.coordinate.createStringXY(precision);
mousePositionControl.setCoordinateFormat(format);
});
7 changes: 4 additions & 3 deletions examples/wmts-ign.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,10 @@ xhr.onload = function() {
}

var view = new ol.View2D();
view.fitExtent([
257596.65942095537, 6250898.984085131,
262082.55751844167, 6251854.446938695], map.getSize());
view.fitExtent(
[257596.65942095537, 6250898.984085131,
262082.55751844167, 6251854.446938695],
/** @type {ol.Size} */ (map.getSize()));
map.setView(view);
}
};
Expand Down

0 comments on commit 7be9087

Please sign in to comment.