CSVLayer.js
3 KB
// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See https://js.arcgis.com/4.6/esri/copyright.txt for details.
//>>built
define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators dojo/_base/lang ../core/urlUtils ./FeatureLayer ./graphics/sources/CSVSource".split(" "),function(l,m,g,c,b,h,e,k,d){return function(f){function a(a,b){a=f.call(this)||this;a.fields=null;a.delimiter=null;a.locationType="coordinates";a.latitudeField=null;a.longitudeField=null;a.outFields=["*"];a.operationalLayerType="CSV";a.source=null;a.type="csv";return a}g(a,f);a.prototype.normalizeCtorArgs=
function(a,b){return"string"===typeof a?h.mixin({},{url:a},b):a};Object.defineProperty(a.prototype,"hasService",{get:function(){return!1},enumerable:!0,configurable:!0});a.prototype.readWebMapLabelsVisible=function(a,b){return null!=b.showLabels?b.showLabels:!!(b.layerDefinition&&b.layerDefinition.drawingInfo&&b.layerDefinition.drawingInfo.labelingInfo)};Object.defineProperty(a.prototype,"url",{set:function(a){this._set("url",a)},enumerable:!0,configurable:!0});a.prototype.readUrl=function(a,b,c){return e.read(a,
c)};a.prototype.writeUrl=function(a,b,c,d){a=e.write(a,d);b.url=a?e.normalize(a):a};a.prototype.createGraphicsSource=function(){this._set("source",new d({url:this.url,delimiter:this.delimiter,latitudeField:this.latitudeField,longitudeField:this.longitudeField,fields:this.fields}));return this.source.when()};a.prototype._verifyFields=function(){};a.prototype._verifySource=function(){};a.prototype._hasMemorySource=function(){return!0};c([b.property({json:{read:{source:"layerDefinition.fields"}}})],
a.prototype,"fields",void 0);c([b.property({type:String,json:{write:{target:"columnDelimiter"},read:{source:"columnDelimiter"}}})],a.prototype,"delimiter",void 0);c([b.property({readOnly:!0})],a.prototype,"hasService",null);c([b.property({type:String,json:{write:{target:"locationInfo.locationType"},read:{source:"locationInfo.locationType"}}})],a.prototype,"locationType",void 0);c([b.property({type:String,json:{write:{target:"locationInfo.latitudeFieldName"},read:{source:"locationInfo.latitudeFieldName"}}})],
a.prototype,"latitudeField",void 0);c([b.property({type:String,json:{write:{target:"locationInfo.longitudeFieldName"},read:{source:"locationInfo.longitudeFieldName"}}})],a.prototype,"longitudeField",void 0);c([b.property()],a.prototype,"outFields",void 0);c([b.property()],a.prototype,"operationalLayerType",void 0);c([b.reader("web-map","labelsVisible",["layerDefinition.drawingInfo.labelingInfo","showLabels"])],a.prototype,"readWebMapLabelsVisible",null);c([b.property({json:{read:!1},cast:null,type:d,
readOnly:!0})],a.prototype,"source",void 0);c([b.property({json:{read:!1},value:"csv",readOnly:!0})],a.prototype,"type",void 0);c([b.property({json:{write:!0}})],a.prototype,"url",null);c([b.reader("url")],a.prototype,"readUrl",null);c([b.writer("url")],a.prototype,"writeUrl",null);return a=c([b.subclass("esri.layers.CSVLayer")],a)}(b.declared(k))});