From d5bd49d86b83e82e224e42c4b7cf53d4abce6d60 Mon Sep 17 00:00:00 2001 From: Tom Payne Date: Mon, 13 Aug 2012 16:41:52 +0200 Subject: [PATCH] Use ol.control.MousePosition in demo --- demos/side-by-side/index.html.in | 3 +++ demos/side-by-side/side-by-side.js | 12 ++++++++++++ 2 files changed, 15 insertions(+) diff --git a/demos/side-by-side/index.html.in b/demos/side-by-side/index.html.in index 179592c67f..38b77955dd 100644 --- a/demos/side-by-side/index.html.in +++ b/demos/side-by-side/index.html.in @@ -21,6 +21,9 @@
+ +
+
diff --git a/demos/side-by-side/side-by-side.js b/demos/side-by-side/side-by-side.js index c5cd067739..15643b8f55 100644 --- a/demos/side-by-side/side-by-side.js +++ b/demos/side-by-side/side-by-side.js @@ -1,5 +1,7 @@ +goog.require('ol.CoordinateFormat'); goog.require('ol.RendererHint'); goog.require('ol.control.Attribution'); +goog.require('ol.control.MousePosition'); goog.require('ol.createMap'); goog.require('ol.interaction.Keyboard'); goog.require('ol.layer.MapQuestOpenAerial'); @@ -32,6 +34,16 @@ var attributionControl = new ol.control.Attribution(domMap); document.getElementById('attribution').appendChild( attributionControl.getElement()); +var domMousePositionControl = new ol.control.MousePosition(domMap, + ol.Projection.getFromCode('EPSG:4326'), ol.CoordinateFormat.hdms, ' '); +document.getElementById('domMousePosition').appendChild( + domMousePositionControl.getElement()); + +var webglMousePositionControl = new ol.control.MousePosition(webglMap, + ol.Projection.getFromCode('EPSG:4326'), ol.CoordinateFormat.hdms, ' '); +document.getElementById('webglMousePosition').appendChild( + webglMousePositionControl.getElement()); + var keyboardInteraction = new ol.interaction.Keyboard(); keyboardInteraction.addCallback('0', function() { layer.setBrightness(0);