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 apiKeystring This option contains the ALK ApiKey that gives you permission to extract data from ALK Servers.
regionalk.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.
datasetalk.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.
centerArray.<number> | string This option contains the center of the search.
radiusnumber | string This option contains the radius in radiusUnits of the search.
radiusUnitsalk.val.DistanceUnits | number | string This option contains the units with which to interpret the radius option.
nameFilterstring The results will be filtered by a likeness to this name;
poiCategoriesArray.<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 responsealkx.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#processResponsebefore being given to the 'success' callback given here. The loadStrategy and wrapX options are ignored here.Name Type Description optionsalkx.POISourceOptions Option Type Description poiServiceOptionsalk.service.POIService This option contains the POI service options with which to create the POIService used internally.
strategyalk.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.wrapXboolean | 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.successfunction failurefunction Fires:
-
change:updating - Fires the 'change:updating' event when done processing the response.
-
-
setPOIService(service)
-
Name Type Description servicealk.service.POIService