new alk.source.POISource(opt_options)
This constructor creates a Source object that accesses the ALK Points of Interest Service.
Option | Type | Description |
---|---|---|
poiServiceOptions |
alk.service.POIService |
This option contains the POI service options with which to create the POIService used internally. |
strategy |
alk.source.LoadStrategy |
This option specifies the load strategy for the POI vector source.
The default is the |
wrapX |
boolean | undefined |
Wrap the world horizontally. Default is |
Fires:
-
change:poi
- Fires the 'change:poi' event when done processing the response.
-
change:updating
- Fires the 'change:updating' event when done processing the response.
Extends
- ol.source.Vector
Methods
-
clonePOIServiceOptions(options){alkx.POIServiceOptions}
-
This method processes clones the POIServiceOptions including a deep copy of the 'poiCategories'properties.
Option Type Description apiKey
string This option contains the ALK ApiKey that gives you permission to extract data from ALK Servers.
region
alk.val.Region | number | string This option tells the service in which region the retrieved data is to pertain. Some ALK Services switch underlying services due to this option. For instance, traffic data for North America and Europe may come from different underlying services.
dataset
alk.val.Dataset | number | string The option contains the Dataset parameter for the Service. This option specifies an area dataset that may be pertinent to the request.
center
Array.<number> | string This option contains the center of the search.
radius
number | string This option contains the radius in radiusUnits of the search.
radiusUnits
alk.val.DistanceUnits | number | string This option contains the units with which to interpret the radius option.
nameFilter
string The results will be filtered by a likeness to this name;
poiCategories
Array.<string> | string This options specifies the Points of Interest categories with which to restrict the search. Their values must come from the
alk.service.POICategoriesSingleSearchService
.Returns:
The cloned object.
-
getPOIService(){alk.service.POIService}
-
-
processResponse(response){Object}
-
This method processes the response from the POIService before it is handled by the POISource. It returns the POIServiceOptions that were made to make the request and the result.
Name Type Description response
alkx.POIServiceResponse The response from the POIService.
Returns:
The response pass through.
-
search(opt_options, success, failure)
-
This method combines the given options with the base options used to create this source before making a call to the underlying POIService. The response is taken from the POIService call and handed off to
alk.source.POISource#processResponse
before being given to the 'success' callback given here. The loadStrategy and wrapX options are ignored here.Name Type Description options
alkx.POISourceOptions Option Type Description poiServiceOptions
alk.service.POIService This option contains the POI service options with which to create the POIService used internally.
strategy
alk.source.LoadStrategy This option specifies the load strategy for the POI vector source. The default is the
alk.source.SubtractionLoadStrategy
, which tries to only load necessary extents with resolution limits between 1 and 1000 meters per pixel.wrapX
boolean | undefined Wrap the world horizontally. Default is
true
. For vector editing across the -180° and 180° meridians to work properly, this should be set tofalse
. The resulting geometry coordinates will then exceed the world bounds.success
function failure
function Fires:
-
change:updating
- Fires the 'change:updating' event when done processing the response.
-
-
setPOIService(service)
-
Name Type Description service
alk.service.POIService