Home Manual Reference Source Repository
import GeoResourceProxy from '@mapcreator/api/src/proxy/GeoResourceProxy.js'
public class | source

GeoResourceProxy

Extends:

SimpleResourceProxyResourceProxy → GeoResourceProxy

Constructor Summary

Public Constructor
public

constructor(api: Mapcreator, Target: ResourceBase, altUrl: string, seedData: object, options: object)

Member Summary

Public Members
public get

If the proxy supports for-point operations

public get

If the proxy supports for-point operations

Method Summary

Public Methods
public

Get an array of results for boundary

public

Get an array of results for point

Inherited Summary

From class SimpleResourceProxy
public get

Target: Class<ResourceBase>: *

Target to wrap results in

public get

api: Mapcreator: *

Get api instance

public get

Proxy target url

public

List target resource

public

Get the resource lister

public

Build a new instance of the target

From class ResourceProxy
public

Get target resource

public

Select target resource without obtaining data

Public Constructors

public constructor(api: Mapcreator, Target: ResourceBase, altUrl: string, seedData: object, options: object) source

Override:

SimpleResourceProxy#constructor

Params:

NameTypeAttributeDescription
api Mapcreator

Instance of the api

Target ResourceBase

Target to wrap

altUrl string
  • optional
  • default: null
  • nullable: true

Internal use, Optional alternative url for more complex routing

seedData object

Internal use, used for seeding ::new

options object

instance options

options.hasForPoint boolean
  • optional
  • default: true

If the endpoint supports for-point

options.hasForBoundary boolean
  • optional
  • default: true

If the endpoint supports for-boundary

Public Members

public get hasForBoundary: boolean: * source

If the proxy supports for-point operations

Return:

boolean

If it supports the operations

public get hasForPoint: boolean: * source

If the proxy supports for-point operations

Return:

boolean

If it supports the operations

Public Methods

public forBoundary(boundary: Object, limit: Number): CancelablePromise<ResourceBase[]> source

Get an array of results for boundary

Params:

NameTypeAttributeDescription
boundary Object

boundary to search within

boundary.topLeft Object

top left corner of the boundary

boundary.topLeft.lat Number

top left corner latitude

boundary.topLeft.lng Number

top left corner longitude

boundary.bottomRight Object

bottom right corner of the boundary

boundary.bottomRight.lat Number

bottom right corner latitude

boundary.bottomRight.lng Number

bottom right corner longitude

limit Number

maximum amount of results, can't be larger then RequestParameters.maxPerPage

Return:

CancelablePromise<ResourceBase[]>

target resource for boundary

Throw:

ApiError

If the api returns errors

*

TypeError

*

GeoError

public forPoint(point: Object, limit: Number): CancelablePromise<ResourceBase[]> source

Get an array of results for point

Params:

NameTypeAttributeDescription
point Object

point to search at

point.lat Number

top left corner latitude

point.lng Number

top left corner longitude

limit Number

maximum amount of results, can't be larger then RequestParameters.maxPerPage

Return:

CancelablePromise<ResourceBase[]>

target resource for boundary

Throw:

ApiError

If the api returns errors

*

TypeError

*

GeoError