Documentation for maplib/QMS.kt

data class QMSItem

QuickMapServices item.

fun constructor(id: Int, name: String, description: String, type: Object.Type, iconUrl: String, status: StatusCode, extent: Envelope, total: Int)

Main constructor

Parameters
  • id – d Item identifier.

  • name – e Item name.

  • description – n Item description.

  • type – e Item type.

  • iconUrl – l Item icon URL.

  • status – s Item availability status.

  • extent – t Item extent.

  • total – l Total items in request.

val id : Int

d Item identifier.

val name : String

e Item name.

val description : String

n Item description.

val type : Object.Type

e Item type.

val iconUrl : String

l Item icon URL.

val status : StatusCode

s Item availability status.

val extent : Envelope

t Item extent.

val total : Int

l Total items in request.

data class QMSItemProperties

QuickMapServices item properties.

fun constructor(id: Int, status: StatusCode, url: String, name: String, description: String, type: Object.Type, EPSG: Int, z_min: Int, z_max: Int, iconUrl: String, extent: Envelope, yOriginTop: Boolean)

Main constructor

Parameters
  • id – d Item identifier.

  • status – s Item availability status.

  • url – l Item URL.

  • name – e Item name.

  • description – n Item description.

  • type – e Item type.

  • EPSG – G EPSG code.

  • z_min – n Minimum zoom value.

  • z_max – x Maximum zoom value.

  • iconUrl – l Item icon URL.

  • extent – t Item extent.

  • yOriginTop – p Y axis orientation.

val id : Int

d Item identifier.

val status : StatusCode

s Item availability status.

val url : String

l Item URL.

val name : String

e Item name.

val description : String

n Item description.

val type : Object.Type

e Item type.

val EPSG : Int

G EPSG code.

val z_min : Int

n Minimum zoom value.

val z_max : Int

x Maximum zoom value.

val iconUrl : String

l Item icon URL.

val extent : Envelope

t Item extent.

val yOriginTop : Boolean

p Y axis orientation.

object QMS

QMS - QuickMapServices singleton

fun query(options: Map<String, String> = mapOf()) : Array<QMSItem>

Query QuickMapServices service for items

Parameters
  • options – Key - value map of options/filters. All keys are optional. Available keys are:

  • type: services type. May be tms, wms, wfs, geojson

  • epsg: services spatial reference EPSG code

  • cumulative_status: services status. May be works, problematic, failed

  • search: search string for a specific geoserver

  • intersects_extent: only services bounding boxes intersecting provided

extents will return. Extent mast be in WKT or EWKT format. - ordering: an order in which services will return. May be name, -name, id, -id, created_at, -created_at, updated_at, -updated_at - limit: return services maximum count. Works together with offset. - offset: offset from the beginning of the return list. Works together with limit. :returns: Array of QMSItem

fun queryItemProperties(id: Int) : QMSItemProperties

Query item properties by identifier

Parameters
  • id – identifier to request properties

Returns

QMSItemProperties class instance