Class: arcGisSearcher

arcGisSearcher

Searches an arcGIS service.

Constructor

new arcGisSearcher(options)

Parameters:
Name Type Description
options Object arcGisSearcher expects these properties:
Properties
Name Type Description
host string "Service endpoint (SpatialSuite Url) eg.: [http:]//sps-demo.septima.dk[:80]. Protocol and port are optional"
datasources string Comma separated list of indexed data sources to search. Default: "*"
Source:
Example
var arcGisSearcherOptions = {
    catalogUrl : http:// <catalog-url>" eg: "http://kortservice.vejle.dk/gis/rest/services",
    serviceName: "[folder/]service" eg: "GISWEB2/FamilieSocial",
    onSelect : function(result) {
         jQuery('#log').prepend('<b>'+ ArcGIS objekt + ':</b> '+ result.title + '<br/>');
    },
    layers : "*" or ["layer1Name", "layer2Name"],
    matchesPhrase: "Begynder med ",
    searchDelay: 200
};
searchers.push({title : '', searcher : new Septima.Search.arcGisSearcher(arcGisSearcherOptions)});

Extends

Methods

addCustomButtonDef(customButtonDef)

Displays an icon next to each result.
Parameters:
Name Type Description
customButtonDef Septima.Search.Searcher.CustomButtonDef
Inherited From:
Source:

createQueryResult() → {Septima.Search.QueryResult}

Create a {Septima.Search.QueryResult}.
Inherited From:
Source:
Returns:
Type
Septima.Search.QueryResult

fetchData(query, caller)

This method is called is called by the controller when the driver should fetch data.
This method MUST be implemented by all seachers
A call to this method MUST result in either a call to Septima.Search.Controller.fetchSuccess(Septima.Search.QueryResult) or caller.fetchError()
Parameters:
Name Type Description
query Septima.Search.Query
caller Septima.Search.Controller
Overrides:
Source:

getCentroid(geoJsonObject) → {GeoJsonObject}

Find the centroid
Parameters:
Name Type Description
geoJsonObject geoJsonObject
Inherited From:
Source:
Returns:
Type
GeoJsonObject

getPointOnSurface(geoJsonObject) → {GeoJsonObject}

Find a point guaranteed to lie on the surface
Parameters:
Name Type Description
geoJsonObject geoJsonObject
Inherited From:
Source:
Returns:
Type
GeoJsonObject

onSelect(result)

This method is called by the controller when a result is selected.
This method MAY be implemented by searchers.
Implementations MUST call this._onSelectCallback(result)
Parameters:
Name Type Description
result Septima.Search.Searcher.Result
Overrides:
Source:

registerTarget(target)

Register a target.
Parameters:
Name Type Description
target string
Inherited From:
Source:

translateWktToGeoJsonObject(wkt) → {GeoJsonObject}

Convert a wkt string to a geojson object
Parameters:
Name Type Description
wkt string
Inherited From:
Source:
Returns:
Type
GeoJsonObject

Type Definitions

selectCallback(result)

This function is called when a result is selected.
Parameters:
Name Type Description
result Object
Properties
Name Type Description
title string
description string
data object arcGIS feature
Properties
Name Type Description
heading string title
Source: