Documentation for MapLib/Feature.swift¶
- class Feature¶
Feature or row from featureclass or table.
- func isFieldSet(index: Int32) Bool ¶
Check if field set.
- Parameters
index – Field index.
- Returns
True if field set.
- func getField(asInteger index:Int32) Int32 ¶
Get field value.
- Parameters
index – Field index.
- Returns
Field value.
- func getField(asDouble index:Int32) Double ¶
Get field value.
- Parameters
index – Field index.
- Returns
Field value.
- func getField(asString index:Int32) String ¶
Get field value.
- Parameters
index – Field index.
- Returns
Field value.
- func getField(asDateTime index:Int32) Date ¶
Get field value.
- Parameters
index – Field index.
- Returns
Field value.
- func setField(for index:Int32, string value:String)¶
Set field value.
- Parameters
index – Fieldd index.
value – Value to set.
- func setField(for index:Int32, double value:Double)¶
Set field value.
- Parameters
index – Fieldd index.
value – Value to set.
- func setField(for index:Int32, int value:Int32)¶
Set field value.
- Parameters
index – Fieldd index.
value – Value to set.
- func setField(for index:Int32, date value:Date)¶
Set field value.
- Parameters
index – Fieldd index.
value – Value to set.
- func createGeometry() Geometry? ¶
Create new geometry. The type of geometry will be coresspondent feature class.
- Returns
Geometry class instance or nil.
- func getAttachment(aid: Int64) Attachment? ¶
Get attachment.
- Parameters
aid – Attachment identificator.
- Returns
Attachment class instance or nil.
- func getAttachments() [Attachment] ¶
Get all attachments.
- Returns
Attachment array.
- func addAttachment()¶
Add new attachment.
- Parameters
name – Name.
description – Description text.
path – File system path.
move – If true the attachment file will be
remoteId – Remote identificator.
logEdits – Log edits in history table. This log can be received using editOperations function.
- Returns
New attachment identificator.
- func deleteAttachment(aid: Int64, logEdits: Bool = true) Bool ¶
Delete attachment.
- Parameters
aid – Attachment identificator.
logEdits – Log edits in history table. This log can be received using editOperations function.
- Returns
True on success.
- func deleteAttachment(attachment: Attachment, logEdits: Bool = true) Bool ¶
Delete attachment.
- Parameters
attachment – Attachment class instance.
logEdits – Log edits in history table. This log can be received using editOperations function.
- Returns
True on success.
- class Attachment¶
Attachment class. File adde to the feature/row
- var remoteId : Int64
Remote identificator read/write property.
- func update(name: String, description: String, logEdits: Bool = true) Bool ¶
Update attachment. Only name and description can be updated. To change attchment file, just delete attachment and create new one.
- Parameters
name – New attachment name.
description – New attachment description.
logEdits – Log edits in history table. This log can be received using editOperations function.
- Returns
True on success.