ILayer

public interface ILayer

Interface for layer. Each layer should implement it.

Author:Dmitry Baryshnikov

Methods

delete

boolean delete()

Delete layer

Результат:true on success or false

getContext

Context getContext()
Результат:Application context

getExtents

GeoEnvelope getExtents()

Get layer extents

Результат:Layer extents in map coordinates

getId

int getId()
Результат:Layer identofoctor - set by map on current session

getName

String getName()
Результат:User readable layer name

getParent

ILayer getParent()
Результат:Layer parent object

getPath

File getPath()

Get layer path in storage

Результат:Layer path

getType

int getType()

Get Layer type (@see com.nextgis.maplib.util.Constants)

Результат:Layer type

isValid

boolean isValid()
Результат:Is layer valid (all data are present, .etc.)

load

boolean load()

Load layer

Результат:true on success or false

notifyDelete

void notifyDelete(long rowId)

Triggered on layer delete record

Параметры:
  • rowId – Deleted record id

notifyDeleteAll

void notifyDeleteAll()

Triggered on layer delete all records

notifyInsert

void notifyInsert(long rowId)

Triggered on layer added new record

Параметры:
  • rowId – New record id

notifyUpdate

void notifyUpdate(long rowId, long oldRowId, boolean attributesOnly)

Triggered on layer contents changed

Параметры:
  • rowId – New record id
  • oldRowId – Old record id
  • attributesOnly

notifyUpdateAll

void notifyUpdateAll()

Triggered on layer contents or properties changes

onUpgrade

void onUpgrade(SQLiteDatabase sqLiteDatabase, int oldVersion, int newVersion)

Executed then database version is changes. Triggered on application upgrade

Параметры:
  • sqLiteDatabase – The database
  • oldVersion – Old database version
  • newVersion – New database version

save

boolean save()

Save layer changes

Результат:true on success or false

setId

void setId(int id)

Set layer internal identifictor - set by map on current session

Параметры:
  • id – New layer identificator

setName

void setName(String newName)

Set layer name

Параметры:
  • newName – New name

setParent

void setParent(ILayer layer)

set layer parent

Параметры:
  • layer – Layer parent object