Merge pull request #1804 from fredj/box-text

Fix ol.render.Box text
This commit is contained in:
Frédéric Junod
2014-03-05 13:58:05 +01:00
4 changed files with 4 additions and 6 deletions

View File

@@ -357,8 +357,7 @@ ol.format.TopoJSON.transformArc_ = function(arc, scale, translate) {
* @param {Array.<number>} 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];
};

View File

@@ -84,8 +84,7 @@ ol.proj.EPSG3857.PROJECTIONS = goog.array.map(
* @param {number=} opt_dimension Dimension (default is `2`).
* @return {Array.<number>} 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;

View File

@@ -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;
};

View File

@@ -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);
});
};