6.3.1.2.6. ILayer

public interface ILayer

Interface for layer. Each layer should implement it.

Author:Dmitry Baryshnikov

6.3.1.2.6.1. Methods

6.3.1.2.6.1.1. delete

boolean delete()

Delete layer

Returns:true on success or false

6.3.1.2.6.1.2. getContext

Context getContext()
Returns:Application context

6.3.1.2.6.1.3. getExtents

GeoEnvelope getExtents()

Get layer extents

Returns:Layer extents in map coordinates

6.3.1.2.6.1.4. getId

int getId()
Returns:Layer identofoctor - set by map on current session

6.3.1.2.6.1.5. getName

String getName()
Returns:User readable layer name

6.3.1.2.6.1.6. getParent

ILayer getParent()
Returns:Layer parent object

6.3.1.2.6.1.7. getPath

File getPath()

Get layer path in storage

Returns:Layer path

6.3.1.2.6.1.8. getType

int getType()

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

Returns:Layer type

6.3.1.2.6.1.9. isValid

boolean isValid()
Returns:Is layer valid (all data are present, .etc.)

6.3.1.2.6.1.10. load

boolean load()

Load layer

Returns:true on success or false

6.3.1.2.6.1.11. notifyDelete

void notifyDelete(long rowId)

Triggered on layer delete record

Parameters:
  • rowId – Deleted record id

6.3.1.2.6.1.12. notifyDeleteAll

void notifyDeleteAll()

Triggered on layer delete all records

6.3.1.2.6.1.13. notifyInsert

void notifyInsert(long rowId)

Triggered on layer added new record

Parameters:
  • rowId – New record id

6.3.1.2.6.1.14. notifyUpdate

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

Triggered on layer contents changed

Parameters:
  • rowId – New record id
  • oldRowId – Old record id
  • attributesOnly

6.3.1.2.6.1.15. notifyUpdateAll

void notifyUpdateAll()

Triggered on layer contents or properties changes

6.3.1.2.6.1.16. onUpgrade

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

Executed then database version is changes. Triggered on application upgrade

Parameters:
  • sqLiteDatabase – The database
  • oldVersion – Old database version
  • newVersion – New database version

6.3.1.2.6.1.17. save

boolean save()

Save layer changes

Returns:true on success or false

6.3.1.2.6.1.18. setId

void setId(int id)

Set layer internal identifictor - set by map on current session

Parameters:
  • id – New layer identificator

6.3.1.2.6.1.19. setName

void setName(String newName)

Set layer name

Parameters:
  • newName – New name

6.3.1.2.6.1.20. setParent

void setParent(ILayer layer)

set layer parent

Parameters:
  • layer – Layer parent object