GeoResourceProxy
Extends:
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 |
hasForPoint: boolean: * If the proxy supports for-point operations |
Method Summary
Public Methods | ||
public |
forBoundary(boundary: Object, limit: Number): CancelablePromise<ResourceBase[]> Get an array of results for boundary |
|
public |
forPoint(point: Object, limit: Number): CancelablePromise<ResourceBase[]> 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(params: Number | Object | RequestParameters): CancelablePromise<PaginatedResourceListing> List target resource |
|
public |
lister(parameters: object | RequestParameters, maxRows: number): ResourceLister Get the resource lister |
|
public |
new(data: Object<String, *>): ResourceBase Build a new instance of the target |
From class ResourceProxy | ||
public |
get(id: Number | String | Object, deleted: String): CancelablePromise<ResourceBase> Get target resource |
|
public |
select(id: Number | String): ResourceBase Select target resource without obtaining data |
Public Constructors
public constructor(api: Mapcreator, Target: ResourceBase, altUrl: string, seedData: object, options: object) source
Override:
SimpleResourceProxy#constructorParams:
Name | Type | Attribute | Description |
api | Mapcreator | Instance of the api |
|
Target | ResourceBase | Target to wrap |
|
altUrl | string |
|
Internal use, Optional alternative url for more complex routing |
seedData | object | Internal use, used for seeding ::new |
|
options | object | instance options |
|
options.hasForPoint | boolean |
|
If the endpoint supports for-point |
options.hasForBoundary | boolean |
|
If the endpoint supports for-boundary |
Public Members
Public Methods
public forBoundary(boundary: Object, limit: Number): CancelablePromise<ResourceBase[]> source
Get an array of results for boundary
Params:
Name | Type | Attribute | Description |
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 |
Throw:
If the api returns errors |
|
* |
TypeError |
* |
GeoError |
public forPoint(point: Object, limit: Number): CancelablePromise<ResourceBase[]> source
Get an array of results for point
Throw:
If the api returns errors |
|
* |
TypeError |
* |
GeoError |