Fold ol.CoordinateFormat into ol.Coordinate

This commit is contained in:
Tom Payne
2012-10-18 14:18:52 +02:00
parent 860b4407b7
commit ee1d1fa3e7
5 changed files with 70 additions and 65 deletions

View File

@@ -3,7 +3,6 @@ goog.require('goog.debug.Logger');
goog.require('goog.debug.Logger.Level');
goog.require('ol.Collection');
goog.require('ol.Coordinate');
goog.require('ol.CoordinateFormat');
goog.require('ol.Map');
goog.require('ol.overlay.Overlay');
goog.require('ol.source.MapQuestOpenAerial');
@@ -42,7 +41,7 @@ map.addEventListener('click', function(evt) {
var coordinate = evt.getCoordinate();
popup.getElement().innerHTML =
'Welcome to ol3. The location you clicked was<br>' +
ol.CoordinateFormat.hdms(ol.Projection.transformWithCodes(
ol.Coordinate.toStringHDMS(ol.Projection.transformWithCodes(
coordinate, 'EPSG:3857', 'EPSG:4326'));
popup.setCoordinate(coordinate);
});

View File

@@ -1,7 +1,7 @@
goog.require('goog.debug.Console');
goog.require('goog.debug.Logger');
goog.require('goog.debug.Logger.Level');
goog.require('ol.CoordinateFormat');
goog.require('ol.Coordinate');
goog.require('ol.Map');
goog.require('ol.RendererHint');
goog.require('ol.control.MousePosition');
@@ -29,7 +29,7 @@ var domMap = new ol.Map({
});
domMap.getControls().push(new ol.control.MousePosition({
coordinateFormat: ol.CoordinateFormat.hdms,
coordinateFormat: ol.Coordinate.toStringHDMS,
projection: ol.Projection.getFromCode('EPSG:4326'),
target: document.getElementById('domMousePosition'),
undefinedHtml: '&nbsp;'
@@ -47,7 +47,7 @@ if (webglMap !== null) {
}
webglMap.getControls().push(new ol.control.MousePosition({
coordinateFormat: ol.CoordinateFormat.hdms,
coordinateFormat: ol.Coordinate.toStringHDMS,
projection: ol.Projection.getFromCode('EPSG:4326'),
target: document.getElementById('webglMousePosition'),
undefinedHtml: '&nbsp;'