From 08d6e060fa7f1a8761937a0907ca640a93f50a66 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Wed, 5 Mar 2014 10:33:07 +0100 Subject: [PATCH 1/2] Fix coding style --- src/ol/format/topojsonformat.js | 3 +-- src/ol/proj/epsg3857projection.js | 3 +-- src/ol/proj/epsg4326projection.js | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/ol/format/topojsonformat.js b/src/ol/format/topojsonformat.js index 0c660b3b19..3095cf7078 100644 --- a/src/ol/format/topojsonformat.js +++ b/src/ol/format/topojsonformat.js @@ -357,8 +357,7 @@ ol.format.TopoJSON.transformArc_ = function(arc, scale, translate) { * @param {Array.} translate Translation for each dimension. * @private */ -ol.format.TopoJSON.transformVertex_ = function(vertex, scale, - translate) { +ol.format.TopoJSON.transformVertex_ = function(vertex, scale, translate) { vertex[0] = vertex[0] * scale[0] + translate[0]; vertex[1] = vertex[1] * scale[1] + translate[1]; }; diff --git a/src/ol/proj/epsg3857projection.js b/src/ol/proj/epsg3857projection.js index 34accca595..1137e4a343 100644 --- a/src/ol/proj/epsg3857projection.js +++ b/src/ol/proj/epsg3857projection.js @@ -84,8 +84,7 @@ ol.proj.EPSG3857.PROJECTIONS = goog.array.map( * @param {number=} opt_dimension Dimension (default is `2`). * @return {Array.} Output array of coordinate values. */ -ol.proj.EPSG3857.fromEPSG4326 = function( - input, opt_output, opt_dimension) { +ol.proj.EPSG3857.fromEPSG4326 = function(input, opt_output, opt_dimension) { var length = input.length, dimension = opt_dimension > 1 ? opt_dimension : 2, output = opt_output; diff --git a/src/ol/proj/epsg4326projection.js b/src/ol/proj/epsg4326projection.js index ab57400178..3f291ef5f1 100644 --- a/src/ol/proj/epsg4326projection.js +++ b/src/ol/proj/epsg4326projection.js @@ -53,7 +53,6 @@ ol.proj.EPSG4326.PROJECTIONS = [ /** * @inheritDoc */ -ol.proj.EPSG4326.prototype.getPointResolution = - function(resolution, point) { +ol.proj.EPSG4326.prototype.getPointResolution = function(resolution, point) { return resolution; }; From db01363c10e395fb18d62ae9fd7aa8fb6cb68820 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Wed, 5 Mar 2014 10:33:34 +0100 Subject: [PATCH 2/2] Set text style in ol.render.Box --- src/ol/render/box.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ol/render/box.js b/src/ol/render/box.js index d076b955ef..87a1ec7d83 100644 --- a/src/ol/render/box.js +++ b/src/ol/render/box.js @@ -102,6 +102,7 @@ ol.render.Box.prototype.handleMapPostCompose_ = function(event) { // use drawAsync(Infinity) to draw above everything event.vectorContext.drawAsync(Infinity, function(render) { render.setFillStrokeStyle(style.getFill(), style.getStroke()); + render.setTextStyle(style.getText()); render.drawPolygonGeometry(geometry, null); }); };