UNPKG

igniteui-react-core

Version:
116 lines (115 loc) 3.75 kB
import { ShapefileRecord as ShapefileRecord_internal } from "./ShapefileRecord"; import { fromRect, toRect } from './componentUtil'; /** * Represents a record of data from a Shapefile (.shp and .dbf). */ var IgrShapefileRecord = /** @class */ /*@__PURE__*/ (function () { function IgrShapefileRecord() { this._implementation = this.createImplementation(); this._implementation.externalObject = this; this.onImplementationCreated(); } IgrShapefileRecord.prototype.createImplementation = function () { return new ShapefileRecord_internal(); }; Object.defineProperty(IgrShapefileRecord.prototype, "i", { get: function () { return this._implementation; }, enumerable: false, configurable: true }); IgrShapefileRecord.prototype.onImplementationCreated = function () { }; IgrShapefileRecord.prototype._provideImplementation = function (i) { this._implementation = i; this._implementation.externalObject = this; this.onImplementationCreated(); }; Object.defineProperty(IgrShapefileRecord.prototype, "shapeType", { /** * Gets the shape type, as read from the header of the Shapefile. */ get: function () { return this.i.shapeType; }, enumerable: false, configurable: true }); Object.defineProperty(IgrShapefileRecord.prototype, "fieldsNames", { /** * Gets an array of field names and values for this record */ get: function () { return this.i.fieldsNames._inner; }, enumerable: false, configurable: true }); Object.defineProperty(IgrShapefileRecord.prototype, "fieldsTypes", { /** * Gets an arry of field types and values for this record */ get: function () { return this.i.fieldsTypes._inner; }, enumerable: false, configurable: true }); Object.defineProperty(IgrShapefileRecord.prototype, "points", { /** * Gets an array of arrays of points for this record */ get: function () { var ret = []; var list = this.i.points; for (var i = 0; i < list.count; i++) { var innerlist = list.item(i); ret.push(list.item(i)._inner); } return ret; }, enumerable: false, configurable: true }); Object.defineProperty(IgrShapefileRecord.prototype, "fieldValues", { get: function () { return this.i.fieldValues; }, set: function (v) { this.i.fieldValues = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrShapefileRecord.prototype, "bounds", { /** * Gets the bounds for the shapes */ get: function () { return fromRect(this.i.bounds); }, set: function (v) { this.i.bounds = toRect(v); }, enumerable: false, configurable: true }); IgrShapefileRecord.prototype.findByName = function (name) { if (this.findEphemera) { if (name && name.indexOf("@@e:") == 0) { return this.findEphemera(name); } } return null; }; IgrShapefileRecord.prototype.getFieldValue = function (fieldName) { var iv = this.i.getFieldValue(fieldName); return (iv); }; IgrShapefileRecord.prototype.setFieldValue = function (fieldName, value) { this.i.setFieldValue(fieldName, value); }; return IgrShapefileRecord; }()); export { IgrShapefileRecord };