Class: AddressSearcher

AddressSearcher

Searches smartAdresse (https://smartadresse.dk/)

new AddressSearcher(options)

Parameters:
Name Type Description
options Object AddressSearcher expects these properties:
Properties
Name Type Description
apiKey string eg.; "FCF3FC50-C9F6-4D89-9D7E-6E3706C1A0BD"
area string "muncode" + municipalitycode eg.; "muncode0151"
Source:
  • searchers/addressSearcher.js, line 22
Example
 
var adressSearchOptions = {
    apiKey : "FCF3FC50-C9F6-4D89-9D7E-6E3706C1A0BD",
    onSelect : function(result) {
         jQuery('#log').prepend('Plan valgt: '+ result.title);},
    area: "muncode0151",
    matchesPhrase: "Begins with ",
    searchDelay: 200
};
searchers.push({title : 'Virksomhed', searcher : new Septima.Search.AddressSearcher(adressSearchOptions)});

Extends

Methods

addCustomButtonDef(customButtonDef)

Displays an icon next to each result.
Parameters:
Name Type Description
customButtonDef Septima.Search.Searcher.CustomButtonDef
Inherited From:
Source:
  • searchers/searcher.js, line 362

createQueryResult() → {Septima.Search.QueryResult}

Create a {Septima.Search.QueryResult}.
Inherited From:
Source:
  • searchers/searcher.js, line 180
Returns:
Type
Septima.Search.QueryResult

getCentroid(geoJsonObject) → {GeoJsonObject}

Find the centroid
Parameters:
Name Type Description
geoJsonObject geoJsonObject
Inherited From:
Source:
  • searchers/searcher.js, line 212
Returns:
Type
GeoJsonObject

getPointOnSurface(geoJsonObject) → {GeoJsonObject}

Find a point guaranteed to lie on the surface
Parameters:
Name Type Description
geoJsonObject geoJsonObject
Inherited From:
Source:
  • searchers/searcher.js, line 200
Returns:
Type
GeoJsonObject

registerTarget(target)

Register a target.
Parameters:
Name Type Description
target string
Inherited From:
Source:
  • searchers/searcher.js, line 165

translateWktToGeoJsonObject(wkt) → {GeoJsonObject}

Convert a wkt string to a geojson object
Parameters:
Name Type Description
wkt string
Inherited From:
Source:
  • searchers/searcher.js, line 189
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 record as returned from service.
Properties
Name Type Description
addressAccessId string
addressSpecificCount int
districtName string
districtSubDivisionIdentifier string
geometryWkt string
mailDeliverySublocationIdentifier string
municipalityCode string
municipalityName string
postCodeIdentifier string
presentationString string
streetBuildingIdentifier string
streetCode string
streetName string
type string
validCoordinates boolean
x: int
y: int
Source:
  • searchers/addressSearcher.js, line 23