@extendz/extendz-openlayer
Version:
Extend UI Platform built on Angular Material
33 lines • 1.55 kB
JavaScript
/**
* Copyright 2018 the original author or authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import * as tslib_1 from "tslib";
import { OpenLayerTool } from "./open-layer-tool";
var PolygonTool = /** @class */ (function (_super) {
tslib_1.__extends(PolygonTool, _super);
function PolygonTool() {
return _super !== null && _super.apply(this, arguments) || this;
}
PolygonTool.prototype.createNewDraw = function (color) {
this.source = _super.prototype.getSource.call(this);
this.style = _super.prototype.getStyle.call(this, color);
this.vector = _super.prototype.getVectorLayer.call(this, this.source, color);
this.draw = _super.prototype.createDraw.call(this, this.source, this.style, this.feature, 1000, 'Polygon');
return { source: this.source, vector: this.vector, style: this.style, draw: this.draw };
};
return PolygonTool;
}(OpenLayerTool));
export { PolygonTool };
//# sourceMappingURL=open-layer-polygon-tool.js.map