Class: GeoSearch

GeoSearch

Searches gst geoservice (http://www.kortforsyningen.dk/dokumentation/geonoeglergeosearch)

Constructor

new GeoSearch(options)

Parameters:
Name Type Description
options Object GeoSearch expects these properties:
Properties
Name Type Description
area string "muncode" + municipalitycode eg.; "muncode0151"
targets Array.<string> List of targets to search. The full list is ['adresser','stednavne', 'kommuner', 'matrikelnumre', 'opstillingskredse', 'politikredse', 'postdistrikter', 'regioner', 'retskredse']
authParams Object Either {ticket: 'ttttt'}, where t is a ticket issued by kortforsyningen or {login: 'lll', password: 'pppp'}
Source:
Example
var geoSearchOptions = {
    onSelect : function(result) {
         jQuery('#log').prepend('<b>'+ result.data.type + ':</b> '+ result.title + '<br/>');
    },
    area: "muncode0151",
    targets : ['adresser','stednavne', 'kommuner'],
    authParams: {
     login: 'xxxx',
     password: 'xxxxxx'
    },
    matchesPhrase: "Begynder med ",
    searchDelay: 200
};
searchers.push({title : 'GeoSearch Feature', searcher : new Septima.Search.GeoSearch(geoSearchOptions)});

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 geoservice. Adress record shown. See http://www.kortforsyningen.dk/dokumentation/geonoeglergeosearch for other return types
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: