Updating old code to current ol3 version
This commit is contained in:
@@ -85,7 +85,7 @@ ol.render.VectorContext.prototype.drawMultiPoint = function(multiPointGeometry,
|
|||||||
/**
|
/**
|
||||||
* @abstract
|
* @abstract
|
||||||
* @param {ol.geom.MultiPolygon} multiPolygonGeometry MultiPolygon geometry.
|
* @param {ol.geom.MultiPolygon} multiPolygonGeometry MultiPolygon geometry.
|
||||||
* @param {ol.Feature} feature Feature.
|
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||||
*/
|
*/
|
||||||
ol.render.VectorContext.prototype.drawMultiPolygon = function(multiPolygonGeometry, feature) {};
|
ol.render.VectorContext.prototype.drawMultiPolygon = function(multiPolygonGeometry, feature) {};
|
||||||
|
|
||||||
|
|||||||
@@ -1000,7 +1000,7 @@ ol.render.webgl.LineStringReplay.prototype.drawCoordinates_ =
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.render.webgl.LineStringReplay.prototype.drawLineStringGeometry =
|
ol.render.webgl.LineStringReplay.prototype.drawLineString =
|
||||||
function(geometry, feature) {
|
function(geometry, feature) {
|
||||||
this.drawCoordinates_(geometry.getCoordinates());
|
this.drawCoordinates_(geometry.getCoordinates());
|
||||||
};
|
};
|
||||||
@@ -1009,7 +1009,7 @@ ol.render.webgl.LineStringReplay.prototype.drawLineStringGeometry =
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.render.webgl.LineStringReplay.prototype.drawMultiLineStringGeometry =
|
ol.render.webgl.LineStringReplay.prototype.drawMultiLineString =
|
||||||
function(geometry, feature) {
|
function(geometry, feature) {
|
||||||
var coordinatess = geometry.getCoordinates();
|
var coordinatess = geometry.getCoordinates();
|
||||||
var i, ii;
|
var i, ii;
|
||||||
@@ -1187,9 +1187,9 @@ ol.render.webgl.PolygonReplay = function(tolerance, maxExtent) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* @type {ol.Color}
|
* @type {ol.Color|undefined}
|
||||||
*/
|
*/
|
||||||
this.fillColor_ = null;
|
this.fillColor_ = undefined;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1251,7 +1251,7 @@ ol.render.webgl.PolygonReplay = function(tolerance, maxExtent) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Start index per feature (the feature).
|
* Start index per feature (the feature).
|
||||||
* @type {Array.<ol.Feature>}
|
* @type {Array.<ol.Feature>|Array.<ol.render.Feature>}
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
this.startIndicesFeature_ = [];
|
this.startIndicesFeature_ = [];
|
||||||
@@ -1294,7 +1294,7 @@ ol.render.webgl.PolygonReplay.prototype.drawCoordinates_ =
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.render.webgl.PolygonReplay.prototype.drawMultiPolygonGeometry =
|
ol.render.webgl.PolygonReplay.prototype.drawMultiPolygon =
|
||||||
function(geometry, feature) {
|
function(geometry, feature) {
|
||||||
if (goog.isNull(this.fillColor_)) {
|
if (goog.isNull(this.fillColor_)) {
|
||||||
return;
|
return;
|
||||||
@@ -1312,7 +1312,7 @@ ol.render.webgl.PolygonReplay.prototype.drawMultiPolygonGeometry =
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.render.webgl.PolygonReplay.prototype.drawPolygonGeometry =
|
ol.render.webgl.PolygonReplay.prototype.drawPolygon =
|
||||||
function(polygonGeometry, feature) {
|
function(polygonGeometry, feature) {
|
||||||
if (goog.isNull(this.fillColor_)) {
|
if (goog.isNull(this.fillColor_)) {
|
||||||
return;
|
return;
|
||||||
@@ -1504,14 +1504,14 @@ ol.render.webgl.PolygonReplay.prototype.drawReplay_ =
|
|||||||
ol.render.webgl.PolygonReplay.prototype.setFillStrokeStyle =
|
ol.render.webgl.PolygonReplay.prototype.setFillStrokeStyle =
|
||||||
function(fillStyle, strokeStyle) {
|
function(fillStyle, strokeStyle) {
|
||||||
// TODO implement
|
// TODO implement
|
||||||
if (!goog.isNull(fillStyle)) {
|
if (fillStyle) {
|
||||||
var fillStyleColor = fillStyle.getColor();
|
var fillStyleColor = fillStyle.getColor();
|
||||||
this.fillColor_ = !goog.isNull(fillStyleColor) ?
|
this.fillColor_ = !goog.isNull(fillStyleColor) && Array.isArray(fillStyleColor) ?
|
||||||
ol.color.asArray(fillStyleColor).map(function(c, i) {
|
ol.color.asArray(fillStyleColor).map(function(c, i) {
|
||||||
return i != 3 ? c / 255.0 : c;
|
return i != 3 ? c / 255.0 : c;
|
||||||
}) : [0.0, 0.0, 0.0, 1.0];
|
}) : [0.0, 0.0, 0.0, 1.0];
|
||||||
} else {
|
} else {
|
||||||
this.fillColor_ = null;
|
this.fillColor_ = undefined;
|
||||||
}
|
}
|
||||||
this.lineStringReplay_.setFillStrokeStyle(fillStyle, strokeStyle);
|
this.lineStringReplay_.setFillStrokeStyle(fillStyle, strokeStyle);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user