This commit is contained in:
Éric Lemoine
2013-03-03 20:46:05 +01:00
parent 5d14b9e2d4
commit 13db9a5038
129 changed files with 19764 additions and 3406 deletions
+8 -17
View File
@@ -1,10 +1,6 @@
goog.require('goog.debug.Console');
goog.require('goog.debug.Logger');
goog.require('goog.debug.Logger.Level');
goog.require('ol.Collection');
goog.require('ol.Coordinate');
goog.require('ol.Map');
goog.require('ol.Projection');
goog.require('ol.RendererHint');
goog.require('ol.View2D');
goog.require('ol.animation');
@@ -12,18 +8,13 @@ goog.require('ol.control.MousePosition');
goog.require('ol.easing');
goog.require('ol.interaction.Keyboard');
goog.require('ol.layer.TileLayer');
goog.require('ol.projection');
goog.require('ol.source.MapQuestOpenAerial');
if (goog.DEBUG) {
goog.debug.Console.autoInstall();
goog.debug.Logger.getLogger('ol').setLevel(goog.debug.Logger.Level.INFO);
}
var LONDON = ol.Projection.transformWithCodes(
var LONDON = ol.projection.transformWithCodes(
new ol.Coordinate(-0.12755, 51.507222), 'EPSG:4326', 'EPSG:3857');
var MOSCOW = ol.Projection.transformWithCodes(
var MOSCOW = ol.projection.transformWithCodes(
new ol.Coordinate(37.6178, 55.7517), 'EPSG:4326', 'EPSG:3857');
var layer = new ol.layer.TileLayer({
@@ -44,7 +35,7 @@ var domMap = new ol.Map({
var domMousePosition = new ol.control.MousePosition({
coordinateFormat: ol.Coordinate.toStringHDMS,
projection: ol.Projection.getFromCode('EPSG:4326'),
projection: ol.projection.getFromCode('EPSG:4326'),
target: document.getElementById('domMousePosition'),
undefinedHTML: ' '
});
@@ -61,7 +52,7 @@ if (webglMap !== null) {
var webglMousePosition = new ol.control.MousePosition({
coordinateFormat: ol.Coordinate.toStringHDMS,
projection: ol.Projection.getFromCode('EPSG:4326'),
projection: ol.projection.getFromCode('EPSG:4326'),
target: document.getElementById('webglMousePosition'),
undefinedHTML: ' '
});
@@ -78,7 +69,7 @@ if (canvasMap !== null) {
var canvasMousePosition = new ol.control.MousePosition({
coordinateFormat: ol.Coordinate.toStringHDMS,
projection: ol.Projection.getFromCode('EPSG:4326'),
projection: ol.projection.getFromCode('EPSG:4326'),
target: document.getElementById('canvasMousePosition'),
undefinedHtml: ' '
});
@@ -131,7 +122,7 @@ keyboardInteraction.addCallback('l', function() {
view.setCenter(LONDON);
});
keyboardInteraction.addCallback('L', function() {
var start = goog.now();
var start = +new Date();
var duration = 5000;
var bounce = ol.animation.bounce({
resolution: 2 * view.getResolution(),
@@ -166,7 +157,7 @@ keyboardInteraction.addCallback('m', function() {
view.setCenter(MOSCOW);
});
keyboardInteraction.addCallback('M', function() {
var start = goog.now();
var start = +new Date();
var duration = 5000;
var bounce = ol.animation.bounce({
resolution: 2 * view.getResolution(),