GetGeoLocatorSearchResult (GET)

The action route is responsible for handling the location search query based on the search key the user submitted and the language used.


Name Type Description Required?
`term` String User input search term **true** (unless `lon` and `lat` present)
`country` String ELF country (autocomplete list) **optional**
`region` String ELF AU name **optional**
`epsg` String Target coordinate reference system e.g. epsg:3035 **true**
`fuzzy` Boolean Fuzzy search mode **optional** (defaults to false)
`exonym` Boolean exonym names (names in other languages) included **optional** (defaults to false)
`lon` String Longitude - reverse geocoding, if this in parameters **optional**
`lat` String Longitude - reverse geocoding, if this in parameters **optional**
`language` String The language where the search will be targeted to **true**



  "totalCount": "<Total count from all result items>",
  "locations": [ // Array from search result items
      "id": "<result identifier>",
      "rank": "<semantic ordering number>",
      "lon": "<longitude>",
      "village": "<ELF parent title>",
      "name": "<name>",
      "zoomLevel": "<zoom level>",
      "type": "<ELF locationType title>",
      "lat": "<latitude>"


Returns HTTP code 500 with an error message as a string in response body. Will return an error if the term param is empty, if it contains the * character and is under 4 characters long or if it contains more than one * characters. (not in reverse geocoding)


Example geocoding query for Paikkatietoikkuna

Example geocoding query for oskari-map servlet (normal search with country filter)

http://localhost:8888/oskari-map/?action_route=GetGeoLocatorSearchResult&lang=en&epsg=EPSG:3857&term=Helsinki&region=&country=FI&normal=true&filter=false&fuzzy=false&exonym=false Response:

[{"id":0,"rank":0,"lon":"388404.3740437103","village":"Helsinki (fin)","name":"Els&iacute;nki","type":"variant","lat":"6671584.128010677"},
{"id":1,"rank":0,"lon":"388404.3740437103","village":"Helsinki (fin)","name":"Helsingfors","type":"variant","lat":"6671584.128010677"},...}

Example reverse geocoding query for Paikkatietoikkuna


Last modified: Mon Sep 11 2023 18:13:06 GMT+0300 (Eastern European Summer Time)