in-ads developer guide€¦ · in-ads developer guide estonian land board 2020 6 3. embed code...

92
In-ADS Developer Guide 19.03.2020 Version 2.4.5 Estonian Land Board

Upload: others

Post on 14-Aug-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

19.03.2020

Version 2.4.5

Estonian Land Board

Page 2: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 2

Table of contents

1. Introduction ........................................................................................................................ 5

2. Requirements ..................................................................................................................... 5

3. Embed code generation ................................................................................................. 6

3.1. . Main modes of operation .................................................................................................... 6

3.2. . Object types and priorities ................................................................................................. 7

3.3. . Map layers ................................................................................................................................. 9

3.3.1. Selection of base layers ......................................................................................................................................................9

3.3.2. Selection of map layers .......................................................................................................................................................9

3.3.3. Additional WMS layers .......................................................................................................................................................9

3.4. . EHAK filter ............................................................................................................................... 10

3.5. . Marking the location on the map ................................................................................. 10

3.6. . Generated code for In-ADS widget ............................................................................... 10

4. In-ADS widget .................................................................................................................. 12

4.1. . Map ............................................................................................................................................. 12

4.2. . Address search ....................................................................................................................... 13

4.2.1. Apartment search .............................................................................................................................................................. 14

4.2.2. Historic addresses ............................................................................................................................................................. 14

4.2.3. Filters ...................................................................................................................................................................................... 15

5. In-ADS API ......................................................................................................................... 15

5.1. . Functions .................................................................................................................................. 15

5.1.1. hideResult() .......................................................................................................................................................................... 15

5.1.2. setAddress(address)......................................................................................................................................................... 16

5.1.3. showMap() ............................................................................................................................................................................ 16

5.1.4. hideMap() .............................................................................................................................................................................. 17

5.1.5. searchAddress (ads_oid, bbox, kort_ads_oid) ........................................................................................................ 17

5.1.6. setInfo(turnOn) ................................................................................................................................................................... 18

5.1.7. toggleFullscreen (turnOn) ............................................................................................................................................. 18

5.1.8. pointAddressXY(x, y)........................................................................................................................................................ 18

Page 3: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 3

5.1.9. pointAddressLonLat(lon, lat) ....................................................................................................................................... 19

5.1.10. saveMap() ............................................................................................................................................................................ 19

5.2. . Events ........................................................................................................................................ 19

5.2.1 mapPictureReady ..................................................................................................................................................................... 20

5.2.2 mapNavigate .............................................................................................................................................................................. 20

5.2.3 inaadressLoaded...................................................................................................................................................................... 20

5.2.4 addressSelected ....................................................................................................................................................................... 21

5.2.5 noResultXY ................................................................................................................................................................................. 21

5.3. . Namespace support for events ....................................................................................... 21

5.4. . Input description .................................................................................................................. 22

5.5. . Output description ............................................................................................................... 25

5.5.1. Output of object-based search...................................................................................................................................... 26

5.5.2. Output of address-based search .................................................................................................................................. 32

6. In-ADS editor API ........................................................................................................... 38

6.1. . Drawing and editing ........................................................................................................... 38

6.2. . Redisplay of existing shape on the map ..................................................................... 39

6.3. . Style ............................................................................................................................................ 39

6.4. . Input description .................................................................................................................. 40

6.5. . Functions .................................................................................................................................. 43

6.5.1. setGeomObject(geomObject, fit) ................................................................................................................................. 43

6.5.2. sectVectorObjects(features, style, fit) ....................................................................................................................... 44

6.5.3. getInADS() ............................................................................................................................................................................. 45

6.6. . Events ........................................................................................................................................ 45

6.6.1. featureAdded ....................................................................................................................................................................... 45

6.6.2. featureModified .................................................................................................................................................................. 46

6.6.3. featureSelected ................................................................................................................................................................... 46

7. In-ADS style....................................................................................................................... 48

8. Description of gazetteer service .............................................................................. 49

8.1. . Input description .................................................................................................................. 49

8.2. . Output description ............................................................................................................... 50

8.2.1 Search based on address, ADS_OID or by origin register identifier.................................................................. 51

8.2.2 Search based on cadastral number ................................................................................................................................. 53

Page 4: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 4

8.2.3 Search based on coordinates ............................................................................................................................................. 56

8.2.4 Apartment search .................................................................................................................................................................... 65

8.2.5 Search based on ADS_OID .................................................................................................................................................... 69

8.2.6 Search based on ADR_ID ...................................................................................................................................................... 74

8.2.7 Search with filters ................................................................................................................................................................... 80

8.2.8 Output structure ...................................................................................................................................................................... 90

9. In-ADS gazetteer monitoring..................................................................................... 92

Page 5: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 5

1. Introduction

In-ADS widget is an embeddable HTML5/JavaScript code, which can easily be integrated into custom web solutions to provide a high-quality address search functionality. The In-ADS widget can be used either as a classical address search bar, or by systems that need to find a list of normalized addresses, meeting the requirements set by ADS, with all relevant meta-information. This guide is meant for developers, who generate embed code by using the respective interface http://inaadress.maaamet.ee/inaadress and integrate it into information systems. The output of the code generator is highly suitable e.g. for adding an address search function to a website. On the initial page of the user interface there is a sample In-ADS widget, which the user can see and try out. There are also links to the user guide and the developer guide. The first one is meant both for everyday users, who want to use the generated code directly, and for developers, who wish to use In-ADS e.g. in an information system. Interacting with In-ADS widget happens via JavaScript interface. Various events like selecting the address (that are implemented as DOM events) trigger In-ADS widget to return JavaScript object with address data. The external system can also invoke different functions of In-ADS.

2. Requirements The In-ADS widget uses HTML5 standard. Thus, supported are browsers that support the above standard. Currently (as of the 10th of December 2019) the supported browsers are:

Internet Explore versions 10 and 11 Microsoft Edge Safari version 5.1.7 or newer Google Chrome version 38.0.2125.101m or newer Mozilla Firefox version 32.03 or newer.

The recommended minimum size of the widget with a map is 300x300 px.

Page 6: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 6

3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the web interface that separates configurable options into different pages.

3.1. Main modes of operation First the desired mode of operation has to be chosen:

Mode of operation Description Address search bar with a map

Both the address search box and the map, on which the found addresses are displayed, are shown. It is also possible to select the address on the map.

Address search bar with a map (by default the map is hidden)

Similar to the previous option, but by default the map is hidden. There is a separate button for displaying and hiding the map

Address search bar without a map

Only the address search box is displayed. In this mode only address-based search is enabled.

Only map for displaying the location

Only the map is displayed and addresses cannot be searched through the user interface. This mode is meant for displaying specific addresses pre-set during the creation of the In-ADS widget. It is possible for the user to make a selection from among the addresses displayed on the map.

Additionally, the ID value of a DIV element, into which the In-ADS widget will be placed, must be set. If the user is willing to change the appearance of the widget, it’s possible to check the option to use a custom CSS file. If this option is selected, the widget’s CSS file is not used (“nocss”:true). As the widget uses jQueryMobile (version 1.4.3) layout, the use of a respective CSS file is recommended in order to make the creation of custom layout easier. The CSS file is available at

Page 7: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 7

http://inaadress.maaamet.ee/inaadress/theme/default/jquery.mobile-1.4.3.css If so desired, also the jQueryMobile TheremeRoller tool (http://themereroller.jquerymobile.com) can be used. This tool enables an easy styling of all kinds of jQueryMobile widgets and a generation of a respective CSS file. While using TheremeRoller, besides the addition of CSS file, also the jQuery and jQueryMobile JavaScript files must be added to the header. Example: <link rel="stylesheet"

href="http://code.jquery.com/mobile/1.4.3/jquery.mobile.structure-

1.4.3.min.css" />

<script type="text/javascript" src="

http://inaadress.maaamet.ee/inaadress/js/jquery.min.js"></script>

<script type="text/javascript" src="

http://inaadress.maaamet.ee/inaadress/js/jquery.mobile-

1.4.3.min.js"></script>

<script type="text/javascript" src="

http://inaadress.maaamet.ee/inaadress/js/inaadress.js"></script>

There are also optional choices whether to display a scale bar and a measuring tool on the map or not. For the use of the In-ADS widget in full screen mode (e.g. in mobile version) the box “Show Full Screen” must be checked.

3.2. Object types and priorities

A radio button allows to choose between the address-based and object-based searches.

Page 8: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 8

Object types:

General address search – all object types are searched for and found addresses are returned (if multiple objects are related to a single address, the one with the highest priority is displayed in conformity with priority rules)

Select object types (object-based search) – object types to be searched for can be selected. The search result returns all found objects matching the searched address, the sequence of objects is based on priority rules. If also building is selected, it will be possible to restrict the search in a way that only buildings with the uniqueness requirement of an address are searched for. Buildings requiring a unique address are e.g. residential buildings, schools, commercial buildings, accommodation buildings, hospitals, etc.; buildings not requiring a unique address are e.g. sheds and other outbuildings in which people are not expected to reside on a daily basis.

Page 9: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 9

In the search for buildings also apartments can be included. Users can be allowed to enter also new apartments (apartment number), but these are not saved in ADS being only of an informative value to the external system. NB! Any information about apartments missing in ADS (new apartments), or about data contradicting to the reality or otherwise problematic should be sent to [email protected].

Priority rules define which object has preference in address-based search or in what sequence objects are displayed in object-based search.

3.3. Map layers

3.3.1. Selection of base layers If the selected mode of operation includes also a map, it will be possible to choose the background maps to be added to the widget. If more than one layer is selected, it will also be possible to set the default base layer.

3.3.2. Selection of map layers In addition to the background map, other map layers can be added to the map, e.g. addresses or cadastral parcels (these map layers are always displayed on the map and the user cannot turn them on/off).

3.3.3. Additional WMS layers Besides the background map and the Land Board’s maps, additional WMS layers of third parties can also be displayed on the map. To be able to do that, the URL of WMS service with the VERSION and LAYERS parameters must be inserted. For example: http://kaart.maaamet.ee/wms/aadressid?version=1.1.1&layers=ads_hoone,ads_hoone_aadr. Multiple WMS layers can be added. Additionally specified WMS layers will be displayed on top of the map in the order of adding and they cannot be managed further.

Page 10: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 10

3.4. EHAK filter EHAK filter allows to limit search results to county, local government or settlement level. In this case objects are searched for only from the selected EHAK area and the map is by default opened in the selected EHAK area.

3.5. Marking the location on the map Provided that “Only map for displaying the location” mode of operation has been chosen, it is possible to visualise the location on the map together with tooltips. To add a location to the map, the desired address has to be entered into the search bar and a choice made from the list, or an appropriate location clicked on the map. After the choice has been made, a textbox with the found addresses will be displayed next to the map and a marker with a label will be shown on the map. The label text can be changed by entering an appropriate name into the box. Instead of label the text can be displayed also in tooltip or in both. If both is selected, then using symbol | in text the text before | is displayed in label and the text after | is displayed in tooltip. Several locations can be added to the map by repeating the above actions. Tooltips can be deleted by clicking the button “Delete” next to the text box or the button “Delete objects” at the end of the list. “Zoom to” button will zoom the map to the extent of selected objects. The chosen location will also serve as the initial view of the generated in-ADS widget. To change the initial view, it is necessary to navigate on this page to a desired location.

3.6. Generated code for In-ADS widget The code that was generated according to previous choices will be presented on the last page.

Page 11: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 11

The code to be added to the header of HTML page (JavaScript of the In-ADS widget):

And JavaScript part of the In-ADS widget. For example:

The example of HTML-page that uses the generated code is also provided:

The height and width of DIV element can be used for setting the width, and in case a map is included, also the height of the widget. The default width of the widget is 100% and the default height for the widget with a map is 450 px. By default, the widget is in the same language as code generator page, but it can be changed by changing the value of lang parameter in the code. For Estonian language the value is “et”, for English “en” and for Russian “ru”. When the widget is used with a map neither the widget itself, nor the surrounding container can be hidden (style=”display:none”). In-ADS can be used also over HTTPS (https://inaadress.maaamet.ee/inaadress).

Page 12: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 12

4. In-ADS widget

4.1. Map Depending on the configuration, the widget consists either of a map with a search field, only a map, only a search field or a search field and a button with which it is possible to show/hide the map. The map component consists of a map window. The layers displayed on the map cannot be managed by the user. The components to be displayed on the map are as following:

1. Selection list of base layers (a predefined choice of base maps). In addition to using the mouse, it is possible to move around in the list by using Up and Down arrows and confirming the choice with Enter.

2. Navigation buttons for zooming the map in and out. Zooming in/out can be done also by using the mouse wheel.

3. Information button By turning on the information button and clicking on an object on the map, the user can see a more detailed information about the object. Information will be displayed according to the preselected object types. When search by address was selected, a list of all objects found in this location will be returned. When certain object types were selected, the result displays objects only from these types. The window can be closed by using the Esc key.

By clicking on the map it is possible to choose the address (providing the mode of operation includes a map). For that it is necessary to navigate to the desired location and click on the searched object. If there is only one object in the selected location, the address of this object will be displayed in the address

Page 13: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 13

search bar and an orange marker will be displayed on the place of click. If there are several objects of the same type in the selected location, the user will be asked to choose the object. After making the selection and confirming it, the address of the selected object will be displayed in the address search bar. In the scales between 1:4000 and 1:40000 the returned selection of objects includes cadastral parcels, EHAK, territorial units and traffic spaces. In larger scales also buildings are included. If only certain types of objects are predefined, only these will be suggested to the user.

4.2. Address search

By entering an address into the search box, a selection of found addresses will be returned. You can also enter POI name (for example “Maa-amet”) or postal code and at least 2 characters (for example „10621 Mustamäe tee 51“). It is also possible to search addresses by including district or place name from other sources (for example „Koidu 26 Kassisaba“). The list of results contains always at maximum 10 addresses. If the searched address is not among the found addresses, the search must be specified further. In case the number of found addresses is 5 or less, the found addresses will directly be displayed on the map that will be zoomed to the proper extent (provided the mode of operation includes a map). In this case there is an orange marker in front of each address, which shows where the given address is located on the map. With the object-based search (the types of objects to be searched from were predefined) the search result displays also the object type (KÜ – cadastral parcel, HÜ – EHAK, LP –traffic surface, VK – territorial unit, H – building). In addition to mouse, also the keys tab and shift+tab can be used for moving up and down in the list of displayed addresses by confirming the choice with Enter. When the user does not know the address or cannot find it for whatever reason, it is always possible to choose the address on the map (providing the mode of operation includes a map). For that it is necessary to navigate to the desired location and click on the searched object. If there is only one object in the selected location, the address of this object will be displayed in the address search bar and an orange marker will be displayed on the place of click. If there

Page 14: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 14

are several objects of the same type in the selected location, the user will be asked to choose the object. After making the selection and confirming it, the address of the selected object will be displayed in the address search bar. In the scales larger than 1:5000 only EHAK, territorial unit and traffic space objects are suggested. In scales smaller than 1:5000 cadastral parcels, buildings, streets and traffic spaces are displayed. If only certain types of objects are predefined, only these will be suggested to the user.

4.2.1. Apartment search If settings enable also searching by apartments, there are two options how to do it. If the entered address includes the apartment number (separated by hyphen), e.g. Sõle 5-40, the returned results will show addresses together with apartment numbers. When only the address of a building is entered, then, after making a choice from the address list, a separate list with apartment numbers will appear from which the user can choose the desired apartment. Also the Up and Down keys can be used for moving around in the list and the choice can be confirmed with the Enter key. In case the settings of the In-ADS widget enable also adding of new apartments, the list includes an option “other”. By choosing it, a new dialogue box will be opened into which the user can enter the apartment number. Non-residential apartments have their own designation (MR). The number of an apartment, which does not exist in ADS, can also be entered into the search bar together with the address.

4.2.2. Historic addresses When the user searches by historic addresses (e.g. võidu väljak), the search results will still display the valid addresses, but the historic part of the address is shown in brackets in capital letters (e.g.Vabaduse väljak (VÕIDU VÄLJAK), Kesklinna linnaosa, Tallinna linn, Harju maakond).

Page 15: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 15

4.2.3. Filters

In case of an object-based search, it is possible to use additional filters in In-ADS component. There one can specify which object types are searched (only these types are shown, which are abled in component´s settings). It is also possible to limit the search with EHAK filter by entering the name to the EHAK search box and selecting the corresponding EHAK object from the list. In addition, it is also possible to draw a circle on the map and then objects only inside of the circle are searched. One can cancel the drawn area and the EHAK filter by pressing the clean button next to the filter buttons. One can also delete the cicle drawn on the map by pressing the draw button again. Filters are applied even when the filters block is closed.

5. In-ADS API Interacting with In-ADS widget happens via JavaScript interface. Various events

like selecting the address (that are implemented as DOM events) trigger In-ADS

widget to return JavaScript object with address data. The external system can

also invoke different In-ADS functions.

5.1. Functions The In-ADS widget includes the following functions:

5.1.1. hideResult()

Page 16: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 16

As after making the selection from the list of returned addresses, the list is

neither emptied nor hidden, the external system can do it, if so desired, by

invoking the function hideResult().

Example:

var inAadress = new InAadress({"mode":1, "container":"inAadress",

"baseLayers":["ALUSKAART"], "defaultBaseLayer":"ALUSKAART"})

document.addEventListener('addressSelected', function(e){

inAadress.hideResult();

});

This function can be used only with a mode of operation that contains the address search field (input parameter “mode” value 1, 2 or 3).

5.1.2. setAddress(address) input: address(String) – address text to be displayed User-selected address can also be set as a value of address search box by using the method setAddress(address). This method does not perform address search, it only sets a value of address search box. Example: var inAadress = new InAadress({"mode":1, "container":"inAadress",

"baseLayers":["ALUSKAART"], "defaultBaseLayer":"ALUSKAART",

"searchLayers":["KATASTRIYKSUS"]})

document.addEventListener('addressSelected', function(e){

var aadress = e.detail.aadress;

aadress = aadress.split(", ").reverse().join(", ");

inAadress.setAddress(aadress);

});

This function can be used only with a mode of operation that contains the address search field (input parameter “mode” value 1, 2 or 3).

5.1.3. showMap() When the widget is working in a mode in which the map is by default hidden (“mode” value 2), it is possible to show the map programmatically. E.g. if the

Page 17: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 17

user selects the address from the list, the address will be indicated also on the map, but the map will not be shown automatically. var inAadress = new InAadress({"mode":2, "container":"inAadress",

"baseLayers":["ALUSKAART"], "defaultBaseLayer":"ALUSKAART"})

document.addEventListener('addressSelected', function(e){

inAadress.showMap();

});

5.1.4. hideMap()

When the widget is working in a mode in which the map is by default hidden (“mode” value 2), it is possible to hide the map programmatically. Example: var inAadress = new InAadress({"mode":2, "container":"inAadress",

"baseLayers":["ALUSKAART"], "defaultBaseLayer":"ALUSKAART"})

document.addEventListener('addressSelected', function(e){

inAadress.hideMap();

});

5.1.5. searchAddress (ads_oid, bbox, kort_ads_oid)

input: ads_oid(Array) - array of values of the address object’s identifier (throughout all versions) to be searched and displayed on the map. Bbox(String) – sets the BBOX extent („minx,miny,maxx,maxy“) into which the objects will be displayed. Additionally that parameter can be set as a coefficient that multiplies the extent of the input address objects so that the overall extent will be accordingly wider. Kort_ads_oid(String) – if ads_oid parameter contains only one ads_oid value(building), then additionally apartment ads_oid can aslo be set. Then given aparment will be selected in the apartment combo (if apartment mode is used). When the widget is working in the mode in which there is only the map (“mode” value 4), it is possible to search address objects and display them on the map by using the function searchAddress(ads_oid). Example:

Page 18: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 18

var inAadress = new InAadress({"mode":4, "container":"inAadress",

"baseLayers":["ALUSKAART"], "defaultBaseLayer":"ALUSKAART"})

document.addEventListener('inaadressLoaded', function(e){

inAadress.searchAddress(["EE01708680","ME02768850"]);

});

5.1.6. setInfo(turnOn)

When the widget is working in the mode in which the map is included

(“mode” value 1, 2 or 4), it is possible to turn the information query on/off

programmatically.

Example:

var inAadress = new InAadress({"mode":1, "container":"inAadress",

"baseLayers":["ALUSKAART"], "defaultBaseLayer":"ALUSKAART"})

inAadress.setInfo(true);

5.1.7. toggleFullscreen (turnOn)

It is possible to turn on or off the full screen mode. The full screen mode can

be used only in the search with a map and in map view (mode=1 or mode=4).

Example:

var inAadress = new InAadress({"mode":1, "container":"inAadress",

"baseLayers":["ALUSKAART"], "defaultBaseLayer":"ALUSKAART"})

inAadress.toggleFullscreen(true);

5.1.8. pointAddressXY(x, y)

Function to request addresses by L-EST coordinates. Calling this function with

coordinates (x - 6 decimal places and y - 7 decimal places), addresses that are

found in there are displayed in the map. If no addresses are found then

„noResultXY“ event will be fired.

Example:

Page 19: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 19

var inAadress = new InAadress({"mode":1, "container":"inAadress",

"baseLayers":["ALUSKAART"], "defaultBaseLayer":"ALUSKAART"})

document.addEventListener('inaadressLoaded', function(e){

inAadress. pointAddressXY(6585772, 539399);

});

5.1.9. pointAddressLonLat(lon, lat)

Function to request addresses by geographic coordinates. Calling this function

with geographic coordinates lon and lat, addresses that are found in there are

displayed in the map. If no addresses are found then „noResultXY“ event will be

fired.

Example:

var inAadress = new InAadress({"mode":1, "container":"inAadress",

"baseLayers":["ALUSKAART"], "defaultBaseLayer":"ALUSKAART"})

document.addEventListener('inaadressLoaded', function(e){

inAadress. pointAddressLonLat(24.693720710505183,

59.40802641572147);

});

5.1.10. saveMap()

Function to save currently displayed map. Map picture is returned in Data URL

format by event „mapPictureReady“

Näide:

inAadress.saveMap();

document.addEventListener(mapPictureReady, function(e){

console.log(e.detail);

});

5.2. Events

Various activities trigger the In-ADS widget’s DOM customEvent events that

will be sent to the external system.

Page 20: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 20

5.2.1 mapPictureReady

Event is fired after calling the function „saveMap“. With this event map picture

in Data URL format are returned.

Example:

inAadress.saveMap();

document.addEventListener(mapPictureReady, function(e){

console.log(e.detail);

});

5.2.2 mapNavigate

The event will be invoked after every navigation on the map. Map BBOX

extent [minx, miny, maxx, maxy] will be included.

Example:

var inAadress = new InAadress({"mode":1, "container":"inAadress",

"baseLayers":["ALUSKAART"], "defaultBaseLayer":"ALUSKAART"})

document.addEventListener('mapNavigate', function(e){

alert("Kaardi BBOX: " + e.detail);

});

5.2.3 inaadressLoaded

The event will be invoked after initial loading of the In-ADS widget has been

completed. This event is useful in cases when after initializing the In-ADS

widget there is something to be done right afterwards. In this case the widget

can be called only after it has completed the loading.

Example:

var inAadress = new InAadress({"mode":1, "container":"inAadress",

"baseLayers":["ALUSKAART"], "defaultBaseLayer":"ALUSKAART"})

document.addEventListener('inaadressLoaded', function(e){

alert("Komponent lõptas laadimise.");

});

Page 21: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 21

5.2.4 addressSelected This event is to be called when triggered by the following actions:

the user has entered an address into the search field and chosen the address from the returned results

the user clicks on the address marker on the map (orange marker with a star)

the user selects an apartment from the list of apartments the user checks the option “other”, enters the flat number into the opened

box and presses the “OK” button the user clicks on the map on the location, where one object is found the user clicks on the map on the location, where there are several objects

of the same type, the user selects the desired object and presses the “choose address” button.

Example: var inAadress = new InAadress({"mode":1, "container":"inAadress",

"baseLayers":["ALUSKAART"], "defaultBaseLayer":"ALUSKAART"})

document.addEventListener('addressSelected', function(e){

var info = e.detail;

alert(„valitud aadress: “ + info.aadress);

});

5.2.5 noResultXY When a user clicks on the map or In-ADS functions „pointAddressXY“ or

„pointAddressLatLon“ are called and the query by the location point doesn´t

return any objects, In-ADS will forward this event to the external system.

5.3. Namespace support for events

In-ADS component has namespace support, meaning it is possible to add more

than one search box on a page. In this case, the events sent out by In-ADS search

boxes are distinguished.

Page 22: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 22

To use more than one In-ADS component on one page namespace parameter

has to be added to component settings.

For example:

var inAadress1 = new InAadress({"mode": "3", "container":"inAadress1",

"nocss": false,"namespace":"inAdsYks"});

var inAadress2 = new InAadress({"mode": "3", "container":"inAadress2",

"nocss": false,"namespace":"inAdsKaks"});

From the given example, to get events sent out from the first component:

document.addEventListener('addressSelected.inAdsYks', function(e){

console.log("first component response");

});

And to get events from the second component:

document.addEventListener('addressSelected.inAdsKaks', function(e){

console.log("second component response");

});

5.4. Input description

While creating the In-ADS widget, JSON object that configures the mode of operation and general functionality of In-ADS, must be supplied. The object may have the following properties: Property Description Com-

pulsory

container ID value of a DIV element, into which the In-ADS widget will be placed

yes

mode Mode in which the In-ADS widget operates. Possible values: 1 – address search bar with a map, 2 – address search bar with a map (by default hidden), 3 – only address search bar, 4 – only map

yes

searchLayers What type of objects are searched for. Without value, search is address-based, with

no

Page 23: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 23

value object-based. These are Array type properties the enabled elements of which are: „EHITISHOONE“, „KATASTRIYKSUS“, „TANAV“, „VAIKEKOHT“ and „EHAK“

unHoone When searchLayers parameter includes the value EHITISHOONE, it is possible to additionally filter search results in a way that only buildings with UN identifier (unique address) are searched for. Value options: false – all buildings are searched (by default), true – only buildings with UN identifier are searched.

no

baseLayers Which base layer options are enabled on the map. These are Array type properties the enabled elements of which are: „ALUSKAART“, „ORTOFOTO“ and „HYBRIID“. When the mode of operation does not include a map, this property has no value.

yes

defaultBaseLayer Default base layer sets which of the base layers is selected on the map by default. Possible values are „ALUSKAART“, „ORTOFOTO“ or „HYBRIID“.

yes

mapLayers Additional layers to be displayed on the map. In addition to the background map, it is possible to display also cadastral parcels and/or addresses. These are Array type properties the enabled elements of which are: “KATASTRIYKSUS“ and „AADRESSID“.

no

appartment Sets whether apartments are searched or not. Value options are: 0 – apartments are not searched (default value), 1 – apartments are searched, 2 – apartments are searched and entering of a non-existing apartment is also allowed.

no

ads_oid When the mode value is 4 (only map), array of values of the address object’s identifier (throughout all versions) to be displayed on the map can be predefined.

no

Page 24: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 24

Bbox When the mode value is 4 (only map), this parameter can predefine the BBOX extent („minx,miny,maxx,maxy“) into which the search result will be displayed. The parameter can also have a numeric value (bbox- multiplier). In the latter case the extent of the input address objects will be multiplied so that the overall extent will be accordingly wider.

no

nocss In order to use the In-ADS widget with a different style, this parameter shall be set to true. Value options are: false – css file is loaded (default value), true – css file is not loaded.

no

lang Language parameter. By default Estonian - „et“, English is also possible – „en“ and Russian - „ru“

no

fullscreenMode This parameter enables to display the In-ADS widget in full screen mode. Value options are: true – full screen view, false – displayed as big as the container element into which it is displayed

no

showScale When the value is set to true, scale will be displayed on the map. Default value is false. The parameter is considered only when In-ADS is used with a map.

no

WMS A possibility to display on the In-ADS map additional WMS layers. Value is a list of WMS addresses, which must include also the list of layers and version number. E.g.: [„http://kaart.maaamet.ee/wms/aadressid?version=1.1.1&layers=ads_hoone,ads_hoone_aadr“]

no

tools A possibility to display on the map additional tools. Currently only the measuring tool is supported. Value is the list of tool names: "tools":[ "measure"]

no

Page 25: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 25

noInfo When value is set to true, the information query button will not be displayed on the map.

no

noAddressMapSelect When value is set to true, addresses cannot be selected by clicking on the map.

no

markers With this parameter it is possible to display points on the map together with the marker. Value is the object with properties bbox and addresses. E.g. "markers": {"bbox": [538177.357, 6582037.5351055, 546223.513, 6588825.5648945], "addresses": [{"x": "6583487.10", "y": "538847.87", "title": "Punkti märgend" }]}

no

ihist Weather to search from historic addresses. Value is year number (eg 1993) from which addresses are searched. By default, if no parameter value are given, all historic addresses are included in search. If value is 0, then historic addresses are excluded.

no

labelMode If points are displayed in map using “markers” parameter then with this parameter you can specify whether to display “title” value in the label, tooltip or both. When both are selected, then using | symbol in “title” value the text before | are displayed in label and the text after in tooltip. Properti values are “tooltip”, “label” and “label-tooltip”.

no

Example:

var inAadress = new InAadress({"container":"inAadress", "mode":1,

appartment:1, searchLayers:["EHAK", "EHITISHOONE"],

"baseLayers":["ALUSKAART","HYBRIID"], "defaultBaseLayer":"ALUSKAART",

mapLayers:["KATASTRIYKSUS", "AADRESSID"]});

5.5. Output description

Page 26: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 26

As the result of various activities data about address object(s) selected by the user will be sent to the external system. Input data will be transmitted via DOM customEvent events. The name of event is „addressSelected“ and JSON object, containing address data, will be supplied. Example: document.addEventListener('addressSelected', function(e){

var info = e.detail;

alert(„valitud aadress: “ + info.aadress);

});

The event “addressSelected”is to be called when triggered by the following actions:

the user has entered an address into the search field and chosen the address from the returned results

the user clicks on the address marker on the map (orange marker with a star)

the user selects an apartment from the list of apartments the user checks the option “other”, enters the flat number into the opened

box and presses the “OK” button the user clicks on the map on the location, where one object is found the user clicks on the map on the location, where there are several objects

of the same type, the user selects the desired object and presses the “choose address” button.

The structure of output JSON object varies, depending on the chosen priority of search. The possible search priorities are:

address-based search - the value of input parameter „searchLayers“ is empty and the search result displays found addresses

object-based search - the value of input parameter „searchLayers“ is set and the result displays address objects.

5.5.1. Output of object-based search

Page 27: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 27

In case of object-based search and selection of object on the map JSON object has the following structure: {

"aadress": "Harju maakond, Tallinna linn, Põhja-Tallinna linnaosa,

Kolde pst 8",

"paadress": "Kolde pst 8, Põhja-Tallinna linnaosa, Tallinna linn,

Harju maakond",

"lahiaadress": "Kolde pst 8",

"asum": "Pelgulinn",

"sihtnumber": "10319",

"poid": [],

"liik": "EE",

"orig_tunnus": "EE02859899",

"ads_oid": "EE02859899",

"koodaadress": "377840614000004CW000061FK00000000",

"ehak": "0614",

"ehakov": "0784",

"ehakmk": "0037",

"adob_id": "5069468",

"adr_id": "1256896",

"un_tunnus": "1",

"x": "539625",

"y": "6587225",

"b": "59.4421660793596",

"l": "24.716992684228316",

"kood4": "0000",

"kood5": "04CW",

"kood6": "0000",

"kood7": "61FK",

"maakond": "Harju maakond",

"omavalitsus": "Tallinn",

"asustusyksus": "Põhja-Tallinna linnaosa",

"vaikekoht": "",

"liikluspind": "Kolde pst",

"nimi": "",

"aadress_nr": "8",

"paralleelaadress": "Harju maakond, Tallinna linn, Põhja-Tallinna

linnaosa, Kolde pst 8//Harju maakond, Tallinna linn, Põhja-Tallinna

linnaosa, Kolde pst 10",

"seotud": [

{

"aadress": "Harju maakond, Tallinna linn, Põhja-Tallinna

linnaosa, Kolde pst 10",

"paadress": "Kolde pst 10, Põhja-Tallinna linnaosa, Tallinna linn,

Harju maakond",

"lahiaadress": "Kolde pst 10",

"liik": "EE",

"orig_tunnus": "EE02859899",

"koodaadress": "377840614000004CW000061FK00000000",

"ehak": "0614",

"ehakov": "0784",

Page 28: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 28

"ehakmk": "0037",

"ads_oid": "EE02859899",

"adob_id": "5069468",

"adr_id": "1256890",

"un_tunnus": "1",

"asum": " Pelgulinn ",

"poid": [],

"sihtnumber": "10319",

"x": "539625",

"y": "6587225",

"b": "59.4421660793596",

"l": "24.716992684228316",

"kood4": "0000",

"kood5": "04CW",

"kood6": "0000",

"kood7": "61FJ",

"maakond": "Harju maakond",

"omavalitsus": "Tallinn",

"asustusyksus": "Põhja-Tallinna linnaosa",

"vaikekoht": "",

"liikluspind": "Kolde pst",

"nimi": "",

"aadress_nr": "6"

},

]

}

When also apartment search is allowed and the user has searched an apartment, the output includes apartment data. Example: {

"aadress": "Harju maakond, Tallinna linn, Mustamäe linnaosa,

Mustamäe tee 161-7",

"paadress": "Mustamäe tee 161-7, Mustamäe linnaosa, Tallinna linn,

Harju maakond",

"lahiaadress": "Mustamäe tee 161-7",

"liik": "ER",

"kort_nr": "7",

"orig_tunnus": "101021169-2185990",

"koodaadress": "37784048200000JVC00003DGJ00000000",

"ehak": "0482",

"ehakov": "0784",

"ehakmk": "0037",

"ads_oid": "ER01730094",

"adob_oid": "5069468",

"adr_id": "1256890",

"hoone_ads_oid": "EE01655830",

"un_tunnus": "1",

Page 29: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 29

"x": "538903",

"y": "6585681",

"b": "59.407255366342945",

"l": "24.6849716045393",

"kood4": "0000",

"kood5": "0JVC",

"kood6": "0000",

"kood7": "3DGJ",

"kood8": "AM84",

"maakond": "Harju maakond",

"omavalitsus": "Tallinn",

"asustusyksus": "Mustamäe linnaosa",

"vaikekoht": "",

"liikluspind": "Mustamäe tee",

"nimi": "",

"aadress_nr": "161"

}

Unlike the building, there is an additional field kort_nr containing apartment number. Additionally, just like in case of building, there may be fields paralleelaadress, provided there are several apartments with the same ads_oid value. In case entering of new apartments is enabled and the user has entered a new apartment, which does not exist in ADS, the output displays the selected building’s data and the entered apartment is in the field kort_nr. Besides, there is a field uus_kort with value true, which defines that it is an apartment non-existing in ADS. Example: {

"aadress": "Harju maakond, Tallinna linn, Mustamäe linnaosa,

Mustamäe tee 161",

"paadress": "Mustamäe tee 161, Mustamäe linnaosa, Tallinna linn,

Harju maakond",

"lahiaadress": "Mustamäe tee 161",

"liik": "EE",

"kort_nr": "999",

"uus_kort": "true",

"orig_tunnus": "101021169",

"koodaadress": "37784048200000JVC00003DGJ00000000",

"ehak": "0482",

"ehakov": "0784",

Page 30: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 30

"ehakmk": "0037",

"ads_oid": "EE01655830",

"adob_oid": "5069468",

"adr_id": "220380",

"un_tunnus": "1",

"x": "538903",

"y": "6585681",

"b": "59.407255366342945",

"l": "24.6849716045393",

"kood4": "0000",

"kood5": "0JVC",

"kood6": "0000",

"kood7": "3DGJ",

"kood8": "undefined",

"maakond": "Harju maakond",

"omavalitsus": "Tallinn",

"asustusyksus": "Mustamäe linnaosa",

"vaikekoht": "",

"liikluspind": "Mustamäe tee",

"nimi": "",

"aadress_nr": "161"

}

Descriptions of properties Property Description aadress Full address of object paadress Full address of object in reversed order lahiaadress Proximate address of object liik Code of object type in ADS information system orig_tunnus Object identifier ads_oid Value of address object identifier (throughout all

versions) adr_id Technical identifier of address in ADS adob_id Value of address object identifier hoone_ads_oid When the found object is part of building (apartment),

this parameter shows the ads_oid value of the building in which the given part of building is located.

un_tunnus Indicates whether the object has a uniqueness requirement.

kort_nr Apartment number uus_kort An apartment non-existing in ADS. koodaadress Code made of codes of address classifiers

Page 31: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 31

ehak Code of settlement unit ehakov Code of local government ehakmk Code of county kood4 Code of territorial unit kood5 Code of traffic space kood6 Code of name kood7 Code of address number kood8 Code of apartment number maakond Name of county omavalitsus Name of local government asustusüksus Name of settlement unit vaikekoht Name of territorial unit liikluspind Name of traffic space nimi Name aadress_nr Address number X L-EST x coordinate (6 decimal places) of object’s

reference point Y L-EST y coordinate (7 decimal places) of object’s

reference point B Geographic coordinate of object’s reference point –

north latitude L Geographic coordinate of object’s reference point – east

longitude mapx When the user clicked on the map and selected an object,

the output includes the chosen location’s L-EST x coordinate (6 decimal places)

mapy When the user clicked on the map and selected an object, the output includes the chosen location’s L-EST y coordinate (7 decimal places)

paralleelaadress In case of a parallel address (in output there are more than one object with the same ADS_OID value), the value is parallel address (separated by a double-slash „//“). When there is only one object, the parameter is omitted.

seotud The rest of objects with the same ADS_OID value. When there is only one object, the parameter is omitted.

asum Settelment name sihtnumber Postal code poid Point of interest

Page 32: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 32

5.5.2. Output of address-based search

In case of address-based search the JSON object has the following structure: {

[{

"aadress": "Harju maakond, Tallinn, Põhja-Tallinna

linnaosa, Kolde pst 8",

"paadress": "Kolde pst 8, Põhja-Tallinna linnaosa,

Tallinn, Harju maakond",

"lahiaadress": "Kolde pst 8",

"liik": "EE",

"orig_tunnus": "101037029-3",

"ads_oid": "EE03730242",

"adob_id": "9686685",

"adr_id": "2205044",

"koodaadress": "377840614000004CW000061FK00000000",

"ehakmk": "37",

"ehakov": "784",

"ehak": "614",

"kood4": "0000",

"kood5": "04CW",

"kood6": "0000",

"kood7": "61FK",

"maakond": "Harju maakond",

"omavalitsus": "Tallinn",

"asustusyksus": "Põhja-Tallinna linnaosa",

"vaikekoht": "",

"liikluspind": "Kolde pst",

"nimi": "",

"aadress_nr": "8",

"un_tunnus": "1",

"asum": "Pelgulinn",

"sihtnumber": "10319",

"poid": [],

"x": "6589587.14",

"y": "540676.16",

"b": "59.4421485117024",

"l": "24.7169218121002",

"primary": "true"

},{

"aadress": "Harju maakond, Tallinn, Põhja-Tallinna

linnaosa, Kolde pst 8",

"paadress": "Kolde pst 8, Põhja-Tallinna linnaosa,

Tallinn, Harju maakond",

Page 33: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 33

"lahiaadress": "Kolde pst 8",

"liik": "CU",

"orig_tunnus": "78401:101:4011",

"ads_oid": "CU03702823",

"adob_id": "9613479",

"adr_id": "2205044",

"koodaadress": "377840614000004CW000061FK00000000",

"ehakmk": "37",

"ehakov": "784",

"ehak": "614",

"kood4": "0000",

"kood5": "04CW",

"kood6": "0000",

"kood7": "61FK",

"maakond": "Harju maakond",

"omavalitsus": "Tallinn",

"asustusyksus": "Põhja-Tallinna linnaosa",

"vaikekoht": "",

"liikluspind": "Kolde pst",

"nimi": "",

"aadress_nr": "8",

"un_tunnus": "1",

"asum": "Pelgulinn",

"sihtnumber": "10319",

"poid": [],

"x": "6589604.80",

"y": "540671.83",

"b": "59.4423104582086",

"l": "24.7168547071055",

"paralleelaadress": "Harju maakond, Tallinn, Põhja-

Tallinna linnaosa, Kolde pst 4 // 6 // 8 // 10",

"seotud": [{

"aadress": "Harju maakond, Tallinn, Põhja-Tallinna

linnaosa, Kolde pst 4",

"paadress": "Kolde pst 4, Põhja-Tallinna linnaosa,

Tallinn, Harju maakond",

"lahiaadress": "Kolde pst 4",

"liik": "CU",

"orig_tunnus": "78401:101:4011",

"koodaadress": "377840614000004CW000061FE00000000",

"ehakmk": "37",

"ehakov": "784",

"ehak": "614",

"kood4": "0000",

"kood5": "04CW",

"kood6": "0000",

"kood7": "61FE",

"maakond": "Harju maakond",

Page 34: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 34

"omavalitsus": "Tallinn",

"asustusyksus": "Põhja-Tallinna linnaosa",

"vaikekoht": "",

"liikluspind": "Kolde pst",

"nimi": "",

"aadress_nr": "4",

"un_tunnus": "1",

"ads_oid": "CU03702823",

"adob_id": "9613479",

"adr_id": "2205041",

"asum": "Pelgulinn",

"sihtnumber": "10319",

"poid": [],

"x": "6589604.80",

"y": "540671.83",

"b": "59.4423104582086",

"l": "24.7168547071055"

},{

"aadress": "Harju maakond, Tallinn, Põhja-Tallinna

linnaosa, Kolde pst 6",

"paadress": "Kolde pst 6, Põhja-Tallinna linnaosa,

Tallinn, Harju maakond",

"lahiaadress": "Kolde pst 6",

"liik": "CU",

"orig_tunnus": "78401:101:4011",

"koodaadress": "377840614000004CW000061FJ00000000",

"ehakmk": "37",

"ehakov": "784",

"ehak": "614",

"kood4": "0000",

"kood5": "04CW",

"kood6": "0000",

"kood7": "61FJ",

"maakond": "Harju maakond",

"omavalitsus": "Tallinn",

"asustusyksus": "Põhja-Tallinna linnaosa",

"vaikekoht": "",

"liikluspind": "Kolde pst",

"nimi": "",

"aadress_nr": "6",

"un_tunnus": "1",

"ads_oid": "CU03702823",

"adob_id": "9613479",

"adr_id": "2319566",

"asum": "Pelgulinn",

"sihtnumber": "10319",

"poid": [],

"x": "6589604.80",

Page 35: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 35

"y": "540671.83",

"b": "59.4423104582086",

"l": "24.7168547071055"

},{

"aadress": "Harju maakond, Tallinn, Põhja-Tallinna

linnaosa, Kolde pst 10",

"paadress": "Kolde pst 10, Põhja-Tallinna linnaosa,

Tallinn, Harju maakond",

"lahiaadress": "Kolde pst 10",

"liik": "CU",

"orig_tunnus": "78401:101:4011",

"koodaadress": "377840614000004CW000061FL00000000",

"ehakmk": "37",

"ehakov": "784",

"ehak": "614",

"kood4": "0000",

"kood5": "04CW",

"kood6": "0000",

"kood7": "61FL",

"maakond": "Harju maakond",

"omavalitsus": "Tallinn",

"asustusyksus": "Põhja-Tallinna linnaosa",

"vaikekoht": "",

"liikluspind": "Kolde pst",

"nimi": "",

"aadress_nr": "10",

"un_tunnus": "1",

"ads_oid": "CU03702823",

"adob_id": "9613479",

"adr_id": "2205045",

"asum": "Pelgulinn",

"sihtnumber": "10319",

"poid": [],

"x": "6589604.80",

"y": "540671.83",

"b": "59.4423104582086",

"l": "24.7168547071055"

}]

}]

}

When also apartment search is allowed and the user has searched an apartment, the output includes apartment data similar to the object-based search. The output of address-based search consists of an array, which contains one or more output objects of the object-based search.

Page 36: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 36

However, when the user selects the object on the map, the structure of output is object-based (see 5.4.1 Output of object-based search). Descriptions of properties Property Description aadress Full address of object paadress Full address of object in reversed order lahiaadress Proximate address of object liik Code of object type in ADS information system orig_tunnus Object identifier ads_oid Value of address object identifier (throughout all

versions) adob_id Value of address object identifier adr_id Technical identifier of address in ADS hoone_ads_oid When the main data are apartment’s data, this

parameter shows the ads_oid value of the building. un_tunnus Indicates whether the object has a uniqueness

requirement. kort_nr Apartment number uus_kort An apartment non-existing in ADS. koodaadress Code made of codes of address classifiers ehak Code of settlement unit ehakov Code of local government ehakmk Code of county kood4 Code of territorial unit kood5 Code of traffic space kood6 Code of name kood7 Code of address number kood8 Code of apartment number maakond Name of county omavalitsus Name of local government asustusüksus Name of settlement unit vaikekoht Name of territorial unit liikluspind Name of traffic space nimi Name aadress_nr Address number

Page 37: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 37

primary Shows whether the object is of the highest priority (it can be also several objects).

X L-EST x coordinate (6 decimal places) of object’s reference point

Y L-EST y coordinate (7 decimal places) of object’s reference point

B Geographic coordinate of object’s reference point – north latitude

L Geographic coordinate of object’s reference point – east longitude

mapx When the user clicked on the map and selected an object, the output includes the chosen location’s L-EST x coordinate (6 decimal places)

mapy When the user clicked on the map and selected an object, the output includes the chosen location’s L-EST y coordinate (7 decimal places)

paralleelaadress In case of a parallel address (in output there are more than one object with the same ADS_OID value), the value is parallel address (separated by a double-slash „//“). When there is only one object, the parameter is omitted.

seotud The rest of objects with the same ADS_OID value. When there is only one object, the parameter is omitted.

asum Settelment name sihtnumber Postal code poid Point of interest

Page 38: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 38

6. In-ADS editor API

The In-ADS widget can also be used as a simple map editor tool. For this purpose instead of the script inaadress.min.js the script editor.min.js shall be used. <script type="text/javascript" src="

http://inaadress.maaamet.ee/inaadress/js/editor.min.js"></script>

6.1. Drawing and editing

This component enables drawing of simple shapes on the map. By activating the editor, additional buttons for drawing and editing will be displayed on the map (one tool button is displayed, by hovering the mouse over it, two buttons will appear, or three - when measuring is also in use). With the input parameter drawing it is possible to set the drawing button to be turned on by default while activating the editor. The input parameter geomType defines which type of features (point, line, polygon) are allowed to be added (value can be set to only one of them), the parameter multiGeom defines whether drawing of multipoint, multiline or multipolygon features is allowed or not. The parameter format defines in what format geometry will be kept (values GML, KML or GeoJSON) and the parameter editStyle defines the style of the feature to be edited. In drawing mode points can be added on the map. A double-click will end drawing. After drawing has been completed, the event featureAdded together with the drawn shape and current BBOX will be passed to the external system. By selecting the editing tool, it is possible to edit the existing features. In case of multigeometry, after choosing the feature it will be possible to add points (by grabbing a virtual point between two points and dragging the new point to a desired location), to modify (by dragging the existing point), to delete (by hovering the mouse over the point and pressing delete key or by clicking on the point, which opens a dialogue box and then pressing yes button), or to move the shape (by grabbing the red point in the middle of the shape and moving it to a desired place) and to rotate (by grabbing the red point in the shape’s bottom right corner and rotating the shape). Each modification triggers the

Page 39: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 39

event featureModified, which together with geometry is passed to the external system.

6.2. Redisplay of existing shape on the map

To display the existing shape as editable on the map, the In-ADS editor has an input parameter geomObject, which provides the geometry and, if desired, also alpha-numeric data of the object to be edited in GML, KML or GeoJSON formats. In case when multiple geometry objects are given, only the first one is used and others will be ignored. Further, the styling will be supplied by populating the editStyle parameter (see 6.3 Style) and geometry by populating the format parameter (see 6.1 Drawing and editing). In KML or GeoJSON formats style can be contained also in geomObject data and there is no need to use the editStyle parameter. If GML, KML or GeoJSON text data contain the name field, its value will be displayed on the map into a tooltip. All text data that the object had in its input data will be returned to the external system unchanged. By default the map window will zoom to the object, but optionally also the BBOX extent could be given instead. When the editor component has already been created, the object to be edited can be set with the function setGeomObject(geomObject, fit). Calling this function will remove the previous editable object and replace it with a new one, the fit parameter sets whether to fit the object in the map window or not. Calling this function will automatically change the value of the geomType parameter according to the type of geometry of the object that was loaded into the In-ADS editor.

6.3. Style For styling the In-ADS editor has an input parameter editStyle, which defines the style of the object to be edited. The following attributes can be set: stroke width, stroke colour, stroke opacity, fill colour and fill opacity. In case of a point feature the icon’s url, its height and width and x,y offsets from point can be set. In KML format the following descriptions are supported: LineStyle, PolyStyle and IconStyle along with the attributes strokeColor, strokeWidth, fillColor. In case of icon elements thefollowing attributes are supported: scale, href (icon’s url), hotSpot (icon’s positioning), w (width) and h (height).

Page 40: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 40

In GeoJSON format style can be set with the object features parameter style. The

following attributes are supported: fill, fill-opacity, stroke, stroke-opacity,

stroke-width, marker, marker-width, marker-height, marker-x and marker-y.

6.4. Input description For the creation of the In-ADS editor, JavaScript object configuring the mode of operation and functionality of the editor must be supplied. This section lists only the input parameters that are related to the editor. All input parameters of the In-ADS widget are valid also for the editor, except that of mode, which need not to be included and the default value of which is 1. If the parameter is provided, the value options are 1, 2 or 4. The object may have the following properties: Property Description Com-

pulsory format In which format geometry is kept. Possible

values are: GML, GeoJSON or KML Yes

geomType Which type of geometries can be drawn. Possible values are: point, line or polygon. Without value drawing and editing are not allowed

no

multiGeom Are multipoint, multiline or multipolygon geometries allowed. When value is true, allowed, false not allowed.

no

drawing Is the drawing tool by default turn on. By default false.

no

editStyle Style of editable object. Value is the object with parameters fillColor, fillOpacity, strokeColor, strokeOpacity, strokeWidth. In case of point object the icon object with parameters externalGraphic, graphicWidth, graphicHeight, graphicXOffset and graphicYOffset

no

geomObject This parameter is for displaying the existing object on the map and editing it. Value is data in KML, GML or GeoJSON format.

no

Page 41: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 41

vectorObjects With this parameter vector objects to be displayed to the background layer can be supplied. Value is the object with parameters features and style

no

mode In which mode the In-ADS editor operates. Possible values: 1 – address search with a map, 2 – address search with a map (by default hidden), 4 – only map. Default value is 1

no

noInfo When value is set to true, the information query button will not be displayed on the map.

no

noAddressMapSelect When value is set to true, addresses cannot be selected by clicking on the map

no

labelMode Whether to display the value of attribute „name“ (if existing) as a „tooltip“, which will be displayed with mouse over the object, or as a „label“, which is visible all the time. Default value is „tooltip“

no

Example: creation of editor in editing mode:

var editor = new InAadressEditor({

"container": "inAadressEditor",

"searchLayers": ["EHAK", "TANAV", "KATASTRIYKSUS", "EHITISHOONE"],

"appartment": 2,

"defaultBaseLayer": "ALUSKAART",

"baseLayers": ["ALUSKAART", "ORTOFOTO", "HYBRIID"],

"mapLayers": ["KATASTRIYKSUS"],

"format": "GeoJSON",

"drawing": true,

"geomType": "polygon",

"multiGeom": false,

"editStyle": {

"fillColor": "#FF0000",

"fillOpacity": "0.5",

"strokeColor": "#000000",

"strokeOpacity": "0.9",

"strokeWidth": "2"

}

});

Page 42: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 42

Example: creation of editor with the existing object:

var editor = new InAadressEditor({

"container": "inAadressEditor",

"searchLayers": ["EHAK", "KATASTRIYKSUS", "EHITISHOONE"],

"appartment": 1,

"defaultBaseLayer": "ALUSKAART",

"baseLayers": ["ALUSKAART", "HYBRIID"],

"mapLayers": ["KATASTRIYKSUS"],

"format": "GeoJSON",

"drawing": true,

"geomType": "point",

"multiGeom": false,

"editStyle": {

"icon": {

"url": "http://www.maaamet.ee/mingipilt.jpeg",

"width": "5",

"height": "5",

"offsetX": "2.5",

"offsetY": "5"

}

},

"geomObject":'{ "type": "Feature","crs": {"type":

"EPSG","properties": {"code": 3301}}, "geometry": { "type": "Point",

"coordinates": [553348.00,6549719.00] }, "properties": { "id":

"43242342", "name": "Rapla maakond, Juuru vald" } } '

});

Example: creation of editor with the existing object and background objects:

var editor = new InAadressEditor({

"container": "inAadressEditor",

"searchLayers": ["EHAK", "KATASTRIYKSUS", "EHITISHOONE"],

"defaultBaseLayer": "ALUSKAART",

"baseLayers": ["ALUSKAART", "HYBRIID"],

"mapLayers": ["KATASTRIYKSUS"],

"format": "KML",

"drawing": true,

"geomType": "point",

"multiGeom": false,

"editStyle": {

"icon": {

"url": "http://www.maaamet.ee/mingipilt.jpeg",

"width": "5",

"height": "5",

"offsetX": "2.5",

"offsetY": "5"

}

},

"geomObject": '<kml

Page 43: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 43

xmlns="http://earth.google.com/kml/2.0"><Folder><Placemark><name>In-

ADS

objekt</name><description></description><Polygon><outerBoundaryIs><Lin

earRing><coordinates>24.740883962707063,59.26222421101938

24.732390676709784,59.259138493920666

24.73454138863876,59.25650665686456

24.739755794044772,59.2564259419782

24.744922230279386,59.25875961687041

24.746092526240563,59.261835070649006

24.740883962707063,59.26222421101938</coordinates></LinearRing></outer

BoundaryIs></Polygon></Placemark></Folder></kml>',

"vectorObjects": {

"style": {

"fillColor": "#FFDD00",

"fillOpacity": ".3",

"strokeColor": "#DDCC00",

"strokeOpacity": "1",

"strokeWidth": "3",

"icon": {

"url": "http://www.maaamet.ee/mingiteinepilt.jpeg",

"width": "12",

"height": "24",

"offsetX": "11",

"offsetY": "24"

}

},

"features":'<kml

xmlns="http://earth.google.com/kml/2.0"><Folder><Placemark><name>In-

ADS

objekt</name><description></description><Polygon><outerBoundaryIs><Lin

earRing><coordinates>24.711529329885064,59.26720299081251

24.72007574156815,59.26279192768968

24.703948375081254,59.25781691306184

24.698696713684345,59.26220939609133

24.711529329885064,59.26720299081251</coordinates></LinearRing></outer

BoundaryIs></Polygon></Placemark></Folder></kml>'

}

});

6.5. Functions

6.5.1. setGeomObject(geomObject, fit)

With this function you can read the object to editor. Function parameters are editable object in KML, GML or GeoJSON format and weather or not to fit the object. Example:

Page 44: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 44

var editor = new InAadressEditor({

"container": "inAadressEditor",

"searchLayers": ["KATASTRIYKSUS", "EHITISHOONE"],

"defaultBaseLayer": "ALUSKAART",

"baseLayers": ["ALUSKAART", "ORTOFOTO", "HYBRIID"],

"mapLayers": ["KATASTRIYKSUS"],

"format": "KML",

"geomType": "polygon",

"multiGeom": false,

"editStyle": {

"fillColor": "#FF0000",

"fillOpacity": "0.5",

"strokeColor": "#000000",

"strokeOpacity": "0.9",

"strokeWidth": "2"

}

});

document.addEventListener('inaadressLoaded', function(e){

editor.setGeomObject('<kml

xmlns="http://earth.google.com/kml/2.0"><Folder><Placemark><name>In-

ADS

objekt</name><description></description><Polygon><outerBoundaryIs><Lin

earRing><coordinates>24.711529329885064,59.26720299081251

24.72007574156815,59.26279192768968

24.703948375081254,59.25781691306184

24.698696713684345,59.26220939609133

24.711529329885064,59.26720299081251</coordinates></LinearRing></outer

BoundaryIs></Polygon></Placemark></Folder></kml>', true);

});

6.5.2. sectVectorObjects(features, style, fit)

With this function you can read the object(s) to background layer. Function parameters are object(s) in KML, GML or GeoJSON format, layer style and weather or not to fit the object(s). Example: var editor = new InAadressEditor({

"container": "inAadressEditor",

"searchLayers": ["KATASTRIYKSUS", "EHITISHOONE"],

"defaultBaseLayer": "ALUSKAART",

"baseLayers": ["ALUSKAART", "ORTOFOTO", "HYBRIID"],

"mapLayers": ["KATASTRIYKSUS"],

"format": "KML",

"geomType": "polygon",

Page 45: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 45

"multiGeom": false

});

document.addEventListener('inaadressLoaded', function(e){

editor.setVectorObjects('<kml

xmlns="http://earth.google.com/kml/2.0"><Folder><Placemark><name>In-

ADS

objekt</name><description></description><Polygon><outerBoundaryIs><Lin

earRing><coordinates>24.711529329885064,59.26720299081251

24.72007574156815,59.26279192768968

24.703948375081254,59.25781691306184

24.698696713684345,59.26220939609133

24.711529329885064,59.26720299081251</coordinates></LinearRing></outer

BoundaryIs></Polygon></Placemark></Folder></kml>', {

"fillColor": "#FF0000",

"fillOpacity": "0.5",

"strokeColor": "#000000",

"strokeOpacity": "0.9",

"strokeWidth": "2"

});

});

6.5.3. getInADS()

Returns In-ADS object. The function can be called after the inaadressLoaded event.

6.6. Events

6.6.1. featureAdded

The event is invoked after the drawing of object has ended. Data in KML, GML or GeoJSON formats and map BBOX (minx, miny, maxx, maxy) are supplied. Example: var editor = new InAadressEditor({

"container": "inAadressEditor",

"searchLayers": ["KATASTRIYKSUS", "EHITISHOONE"],

"defaultBaseLayer": "ALUSKAART",

"baseLayers": ["ALUSKAART", "ORTOFOTO", "HYBRIID"],

"mapLayers": ["KATASTRIYKSUS"],

"format": "KML",

"geomType": "polygon",

"multiGeom": false

});

document.addEventListener(featureAdded, function(e){

alert("Objekti andmed: " + e.detail.feature);

Page 46: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 46

alert("Kaardi BBOX: " + e.detail.bbox);

});

6.6.2. featureModified

The event is invoked after each modification of shape (adding, moving or deleting a point, also moving and rotating a shape). Data in KML, GML or GeoJSON formats and map BBOX (minx, miny, maxx, maxy) are supplied. Example: var editor = new InAadressEditor({

"container": "inAadressEditor",

"searchLayers": ["KATASTRIYKSUS", "EHITISHOONE"],

"defaultBaseLayer": "ALUSKAART",

"baseLayers": ["ALUSKAART", "ORTOFOTO", "HYBRIID"],

"mapLayers": ["KATASTRIYKSUS"],

"format": "KML",

"geomType": "polygon",

"multiGeom": false

});

document.addEventListener('featureModified', function(e){

alert("Objekti andmed: " + e.detail.feature);

alert("Kaardi BBOX: " + e.detail.bbox);

});

6.6.3. featureSelected

The event is invoked when the modes of drawing and editing are not activated (the button is turned off) and the user clicks on an object that has the id field with accumulated value. Selected object’s id field is also supplied to callback function. Example:

var editor = new InAadressEditor({

"container": "inAadressEditor",

"searchLayers": ["KATASTRIYKSUS", "EHITISHOONE"],

"defaultBaseLayer": "ALUSKAART",

"baseLayers": ["ALUSKAART", "ORTOFOTO", "HYBRIID"],

"mapLayers": ["KATASTRIYKSUS"],

"format": "KML",

"geomType": "polygon",

"multiGeom": false

});

Page 47: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 47

document.addEventListener('featureSelected', function(e){

alert("Valitud objekt: " + e.detail.id);

});

Page 48: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 48

7. In-ADS style

If the user is willing to change the appearance of the widget, it’s possible to check the option to use a custom CSS file. If this option is selected, the widget’s CSS file is not used (“nocss”:true) (see 5.3 Input description). As the widget uses jQueryMobile (version 1.4.3) layout, the use of a respective CSS file is recommended in order to make the creation of custom layout easier. The CSS file is available at http://inaadress.maaamet.ee/inaadress/theme/default/jquery.mobile-1.4.3.css If so desired, also the jQueryMobile TheremeRoller tool (http://themereroller.jquerymobile.com) can be used. This tool enables an easy styling of all kinds of jQueryMobile widgets and a generation of a respective CSS file. While using TheremeRoller, besides the addition of CSS file, also the jQuery and jQueryMobile JavaScript files must be added to the header. Example: <link rel="stylesheet"

href="http://code.jquery.com/mobile/1.4.3/jquery.mobile.structure-

1.4.3.min.css" />

<script type="text/javascript" src="

http://inaadress.maaamet.ee/inaadress/js/jquery.min.js"></script>

<script type="text/javascript" src="

http://inaadress.maaamet.ee/inaadress/js/jquery.mobile-

1.4.3.min.js"></script>

<script type="text/javascript" src="

http://inaadress.maaamet.ee/inaadress/js/inaadress.min.js"></script>

Page 49: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 49

8. Description of gazetteer service

The In-ADS gazetteer JSON service is available at: http://inaadress.maaamet.ee/inaadress/gazetteer

For interaction the service uses JSONP protocol. The parameter name, which defines the function to be called, is callback. Without this parameter JSON object is returned from service. The In-ADS gazetteer XML service is available at: http://inaadress.maaamet.ee/inaadress/service

8.1. Input description

The input parameters of the services are as following:

Parameter Description Compulsory callback A function called to pass the result no address Address text to be searched. Compulsory,

except when x and y or adsoid parameter have values. The value can be a searchable address text, cadastral number, EHR code or ADS OID

yes/no

adsoid List of values of address object identifier (throughout versions) to be searched, separated by commas. Is not compulsory when x and y or address parameters have values.

yes/no

features Object types from which are searched (separated by a comma). With no value the search is address-based, not object-based. The parameter can be used with both the address parameter and the L-EST x (6 decimal places) and y (7 decimal places) coordinate queries. Possible valules: EHAK, VAIKEKOHT, KATASTRIYKSUS, TANAV ja EHITISHOONE

no

Page 50: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 50

unik When value is 1, only objects with uniqueness requirement are returned.

no

appartment Specifies whether also apartments are searched. Possible values: 0 – not searched (by default), 1- apartments are searched

no

results Maximum number of results. Highest possible value is 100, default value 10. The parameter is not considered when value is set to parameters x and y.

no

x L-EST X coordinate (6 decimal places) according to which addresses are searched. Is not compulsory when value is set to aadress parameter.

yes/no

y L-EST Y coordinate (7 decimal places) according to which addresses are searched

yes/no

adrid Unique technical identifier no ehak Ehak filter no ihist Weather to search from historic

addresses. Value is year number (eg 1993) from which addresses are searched. By default, if no parameter value are given, all historic addresses are included in search. If value is 0, then historic addresses are excluded.

no

nearest Parameter used together with x and y parameters. When given the value of 1, it enables to find the nearest address to the given coordinates.

no

radius

Search circle radius in meters. Parameter used together with x and y parameters.

no

geometry When value is 1, also object geometry is returned. In JSON service the format is GeoJSON and in XML service GML 3.2.

no

8.2. Output description

Page 51: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 51

The output of gazetteer JSON service is in JSONP format.

8.2.1 Search based on address, ADS_OID or by origin register identifier Example of input in case of searching by address, ADS_OID or by origin register identifier

http://inaadress.maaamet.ee/inaadress/gazetteer?address=timuti+15

http://inaadress.maaamet.ee/inaadress/gazetteer?address=EE00646333

http://inaadress.maaamet.ee/inaadress/gazetteer?address=101028219

Output:

{

"addresses": [

{

"pikkaadress": "Harju maakond, Tallinn, Põhja-Tallinna

linnaosa, Timuti tn 15",

"liikVal": "EHITISHOONE",

"taisaadress": "Harju maakond, Tallinn, Põhja-Tallinna

linnaosa, Ristiku tn 46 // Timuti tn 15",

"kood8": "0000",

"kood7": "0QGX",

"tunnus": "101028219",

"asustusyksus": "Põhja-Tallinna linnaosa",

"kood6": "0000",

"kood5": "047J",

"vaikekoht": "",

"kood4": "0000",

"viitepunkt_y": "6589383",

"unik": "1",

"viitepunkt_x": "540568",

"aadress_nr": "15",

"kort_unik": "",

"adr_id": "2105345",

"ads_oid": "EE00646333",

"old_aadresstekst": "",

"kort_nr": "",

"sihtnumber": "10319",

"boundingbox": "540557.55,6589367.91

540557.55,6589399.62 540578.65,6589399.62 540578.65,6589367.91

540557.55,6589367.91",

"liikluspind": "Timuti tn",

"ehak": "614",

"nimi": "",

Page 52: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 52

"g_boundingbox": "59.4401941338,24.7148010674

59.4401941338,24.7151771598 59.4404793476,24.7151771598

59.4404793476,24.7148010674 59.4401941338,24.7148010674",

"omavalitsus": "Tallinn",

"asum": "Pelgulinn",

"viitepunkt_b": "59.4403278129446",

"ehakmk": "37",

"liik": "E",

"poid": [],

"ipikkaadress": "Timuti tn 15, Põhja-Tallinna linnaosa,

Tallinn, Harju maakond",

"adob_id": "6734695",

"onkort": "1",

"kort_ads_oid": "",

"kort_adob_id": "",

"viitepunkt_l": "24.7149801134969",

"maakond": "Harju maakond",

"ehakov": "784",

"koodaadress": "3778406140000047J00000QGX00000000",

"aadresstekst": "Timuti tn 15",

"kort_adr_id": "",

"kort_orig_tunnus": "",

"tehn_id2": "836228"

},

{

"pikkaadress": "Tartu maakond, Tartu linn, Tartu linn,

Timuti tn 15",

"liikVal": "EHITISHOONE",

"taisaadress": "Tartu maakond, Tartu linn, Tartu linn,

Timuti tn 15",

"kood8": "0000",

"kood7": "BJ5M",

"tunnus": "104032799",

"asustusyksus": "Tartu linn",

"kood6": "0000",

"kood5": "0SWV",

"vaikekoht": "",

"kood4": "0000",

"viitepunkt_y": "6470683",

"unik": "1",

"viitepunkt_x": "658170",

"aadress_nr": "15",

"kort_unik": "",

"adr_id": "3086304",

"ads_oid": "EE00765710",

"old_aadresstekst": "",

"kort_nr": "",

"sihtnumber": "50115",

"boundingbox": "658161.77,6470674.48

658161.77,6470691.43 658179.13,6470691.43 658179.13,6470674.48

658161.77,6470674.48",

"liikluspind": "Timuti tn",

Page 53: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 53

"ehak": "8151",

"nimi": "",

"g_boundingbox": "58.3479462668,26.7018094424

58.3479462668,26.7021112237 58.3480926298,26.7021112237

58.3480926298,26.7018094424 58.3479462668,26.7018094424",

"omavalitsus": "Tartu linn",

"asum": "Variku",

"viitepunkt_b": "58.3480241147814",

"ehakmk": "79",

"liik": "E",

"poid": [],

"ipikkaadress": "Timuti tn 15, Tartu linn, Tartu linn,

Tartu maakond",

"adob_id": "8723966",

"onkort": "1",

"kort_ads_oid": "",

"kort_adob_id": "",

"viitepunkt_l": "26.701952144565",

"maakond": "Tartu maakond",

"ehakov": "793",

"koodaadress": "79793815100000SWV0000BJ5M00000000",

"aadresstekst": "Timuti tn 15",

"kort_adr_id": "",

"kort_orig_tunnus": "",

"tehn_id2": "2727268"

}

],

"host": "inads9"

}

8.2.2 Search based on cadastral number

Example of input in case of searching by cadastral number:

http://inaadress.maaamet.ee/inaadress/gazetteer?address=78408:803:7570

Output:

{

"addresses": [

{

"unik": "1",

"maakond": "Harju maakond",

"kort_unik": "",

"omavalitsus": "Tallinn",

"kort_nr": "",

"viitepunkt_x": "540582",

Page 54: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 54

"viitepunkt_y": "6589389",

"adr_id": "2105345",

"kort_orig_tunnus": "",

"pikkaadress": "Harju maakond, Tallinn,

Põhja-Tallinna linnaosa, Timuti tn 15",

"kort_adob_id": "",

"aadresstekst": "Timuti tn 15",

"kort_adr_id": "",

"nimi": "",

"viitepunkt_b": "59.4403803275592111",

"aadress_nr": "15",

"liikluspind": "Timuti tn",

"koodaadress":

"3778406140000047J00000QGX00000000",

"boundingbox": "540553.00,6589366.00

540553.00,6589413.00 540610.00,6589413.00

540610.00,6589366.00 540553.00,6589366.00",

"kood7": "0QGX",

"g_boundingbox":

"59.4401766606,24.7147125777

59.4401766606,24.7157259168 59.4405930640,24.7157259168

59.4405930640,24.7147125777

59.4401766606,24.7147125777",

"kood8": "0000",

"ehakov": "784",

"liik": "4",

"kood5": "047J",

"ehak": "614",

"kood6": "0000",

"tehn_id2": "",

"kood4": "0000",

"tunnus": "78408:803:7570",

"old_aadresstekst": "",

"taisaadress": "Harju maakond, Tallinn,

Põhja-Tallinna linnaosa, Ristiku tn 46 // Timuti tn

15",

"kort_ads_oid": "",

Page 55: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 55

"asustusyksus": "Põhja-Tallinna linnaosa",

"viitepunkt_l": "24.7152279616339108",

"vaikekoht": "",

"ehakmk": "37",

"adob_id": "6577970",

"ipikkaadress": "Timuti tn 15, Põhja-

Tallinna linnaosa, Tallinn, Harju maakond",

"onkort": "0",

"liikVal": "KATASTRIYKSUS",

"ads_oid": "CU00476259"

},

{

"unik": "1",

"maakond": "Harju maakond",

"kort_unik": "",

"omavalitsus": "Tallinn",

"kort_nr": "",

"viitepunkt_x": "540582",

"viitepunkt_y": "6589389",

"adr_id": "2105382",

"kort_orig_tunnus": "",

"pikkaadress": "Harju maakond, Tallinn,

Põhja-Tallinna linnaosa, Ristiku tn 46",

"kort_adob_id": "",

"aadresstekst": "Ristiku tn 46",

"kort_adr_id": "",

"nimi": "",

"viitepunkt_b": "59.4403803275592111",

"aadress_nr": "46",

"liikluspind": "Ristiku tn",

"koodaadress":

"3778406140000062U00000QGW00000000",

"boundingbox": "540553.00,6589366.00

540553.00,6589413.00 540610.00,6589413.00

540610.00,6589366.00 540553.00,6589366.00",

"kood7": "0QGW",

Page 56: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 56

"g_boundingbox":

"59.4401766606,24.7147125777

59.4401766606,24.7157259168 59.4405930640,24.7157259168

59.4405930640,24.7147125777

59.4401766606,24.7147125777",

"kood8": "0000",

"ehakov": "784",

"liik": "4",

"kood5": "062U",

"ehak": "614",

"kood6": "0000",

"tehn_id2": "",

"kood4": "0000",

"tunnus": "78408:803:7570",

"old_aadresstekst": "",

"taisaadress": "Harju maakond, Tallinn,

Põhja-Tallinna linnaosa, Ristiku tn 46 // Timuti tn

15",

"kort_ads_oid": "",

"asustusyksus": "Põhja-Tallinna linnaosa",

"viitepunkt_l": "24.7152279616339108",

"vaikekoht": "",

"ehakmk": "37",

"adob_id": "6577970",

"ipikkaadress": "Ristiku tn 46, Põhja-

Tallinna linnaosa, Tallinn, Harju maakond",

"onkort": "0",

"liikVal": "KATASTRIYKSUS",

"ads_oid": "CU00476259"

}

] ,

"host": "inads10"

}

8.2.3 Search based on coordinates

Example of input in case of searching by L-EST x and y coordinates:

Page 57: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 57

http://inaadress.maaamet.ee/inaadress/gazetteer?x=540568&y=6589383

Output: {

"addresses": [

{

"pikkaadress": "Harju maakond, Tallinn, Põhja-Tallinna

linnaosa, Timuti tn 15",

"liikVal": "EHITISHOONE",

"taisaadress": "Harju maakond, Tallinn, Põhja-Tallinna

linnaosa, Ristiku tn 46 // Timuti tn 15",

"kood8": "0000",

"kood7": "0QGX",

"tunnus": "101028219",

"asustusyksus": "Põhja-Tallinna linnaosa",

"kood6": "0000",

"kood5": "047J",

"vaikekoht": "",

"kood4": "0000",

"viitepunkt_y": "6589383",

"unik": "1",

"viitepunkt_x": "540568",

"aadress_nr": "15",

"kort_unik": "",

"adr_id": "2105345",

"ads_oid": "EE00646333",

"old_aadresstekst": "",

"kort_nr": "",

"sihtnumber": "10319",

"boundingbox": "540557.55,6589367.91

540557.55,6589399.62 540578.65,6589399.62 540578.65,6589367.91

540557.55,6589367.91",

"liikluspind": "Timuti tn",

"ehak": "614",

"kaugus": "0",

"nimi": "",

"g_boundingbox": "59.4401941338,24.7148010674

59.4401941338,24.7151771598 59.4404793476,24.7151771598

59.4404793476,24.7148010674 59.4401941338,24.7148010674",

"omavalitsus": "Tallinn",

"asum": "Pelgulinn",

"viitepunkt_b": "59.4403278129446",

"ehakmk": "37",

"liik": "E",

"poid": [],

"ipikkaadress": "Timuti tn 15, Põhja-Tallinna linnaosa,

Tallinn, Harju maakond",

"adob_id": "6734695",

"onkort": "1",

Page 58: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 58

"kort_ads_oid": "",

"kort_adob_id": "",

"viitepunkt_l": "24.7149801134969",

"maakond": "Harju maakond",

"ehakov": "784",

"koodaadress": "3778406140000047J00000QGX00000000",

"aadresstekst": "Timuti tn 15",

"kort_adr_id": "",

"kort_orig_tunnus": "",

"tehn_id2": "836228"

},

{

"pikkaadress": "Harju maakond, Tallinn, Põhja-Tallinna

linnaosa, Ristiku tn 46",

"liikVal": "EHITISHOONE",

"taisaadress": "Harju maakond, Tallinn, Põhja-Tallinna

linnaosa, Ristiku tn 46 // Timuti tn 15",

"kood8": "0000",

"kood7": "0QGW",

"tunnus": "101028219",

"asustusyksus": "Põhja-Tallinna linnaosa",

"kood6": "0000",

"kood5": "062U",

"vaikekoht": "",

"kood4": "0000",

"viitepunkt_y": "6589383",

"unik": "1",

"viitepunkt_x": "540568",

"aadress_nr": "46",

"kort_unik": "",

"adr_id": "2105382",

"ads_oid": "EE00646333",

"old_aadresstekst": "",

"kort_nr": "",

"sihtnumber": "10320",

"boundingbox": "540557.55,6589367.91

540557.55,6589399.62 540578.65,6589399.62 540578.65,6589367.91

540557.55,6589367.91",

"liikluspind": "Ristiku tn",

"ehak": "614",

"kaugus": "0",

"nimi": "",

"g_boundingbox": "59.4401941338,24.7148010674

59.4401941338,24.7151771598 59.4404793476,24.7151771598

59.4404793476,24.7148010674 59.4401941338,24.7148010674",

"omavalitsus": "Tallinn",

"asum": "Pelgulinn",

"viitepunkt_b": "59.4403278129446",

"ehakmk": "37",

"liik": "E",

"poid": [],

Page 59: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 59

"ipikkaadress": "Ristiku tn 46, Põhja-Tallinna

linnaosa, Tallinn, Harju maakond",

"adob_id": "6734695",

"onkort": "1",

"kort_ads_oid": "",

"kort_adob_id": "",

"viitepunkt_l": "24.7149801134969",

"maakond": "Harju maakond",

"ehakov": "784",

"koodaadress": "3778406140000062U00000QGW00000000",

"aadresstekst": "Ristiku tn 46",

"kort_adr_id": "",

"kort_orig_tunnus": "",

"tehn_id2": "836229"

},

{

"pikkaadress": "Harju maakond, Tallinn, Põhja-Tallinna

linnaosa, Timuti tn 15",

"liikVal": "KATASTRIYKSUS",

"taisaadress": "Harju maakond, Tallinn, Põhja-Tallinna

linnaosa, Ristiku tn 46 // Timuti tn 15",

"kood8": "0000",

"kood7": "0QGX",

"tunnus": "78408:803:7570",

"asustusyksus": "Põhja-Tallinna linnaosa",

"kood6": "0000",

"kood5": "047J",

"vaikekoht": "",

"kood4": "0000",

"viitepunkt_y": "6589389",

"unik": "1",

"viitepunkt_x": "540582",

"aadress_nr": "15",

"kort_unik": "",

"adr_id": "2105345",

"ads_oid": "CU00476259",

"old_aadresstekst": "",

"kort_nr": "",

"sihtnumber": "10319",

"boundingbox": "540553.00,6589366.00

540553.00,6589413.00 540610.00,6589413.00 540610.00,6589366.00

540553.00,6589366.00",

"liikluspind": "Timuti tn",

"ehak": "614",

"kaugus": "0",

"nimi": "",

"g_boundingbox": "59.4401766606,24.7147125777

59.4401766606,24.7157259168 59.4405930640,24.7157259168

59.4405930640,24.7147125777 59.4401766606,24.7147125777",

"omavalitsus": "Tallinn",

"asum": "Pelgulinn",

"viitepunkt_b": "59.4403803275592",

Page 60: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 60

"ehakmk": "37",

"liik": "4",

"poid": [],

"ipikkaadress": "Timuti tn 15, Põhja-Tallinna linnaosa,

Tallinn, Harju maakond",

"adob_id": "6577970",

"onkort": "0",

"kort_ads_oid": "",

"kort_adob_id": "",

"viitepunkt_l": "24.7152279616339",

"maakond": "Harju maakond",

"ehakov": "784",

"koodaadress": "3778406140000047J00000QGX00000000",

"aadresstekst": "Timuti tn 15",

"kort_adr_id": "",

"kort_orig_tunnus": "",

"tehn_id2": "866730"

},

{

"pikkaadress": "Harju maakond, Tallinn, Põhja-Tallinna

linnaosa, Ristiku tn 46",

"liikVal": "KATASTRIYKSUS",

"taisaadress": "Harju maakond, Tallinn, Põhja-Tallinna

linnaosa, Ristiku tn 46 // Timuti tn 15",

"kood8": "0000",

"kood7": "0QGW",

"tunnus": "78408:803:7570",

"asustusyksus": "Põhja-Tallinna linnaosa",

"kood6": "0000",

"kood5": "062U",

"vaikekoht": "",

"kood4": "0000",

"viitepunkt_y": "6589389",

"unik": "1",

"viitepunkt_x": "540582",

"aadress_nr": "46",

"kort_unik": "",

"adr_id": "2105382",

"ads_oid": "CU00476259",

"old_aadresstekst": "",

"kort_nr": "",

"sihtnumber": "10320",

"boundingbox": "540553.00,6589366.00

540553.00,6589413.00 540610.00,6589413.00 540610.00,6589366.00

540553.00,6589366.00",

"liikluspind": "Ristiku tn",

"ehak": "614",

"kaugus": "0",

"nimi": "",

"g_boundingbox": "59.4401766606,24.7147125777

59.4401766606,24.7157259168 59.4405930640,24.7157259168

59.4405930640,24.7147125777 59.4401766606,24.7147125777",

Page 61: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 61

"omavalitsus": "Tallinn",

"asum": "Pelgulinn",

"viitepunkt_b": "59.4403803275592",

"ehakmk": "37",

"liik": "4",

"poid": [],

"ipikkaadress": "Ristiku tn 46, Põhja-Tallinna

linnaosa, Tallinn, Harju maakond",

"adob_id": "6577970",

"onkort": "0",

"kort_ads_oid": "",

"kort_adob_id": "",

"viitepunkt_l": "24.7152279616339",

"maakond": "Harju maakond",

"ehakov": "784",

"koodaadress": "3778406140000062U00000QGW00000000",

"aadresstekst": "Ristiku tn 46",

"kort_adr_id": "",

"kort_orig_tunnus": "",

"tehn_id2": "827729"

},

{

"pikkaadress": "Harju maakond, Tallinn, Põhja-Tallinna

linnaosa",

"liikVal": "EHAK",

"taisaadress": "Harju maakond, Tallinn, Põhja-Tallinna

linnaosa",

"kood8": "0000",

"kood7": "0000",

"tunnus": "0614",

"asustusyksus": "Põhja-Tallinna linnaosa",

"kood6": "0000",

"kood5": "0000",

"vaikekoht": "",

"kood4": "0000",

"viitepunkt_y": "6589774",

"unik": "0",

"viitepunkt_x": "542137",

"aadress_nr": "",

"kort_unik": "",

"adr_id": "2103561",

"ads_oid": "LO00000614",

"old_aadresstekst": "",

"kort_nr": "",

"sihtnumber": "",

"boundingbox": "536309.00,6587832.00

536309.00,6594835.00 543157.00,6594835.00 543157.00,6587832.00

536309.00,6587832.00",

"liikluspind": "",

"ehak": "614",

"kaugus": "0",

"nimi": "",

Page 62: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 62

"g_boundingbox": "59.4267923766,24.6396626344

59.4267923766,24.7616965421 59.4890069856,24.7616965421

59.4890069856,24.6396626344 59.4267923766,24.6396626344",

"omavalitsus": "Tallinn",

"asum": "",

"viitepunkt_b": "59.4436842825946",

"ehakmk": "37",

"liik": "1",

"poid": [],

"ipikkaadress": "Põhja-Tallinna linnaosa, Tallinn,

Harju maakond",

"adob_id": "6403559",

"onkort": "0",

"kort_ads_oid": "",

"kort_adob_id": "",

"viitepunkt_l": "24.7427066238805",

"maakond": "Harju maakond",

"ehakov": "784",

"koodaadress": "377840614000000000000000000000000",

"aadresstekst": "",

"kort_adr_id": "",

"kort_orig_tunnus": "",

"tehn_id2": "1400904"

},

{

"pikkaadress": "Harju maakond, Tallinn",

"liikVal": "EHAK",

"taisaadress": "Harju maakond, Tallinn",

"kood8": "0000",

"kood7": "0000",

"tunnus": "784",

"asustusyksus": "",

"kood6": "0000",

"kood5": "0000",

"vaikekoht": "",

"kood4": "0000",

"viitepunkt_y": "6588522",

"unik": "",

"viitepunkt_x": "542228",

"aadress_nr": "",

"kort_unik": "",

"adr_id": "2103553",

"ads_oid": "OV00000784",

"old_aadresstekst": "",

"kort_nr": "",

"sihtnumber": "",

"boundingbox": "517399.26,6579472.30

517399.26,6621987.61 552564.13,6621987.61 552564.13,6579472.30

517399.26,6579472.30",

"liikluspind": "",

"ehak": "",

"kaugus": "0",

Page 63: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 63

"nimi": "",

"g_boundingbox": "59.3529476294,24.3058571134

59.3529476294,24.9343806090 59.7316343335,24.9343806090

59.7316343335,24.3058571134 59.3529476294,24.3058571134",

"omavalitsus": "Tallinn",

"asum": "",

"viitepunkt_b": "59.4324376712365",

"ehakmk": "37",

"liik": "1",

"poid": [],

"ipikkaadress": "Tallinn, Harju maakond",

"adob_id": "9914271",

"onkort": "0",

"kort_ads_oid": "",

"kort_adob_id": "",

"viitepunkt_l": "24.7440656779973",

"maakond": "Harju maakond",

"ehakov": "784",

"koodaadress": "377840000000000000000000000000000",

"aadresstekst": "",

"kort_adr_id": "",

"kort_orig_tunnus": "",

"tehn_id2": "1344628"

},

{

"pikkaadress": "Harju maakond",

"liikVal": "EHAK",

"taisaadress": "Harju maakond",

"kood8": "0000",

"kood7": "0000",

"tunnus": "37",

"asustusyksus": "",

"kood6": "0000",

"kood5": "0000",

"vaikekoht": "",

"kood4": "0000",

"viitepunkt_y": "6588644",

"unik": "",

"viitepunkt_x": "542220",

"aadress_nr": "",

"kort_unik": "",

"adr_id": "100002",

"ads_oid": "MK00000037",

"old_aadresstekst": "",

"kort_nr": "",

"sihtnumber": "",

"boundingbox": "472891.90,6539954.48

472891.90,6633252.26 611446.23,6633252.26 611446.23,6539954.48

472891.90,6539954.48",

"liikluspind": "",

"ehak": "",

"kaugus": "0",

Page 64: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 64

"nimi": "",

"g_boundingbox": "58.9976931528,23.5283574844

58.9976931528,25.9865495667 59.8212011197,25.9865495667

59.8212011197,23.5283574844 58.9976931528,23.5283574844",

"omavalitsus": "",

"asum": "",

"viitepunkt_b": "59.4335335034751",

"ehakmk": "37",

"liik": "1",

"poid": [],

"ipikkaadress": "Harju maakond",

"adob_id": "9922657",

"onkort": "0",

"kort_ads_oid": "",

"kort_adob_id": "",

"viitepunkt_l": "24.7439485687559",

"maakond": "Harju maakond",

"ehakov": "",

"koodaadress": "370000000000000000000000000000000",

"aadresstekst": "",

"kort_adr_id": "",

"kort_orig_tunnus": "",

"tehn_id2": "1325895"

}

],

"host": "inads9"

} Example of input in case of searching a nearest address to the given L-EST coordinates: http://inaadress.maaamet.ee/inaadress/gazetteer?x=513500.0&y=6630968.8&nearest=1 Output: {

"addresses": [

{

"pikkaadress": "Harju maakond, Tallinn",

"liikVal": "EHAK",

"taisaadress": "Harju maakond, Tallinn",

"kood8": "0000",

"kood7": "0000",

"tunnus": "784",

"asustusyksus": "",

Page 65: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 65

"kood6": "0000",

"kood5": "0000",

"vaikekoht": "",

"kood4": "0000",

"viitepunkt_y": "6588541",

"unik": "",

"viitepunkt_x": "542223",

"aadress_nr": "",

"kort_unik": "",

"adr_id": "2103553",

"ads_oid": "OV00000784",

"old_aadresstekst": "",

"kort_nr": "",

"sihtnumber": "",

"boundingbox": "517399.26,6579472.30

517399.26,6621987.61 552564.13,6621987.61 552564.13,6579472.30

517399.26,6579472.30",

"liikluspind": "",

"ehak": "",

"kaugus": "0",

"nimi": "",

"g_boundingbox": "59.3529476294,24.3058571134

59.3529476294,24.9343806090 59.7316343335,24.9343806090

59.7316343335,24.3058571134 59.3529476294,24.3058571134",

"omavalitsus": "Tallinn",

"asum": "",

"viitepunkt_b": "59.4326087074364",

"ehakmk": "37",

"liik": "1",

"poid": [],

"ipikkaadress": "Tallinn, Harju maakond",

"adob_id": "9914271",

"onkort": "0",

"kort_ads_oid": "",

"kort_adob_id": "",

"viitepunkt_l": "24.7439812973088",

"maakond": "Harju maakond",

"ehakov": "784",

"koodaadress": "377840000000000000000000000000000",

"aadresstekst": "",

"kort_adr_id": "",

"kort_orig_tunnus": "",

"tehn_id2": "1344628"

}

],

"host": "inads9"

}

8.2.4 Apartment search

Page 66: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 66

In case also apartments are searched and the apartment number is not already included in the searched address (the kort_nr value is missing also in the output) and the found building has apartments, the apartment data are included also in the output. Example of input in case of searching apartments in a building: http://inaadress.maaamet.ee/inaadress/gazetteer?address=Ehitajate+tee+45

&appartment=1

Output:

{

"addresses": [

{

"pikkaadress": "Harju maakond, Tallinn, Mustamäe

linnaosa, Ehitajate tee 45",

"appartments": [

{

"tahis": "1",

"adr_id": "2210946",

"koodaadress":

"37784048200000JYH00001SWCAL630000",

"ads_oid": "ER01728585",

"tunnus": "101019669-2118330",

"unik": "1",

"adob_id": "6427197"

},

{

"tahis": "2",

"adr_id": "2210945",

"koodaadress":

"37784048200000JYH00001SWCAL620000",

"ads_oid": "ER01728584",

"tunnus": "101019669-2118324",

"unik": "1",

"adob_id": "6706133"

},

{

"tahis": "3",

"adr_id": "2210944",

"koodaadress":

"37784048200000JYH00001SWCAL610000",

"ads_oid": "ER01728583",

"tunnus": "101019669-2118318",

"unik": "1",

"adob_id": "6497502"

},

{

"tahis": "4",

Page 67: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 67

"adr_id": "2210943",

"koodaadress":

"37784048200000JYH00001SWCAL600000",

"ads_oid": "ER01728582",

"tunnus": "101019669-2118308",

"unik": "1",

"adob_id": "6539435"

},

{

"tahis": "5",

"adr_id": "2275467",

"koodaadress":

"37784048200000JYH00001SWCAL6J0000",

"ads_oid": "ER01728601",

"tunnus": "101019669-2118940",

"unik": "1",

"adob_id": "6706134"

}

],

"liikVal": "EHITISHOONE",

"taisaadress": "Harju maakond, Tallinn, Mustamäe

linnaosa, Ehitajate tee 45",

"kood8": "0000",

"kood7": "1SWC",

"tunnus": "101019669",

"asustusyksus": "Mustamäe linnaosa",

"kood6": "0000",

"kood5": "0JYH",

"vaikekoht": "",

"kood4": "0000",

"viitepunkt_y": "6585141",

"unik": "1",

"viitepunkt_x": "537974",

"aadress_nr": "45",

"kort_unik": "",

"adr_id": "2116013",

"ads_oid": "EE01655778",

"old_aadresstekst": "",

"kort_nr": "",

"sihtnumber": "12612",

"boundingbox": "537933.00,6585134.00

537933.00,6585149.00 538014.00,6585149.00 538014.00,6585134.00

537933.00,6585134.00",

"liikluspind": "Ehitajate tee",

"ehak": "482",

"nimi": "",

"g_boundingbox": "59.4024333489,24.6677979151

59.4024333489,24.6692264333 59.4025607413,24.6692264333

59.4025607413,24.6677979151 59.4024333489,24.6677979151",

"omavalitsus": "Tallinn",

"asum": "Mustamäe",

"viitepunkt_b": "59.4024925143486",

Page 68: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 68

"ehakmk": "37",

"liik": "E",

"poid": [],

"ipikkaadress": "Ehitajate tee 45, Mustamäe linnaosa,

Tallinn, Harju maakond",

"adob_id": "6734606",

"onkort": "1",

"kort_ads_oid": "",

"kort_adob_id": "",

"viitepunkt_l": "24.6685208868687",

"maakond": "Harju maakond",

"ehakov": "784",

"koodaadress": "37784048200000JYH00001SWC00000000",

"aadresstekst": "Ehitajate tee 45",

"kort_adr_id": "",

"kort_orig_tunnus": "",

"tehn_id2": "819148"

},

{

"pikkaadress": "Harju maakond, Tallinn, Mustamäe

linnaosa, Ehitajate tee 45a",

"liikVal": "KATASTRIYKSUS",

"taisaadress": "Harju maakond, Tallinn, Mustamäe

linnaosa, Ehitajate tee 45a",

"kood8": "0000",

"kood7": "1T4Q",

"tunnus": "78405:501:3380",

"asustusyksus": "Mustamäe linnaosa",

"kood6": "0000",

"kood5": "0JYH",

"vaikekoht": "",

"kood4": "0000",

"viitepunkt_y": "6585150",

"unik": "1",

"viitepunkt_x": "537908",

"aadress_nr": "45a",

"kort_unik": "",

"adr_id": "2306923",

"ads_oid": "CU00465183",

"old_aadresstekst": "",

"kort_nr": "",

"sihtnumber": "12612",

"boundingbox": "537889.00,6585126.00

537889.00,6585174.00 537927.00,6585174.00 537927.00,6585126.00

537889.00,6585126.00",

"liikluspind": "Ehitajate tee",

"ehak": "482",

"nimi": "",

"g_boundingbox": "59.4023654713,24.6670219603

59.4023654713,24.6676993034 59.4027929216,24.6676993034

59.4027929216,24.6670219603 59.4023654713,24.6670219603",

"omavalitsus": "Tallinn",

Page 69: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 69

"asum": "Mustamäe",

"viitepunkt_b": "59.4025791968732",

"ehakmk": "37",

"liik": "4",

"poid": [],

"ipikkaadress": "Ehitajate tee 45a, Mustamäe linnaosa,

Tallinn, Harju maakond",

"adob_id": "6442040",

"onkort": "0",

"kort_ads_oid": "",

"kort_adob_id": "",

"viitepunkt_l": "24.6673606297042",

"maakond": "Harju maakond",

"ehakov": "784",

"koodaadress": "37784048200000JYH00001T4Q00000000",

"aadresstekst": "Ehitajate tee 45a",

"kort_adr_id": "",

"kort_orig_tunnus": "",

"tehn_id2": "682155"

}

],

"host": "inads9"

}

8.2.5 Search based on ADS_OID Example of input in case of a search by ADS_OID: http://inaadress.maaamet.ee/inaadress/gazetteer?adsoid=EE00646333 Output: {

"addresses": [

{

"pikkaadress": "Harju maakond, Tallinn, Põhja-Tallinna

linnaosa, Timuti tn 15",

"liikVal": "EHITISHOONE",

"taisaadress": "Harju maakond, Tallinn, Põhja-Tallinna

linnaosa, Ristiku tn 46 // Timuti tn 15",

"tunnus": "101028219",

"kood7": "0QGX",

"asustusyksus": "Põhja-Tallinna linnaosa",

"kood6": "0000",

"kood5": "047J",

"vaikekoht": "",

"viitepunkt_y": "6589383.05999999959",

"kood4": "0000",

"unik": "1",

Page 70: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 70

"viitepunkt_x": "540568.099999999977",

"aadress_nr": "15",

"adr_id": "2105345",

"ads_oid": "EE00646333",

"sihtnumber": "10319",

"boundingbox":

"540557.550000000047,6589367.91000000015

540557.550000000047,6589399.62000000011

540578.650000000023,6589399.62000000011

540578.650000000023,6589367.91000000015

540557.550000000047,6589367.91000000015 ",

"liikluspind": "Timuti tn",

"ehak": "614",

"nimi": "",

"g_boundingbox": "24.7148010674012,59.4401941337912

24.7148010674012,59.4404793475834 24.715177159772,59.4404793475834

24.715177159772,59.4401941337912 24.7148010674012,59.4401941337912 ",

"omavalitsus": "Tallinn",

"viitepunkt_b": "59.4403278129446",

"asum": "Pelgulinn",

"ehakmk": "37",

"liik": "E",

"ipikkaadress": "Timuti tn 15, Põhja-Tallinna linnaosa,

Tallinn, Harju maakond",

"poid": [],

"adob_id": "6734695",

"viitepunkt_l": "24.7149801134969",

"maakond": "Harju maakond",

"ehakov": "784",

"koodaadress": "3778406140000047J00000QGX00000000",

"aadresstekst": "Timuti tn 15",

"tehn_id": "836228"

},

{

"pikkaadress": "Harju maakond, Tallinn, Põhja-Tallinna

linnaosa, Ristiku tn 46",

"liikVal": "EHITISHOONE",

"taisaadress": "Harju maakond, Tallinn, Põhja-Tallinna

linnaosa, Ristiku tn 46 // Timuti tn 15",

"tunnus": "101028219",

"kood7": "0QGW",

"asustusyksus": "Põhja-Tallinna linnaosa",

"kood6": "0000",

"kood5": "062U",

"vaikekoht": "",

"viitepunkt_y": "6589383.05999999959",

"kood4": "0000",

"unik": "1",

"viitepunkt_x": "540568.099999999977",

"aadress_nr": "46",

"adr_id": "2105382",

"ads_oid": "EE00646333",

Page 71: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 71

"sihtnumber": "10320",

"boundingbox":

"540557.550000000047,6589367.91000000015

540557.550000000047,6589399.62000000011

540578.650000000023,6589399.62000000011

540578.650000000023,6589367.91000000015

540557.550000000047,6589367.91000000015 ",

"liikluspind": "Ristiku tn",

"ehak": "614",

"nimi": "",

"g_boundingbox": "24.7148010674012,59.4401941337912

24.7148010674012,59.4404793475834 24.715177159772,59.4404793475834

24.715177159772,59.4401941337912 24.7148010674012,59.4401941337912 ",

"omavalitsus": "Tallinn",

"viitepunkt_b": "59.4403278129446",

"asum": "Pelgulinn",

"ehakmk": "37",

"liik": "E",

"ipikkaadress": "Ristiku tn 46, Põhja-Tallinna

linnaosa, Tallinn, Harju maakond",

"poid": [],

"adob_id": "6734695",

"viitepunkt_l": "24.7149801134969",

"maakond": "Harju maakond",

"ehakov": "784",

"koodaadress": "3778406140000062U00000QGW00000000",

"aadresstekst": "Ristiku tn 46",

"tehn_id": "836229"

}

],

"host": "inads9"

}

The same result is obtained by providing the ADS OID value with the address

parameter.

http://inaadress.maaamet.ee/inaadress/gazetteer?address=EE00646333 {

"addresses": [

{

"unik": "1",

"maakond": "Harju maakond",

"kort_unik": "",

"omavalitsus": "Tallinn",

"kort_nr": "",

"viitepunkt_x": "540568",

"viitepunkt_y": "6589383",

"adr_id": "2105345",

"kort_orig_tunnus": "",

Page 72: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 72

"pikkaadress": "Harju maakond, Tallinn, Põhja-Tallinna

linnaosa, Timuti tn 15",

"kort_adob_id": "",

"aadresstekst": "Timuti tn 15",

"kort_adr_id": "",

"nimi": "",

"viitepunkt_b": "59.4403278129446235",

"aadress_nr": "15",

"liikluspind": "Timuti tn",

"koodaadress": "3778406140000047J00000QGX00000000",

"boundingbox": "540557.55,6589367.91

540557.55,6589399.62 540578.65,6589399.62 540578.65,6589367.91

540557.55,6589367.91",

"kood7": "0QGX",

"g_boundingbox": "59.4401941338,24.7148010674

59.4401941338,24.7151771598 59.4404793476,24.7151771598

59.4404793476,24.7148010674 59.4401941338,24.7148010674",

"kood8": "0000",

"ehakov": "784",

"liik": "E",

"kood5": "047J",

"ehak": "614",

"kood6": "0000",

"tehn_id2": "836228",

"kood4": "0000",

"tunnus": "101028219",

"old_aadresstekst": "",

"taisaadress": "Harju maakond, Tallinn, Põhja-Tallinna

linnaosa, Ristiku tn 46 // Timuti tn 15",

"kort_ads_oid": "",

"asustusyksus": "Põhja-Tallinna linnaosa",

"viitepunkt_l": "24.7149801134968783",

"vaikekoht": "",

"ehakmk": "37",

"adob_id": "6734695",

"ipikkaadress": "Timuti tn 15, Põhja-Tallinna linnaosa,

Tallinn, Harju maakond",

"onkort": "1",

"liikVal": "EHITISHOONE",

"ads_oid": "EE00646333"

},

{

"unik": "1",

"maakond": "Harju maakond",

"kort_unik": "",

"omavalitsus": "Tallinn",

"kort_nr": "",

"viitepunkt_x": "540568",

"viitepunkt_y": "6589383",

"adr_id": "2105382",

"kort_orig_tunnus": "",

Page 73: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 73

"pikkaadress": "Harju maakond, Tallinn, Põhja-Tallinna

linnaosa, Ristiku tn 46",

"kort_adob_id": "",

"aadresstekst": "Ristiku tn 46",

"kort_adr_id": "",

"nimi": "",

"viitepunkt_b": "59.4403278129446235",

"aadress_nr": "46",

"liikluspind": "Ristiku tn",

"koodaadress": "3778406140000062U00000QGW00000000",

"boundingbox": "540557.55,6589367.91

540557.55,6589399.62 540578.65,6589399.62 540578.65,6589367.91

540557.55,6589367.91",

"kood7": "0QGW",

"g_boundingbox": "59.4401941338,24.7148010674

59.4401941338,24.7151771598 59.4404793476,24.7151771598

59.4404793476,24.7148010674 59.4401941338,24.7148010674",

"kood8": "0000",

"ehakov": "784",

"liik": "E",

"kood5": "062U",

"ehak": "614",

"kood6": "0000",

"tehn_id2": "836229",

"kood4": "0000",

"tunnus": "101028219",

"old_aadresstekst": "",

"taisaadress": "Harju maakond, Tallinn, Põhja-Tallinna

linnaosa, Ristiku tn 46 // Timuti tn 15",

"kort_ads_oid": "",

"asustusyksus": "Põhja-Tallinna linnaosa",

"viitepunkt_l": "24.7149801134968783",

"vaikekoht": "",

"ehakmk": "37",

"adob_id": "6734695",

"ipikkaadress": "Ristiku tn 46, Põhja-Tallinna

linnaosa, Tallinn, Harju maakond",

"onkort": "1",

"liikVal": "EHITISHOONE",

"ads_oid": "EE00646333"

}

],

"host": "inads9"

}

Or when apartment data is to be returned, the input is: http://inaadress.maaamet.ee/inaadress/gazetteer?adsoid=ER01378834

and output as following:

Page 74: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 74

{

"addresses": [

{

"pikkaadress": "Harju maakond, Tallinn, Põhja-Tallinna

linnaosa, Timuti tn 15-2",

"taisaadress": "Harju maakond, Tallinn, Põhja-Tallinna

linnaosa, Timuti tn 15-2",

"kood8": "4GU2",

"kood7": "0QGX",

"asustusyksus": "Põhja-Tallinna linnaosa",

"kood6": "0000",

"kood5": "047J",

"vaikekoht": "",

"viitepunkt_y": "6589384.48",

"kood4": "0000",

"viitepunkt_x": "540568.77",

"aadress_nr": "15",

"kort_unik": "1",

"ads_oid": "EE00646333",

"kort_nr": "2",

"liikluspind": "Timuti tn",

"ehak": "614",

"nimi": "",

"omavalitsus": "Tallinn",

"viitepunkt_b": "59.4403366929865",

"ehakmk": "37",

"ipikkaadress": "Timuti tn 15-2, Põhja-Tallinna

linnaosa, Tallinn, Harju maakond",

"kort_ads_oid": "ER01378834",

"kort_adob_id": "6939376",

"viitepunkt_l": "24.7149979242558",

"maakond": "Harju maakond",

"ehakov": "784",

"aadresstekst": "Timuti tn 15-2",

"koodaadress": "3778406140000047J00000QGX4GU20000",

"kort_adr_id": "2294005",

"kort_orig_tunnus": "101028219-2273826"

}

],

"host": "inads9"

}

8.2.6 Search based on ADR_ID Example of input in case of searching by ADR_ID:

http://inaadress.maaamet.ee/inaadress/gazetteer?adrid=2105345

Output:

Page 75: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 75

{

"addresses": [

{

"pikkaadress": "Harju maakond, Tallinn, Põhja-Tallinna

linnaosa, Timuti tn 15",

"liikVal": "EHITISHOONE",

"taisaadress": "Harju maakond, Tallinn, Põhja-Tallinna

linnaosa, Ristiku tn 46 // Timuti tn 15",

"tunnus": "101028219",

"kood7": "0QGX",

"asustusyksus": "Põhja-Tallinna linnaosa",

"kood6": "0000",

"kood5": "047J",

"vaikekoht": "",

"viitepunkt_y": "6589383.05999999959",

"kood4": "0000",

"unik": "1",

"viitepunkt_x": "540568.099999999977",

"aadress_nr": "15",

"seosed": [

{

"pikkaadress": "Harju maakond, Tallinn,

Põhja-Tallinna linnaosa, Ristiku tn 46",

"liikVal": "EHITISHOONE",

"taisaadress": "Harju maakond, Tallinn,

Põhja-Tallinna linnaosa, Ristiku tn 46 // Timuti tn 15",

"tunnus": "101028219",

"kood7": "0QGW",

"asustusyksus": "Põhja-Tallinna linnaosa",

"kood6": "0000",

"kood5": "062U",

"vaikekoht": "",

"viitepunkt_y": "6589383.05999999959",

"kood4": "0000",

"unik": "1",

"viitepunkt_x": "540568.099999999977",

"aadress_nr": "46",

"adr_id": "2105382",

"ads_oid": "EE00646333",

"sihtnumber": "10320",

"liikluspind": "Ristiku tn",

"boundingbox":

"540557.550000000047,6589367.91000000015

540557.550000000047,6589399.62000000011

540578.650000000023,6589399.62000000011

540578.650000000023,6589367.91000000015

540557.550000000047,6589367.91000000015 ",

"ehak": "614",

"nimi": "",

"omavalitsus": "Tallinn",

Page 76: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 76

"g_boundingbox":

"24.7148010674012,59.4401941337912 24.7148010674012,59.4404793475834

24.715177159772,59.4404793475834 24.715177159772,59.4401941337912

24.7148010674012,59.4401941337912 ",

"viitepunkt_b": "59.4403278129446",

"asum": "Pelgulinn",

"ehakmk": "37",

"liik": "E",

"ipikkaadress": "Ristiku tn 46, Põhja-

Tallinna linnaosa, Tallinn, Harju maakond",

"poid": [],

"adob_id": "6734695",

"viitepunkt_l": "24.7149801134969",

"maakond": "Harju maakond",

"ehakov": "784",

"koodaadress":

"3778406140000062U00000QGW00000000",

"aadresstekst": "Ristiku tn 46",

"tehn_id": "836229"

}

],

"adr_id": "2105345",

"ads_oid": "EE00646333",

"sihtnumber": "10319",

"liikluspind": "Timuti tn",

"boundingbox":

"540557.550000000047,6589367.91000000015

540557.550000000047,6589399.62000000011

540578.650000000023,6589399.62000000011

540578.650000000023,6589367.91000000015

540557.550000000047,6589367.91000000015 ",

"ehak": "614",

"nimi": "",

"omavalitsus": "Tallinn",

"g_boundingbox": "24.7148010674012,59.4401941337912

24.7148010674012,59.4404793475834 24.715177159772,59.4404793475834

24.715177159772,59.4401941337912 24.7148010674012,59.4401941337912 ",

"viitepunkt_b": "59.4403278129446",

"asum": "Pelgulinn",

"ehakmk": "37",

"liik": "E",

"ipikkaadress": "Timuti tn 15, Põhja-Tallinna linnaosa,

Tallinn, Harju maakond",

"poid": [],

"adob_id": "6734695",

"viitepunkt_l": "24.7149801134969",

"maakond": "Harju maakond",

"ehakov": "784",

"koodaadress": "3778406140000047J00000QGX00000000",

"aadresstekst": "Timuti tn 15",

"tehn_id": "836228",

"primary": "true"

Page 77: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 77

},

{

"pikkaadress": "Harju maakond, Tallinn, Põhja-Tallinna

linnaosa, Timuti tn 15",

"liikVal": "KATASTRIYKSUS",

"taisaadress": "Harju maakond, Tallinn, Põhja-Tallinna

linnaosa, Ristiku tn 46 // Timuti tn 15",

"tunnus": "78408:803:7570",

"kood7": "0QGX",

"asustusyksus": "Põhja-Tallinna linnaosa",

"kood6": "0000",

"kood5": "047J",

"vaikekoht": "",

"viitepunkt_y": "6589389",

"kood4": "0000",

"unik": "1",

"viitepunkt_x": "540582",

"aadress_nr": "15",

"seosed": [

{

"pikkaadress": "Harju maakond, Tallinn,

Põhja-Tallinna linnaosa, Ristiku tn 46",

"liikVal": "KATASTRIYKSUS",

"taisaadress": "Harju maakond, Tallinn,

Põhja-Tallinna linnaosa, Ristiku tn 46 // Timuti tn 15",

"tunnus": "78408:803:7570",

"kood7": "0QGW",

"asustusyksus": "Põhja-Tallinna linnaosa",

"kood6": "0000",

"kood5": "062U",

"vaikekoht": "",

"viitepunkt_y": "6589389",

"kood4": "0000",

"unik": "1",

"viitepunkt_x": "540582",

"aadress_nr": "46",

"adr_id": "2105382",

"ads_oid": "CU00476259",

"sihtnumber": "10320",

"liikluspind": "Ristiku tn",

"boundingbox": "540553,6589366

540553,6589413 540610,6589413 540610,6589366 540553,6589366 ",

"ehak": "614",

"nimi": "",

"omavalitsus": "Tallinn",

"g_boundingbox":

"24.7147125776644,59.4401766605828 24.7147125776644,59.4405930639971

24.7157259167625,59.4405930639971 24.7157259167625,59.4401766605828

24.7147125776644,59.4401766605828 ",

"viitepunkt_b": "59.4403803275592",

"asum": "Pelgulinn",

"ehakmk": "37",

Page 78: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 78

"liik": "4",

"ipikkaadress": "Ristiku tn 46, Põhja-

Tallinna linnaosa, Tallinn, Harju maakond",

"poid": [],

"adob_id": "6577970",

"viitepunkt_l": "24.7152279616339",

"maakond": "Harju maakond",

"ehakov": "784",

"koodaadress":

"3778406140000062U00000QGW00000000",

"aadresstekst": "Ristiku tn 46",

"tehn_id": "827729"

}

],

"adr_id": "2105345",

"ads_oid": "CU00476259",

"sihtnumber": "10319",

"liikluspind": "Timuti tn",

"boundingbox": "540553,6589366 540553,6589413

540610,6589413 540610,6589366 540553,6589366 ",

"ehak": "614",

"nimi": "",

"omavalitsus": "Tallinn",

"g_boundingbox": "24.7147125776644,59.4401766605828

24.7147125776644,59.4405930639971 24.7157259167625,59.4405930639971

24.7157259167625,59.4401766605828 24.7147125776644,59.4401766605828 ",

"viitepunkt_b": "59.4403803275592",

"asum": "Pelgulinn",

"ehakmk": "37",

"liik": "4",

"ipikkaadress": "Timuti tn 15, Põhja-Tallinna linnaosa,

Tallinn, Harju maakond",

"poid": [],

"adob_id": "6577970",

"viitepunkt_l": "24.7152279616339",

"maakond": "Harju maakond",

"ehakov": "784",

"koodaadress": "3778406140000047J00000QGX00000000",

"aadresstekst": "Timuti tn 15",

"tehn_id": "866730"

}

],

"host": "inads9"

}

Or when apartment data is returned, the input is as following: http://inaadress.maaamet.ee/inaadress/gazetteer?adrid=2294005 Output:

Page 79: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 79

{

"addresses": [

{

"pikkaadress": "Harju maakond, Tallinn, Põhja-Tallinna

linnaosa, Timuti tn 15-2",

"taisaadress": "Harju maakond, Tallinn, Põhja-Tallinna

linnaosa, Timuti tn 15-2",

"kood8": "4GU2",

"kood7": "0QGX",

"asustusyksus": "Põhja-Tallinna linnaosa",

"kood6": "0000",

"kood5": "047J",

"vaikekoht": "",

"viitepunkt_y": "6589384.48",

"kood4": "0000",

"viitepunkt_x": "540568.77",

"aadress_nr": "15",

"kort_unik": "1",

"ads_oid": "EE00646333",

"kort_nr": "2",

"liikluspind": "Timuti tn",

"ehak": "614",

"nimi": "",

"omavalitsus": "Tallinn",

"viitepunkt_b": "59.4403366929865",

"ehakmk": "37",

"ipikkaadress": "Timuti tn 15-2, Põhja-Tallinna

linnaosa, Tallinn, Harju maakond",

"kort_ads_oid": "ER01378834",

"kort_adob_id": "6939376",

"viitepunkt_l": "24.7149979242558",

"maakond": "Harju maakond",

"ehakov": "784",

"aadresstekst": "Timuti tn 15-2",

"koodaadress": "3778406140000047J00000QGX4GU20000",

"kort_adr_id": "2294005",

"kort_orig_tunnus": "101028219-2273826",

"primary": "true"

}

],

"host": "inads9"

}

Page 80: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 80

8.2.7 Search with filters

Example of input with the following filters: only buildings and cadastral units

are searched, ehak filter is Harju maakond, maximum 10 objects are in results,

also appartments are displayed, only objects with uniqueness requirement are

returned and also historycal addresses are searched.

https://inaadress.maaamet.ee/inaadress/gazetteer?address=Tamme+6&resu

lts=10&appartment=1&unik=1&features=KATASTRIYKSUS,EHITISHOONE&e

hak=37&ihist=1993

Output:

{

"host": "inads9",

"addresses": [

{

"unik": "1",

"maakond": "Harju maakond",

"kort_unik": "",

"omavalitsus": "Tallinn",

"kort_nr": "",

"viitepunkt_x": "546712",

"viitepunkt_y": "6591206",

"adr_id": "2111635",

"kort_orig_tunnus": "",

"pikkaadress": "Harju maakond, Tallinn, Pirita

linnaosa, Tamme tn 6",

"kort_adob_id": "",

"aadresstekst": "Tamme tn 6",

"kort_adr_id": "",

"nimi": "",

"viitepunkt_b": "59.4560578544127054",

"aadress_nr": "6",

"liikluspind": "Tamme tn",

"koodaadress": "377840596000001K700000SMD00000000",

"boundingbox": "546706.40,6591200.32

546706.40,6591213.03 546718.19,6591213.03 546718.19,6591200.32

546706.40,6591200.32",

"kood7": "0SMD",

"g_boundingbox": "59.4560046627,24.8235406842

59.4560046627,24.8237550670 59.4561200215,24.8237550670

59.4561200215,24.8235406842 59.4560046627,24.8235406842",

"kood8": "0000",

"ehakov": "784",

"liik": "E",

"kood5": "01K7",

Page 81: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 81

"ehak": "596",

"kood6": "0000",

"tehn_id2": "1308561",

"kood4": "0000",

"tunnus": "101004219",

"old_aadresstekst": "",

"taisaadress": "Harju maakond, Tallinn, Pirita

linnaosa, Tamme tn 6",

"kort_ads_oid": "",

"asustusyksus": "Pirita linnaosa",

"viitepunkt_l": "24.8236477671901987",

"vaikekoht": "",

"ehakmk": "37",

"adob_id": "6527565",

"ipikkaadress": "Tamme tn 6, Pirita linnaosa, Tallinn,

Harju maakond",

"onkort": "0",

"liikVal": "EHITISHOONE",

"ads_oid": "EE00628823"

},

{

"unik": "1",

"maakond": "Harju maakond",

"kort_unik": "",

"omavalitsus": "Saue vald",

"kort_nr": "",

"viitepunkt_x": "531103",

"viitepunkt_y": "6582590",

"adr_id": "2699333",

"kort_orig_tunnus": "",

"pikkaadress": "Harju maakond, Saue vald, Hüüru küla,

Tamme tn 6",

"kort_adob_id": "",

"aadresstekst": "Tamme tn 6",

"kort_adr_id": "",

"nimi": "",

"viitepunkt_b": "59.3801535666640774",

"aadress_nr": "6",

"liikluspind": "Tamme tn",

"koodaadress": "377261975000007MM00002VVJ00000000",

"boundingbox": "531091.13,6582577.17

531091.13,6582596.51 531114.64,6582596.51 531114.64,6582577.17

531091.13,6582577.17",

"kood7": "2VVJ",

"g_boundingbox": "59.3800377554,24.5469856293

59.3800377554,24.5474107153 59.3802155207,24.5474107153

59.3802155207,24.5469856293 59.3800377554,24.5469856293",

"kood8": "0000",

"ehakov": "726",

"liik": "E",

"kood5": "07MM",

"ehak": "1975",

Page 82: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 82

"kood6": "0000",

"tehn_id2": "265066",

"kood4": "0000",

"tunnus": "116024232",

"old_aadresstekst": "",

"taisaadress": "Harju maakond, Saue vald, Hüüru küla,

Tamme tn 6",

"kort_ads_oid": "",

"asustusyksus": "Hüüru küla",

"viitepunkt_l": "24.5471986022777351",

"vaikekoht": "",

"ehakmk": "37",

"adob_id": "7990765",

"ipikkaadress": "Tamme tn 6, Hüüru küla, Saue vald,

Harju maakond",

"onkort": "0",

"liikVal": "EHITISHOONE",

"ads_oid": "EE01037724"

},

{

"unik": "1",

"maakond": "Harju maakond",

"kort_unik": "",

"omavalitsus": "Viimsi vald",

"kort_nr": "",

"viitepunkt_x": "545280",

"viitepunkt_y": "6600063",

"adr_id": "271092",

"kort_orig_tunnus": "",

"pikkaadress": "Harju maakond, Viimsi vald, Pringi küla,

Tamme tee 6",

"kort_adob_id": "",

"aadresstekst": "Tamme tee 6",

"kort_adr_id": "",

"nimi": "",

"viitepunkt_b": "59.5357083079935379",

"aadress_nr": "6",

"liikluspind": "Tamme tee",

"koodaadress": "378906370000007Z800002SBB00000000",

"boundingbox": "545272.00,6600051.00

545272.00,6600074.00 545288.00,6600074.00 545288.00,6600051.00

545272.00,6600051.00",

"kood7": "2SBB",

"g_boundingbox": "59.5356014617,24.8001197010

59.5356014617,24.8004073022 59.5358061789,24.8004073022

59.5358061789,24.8001197010 59.5356014617,24.8001197010",

"kood8": "0000",

"ehakov": "890",

"liik": "E",

"kood5": "07Z8",

"ehak": "6370",

"kood6": "0000",

Page 83: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 83

"tehn_id2": "1432664",

"kood4": "0000",

"tunnus": "116022574",

"old_aadresstekst": "",

"taisaadress": "Harju maakond, Viimsi vald, Pringi küla,

Tamme tee 6",

"kort_ads_oid": "",

"asustusyksus": "Pringi küla",

"viitepunkt_l": "24.8002636065697146",

"vaikekoht": "",

"ehakmk": "37",

"adob_id": "2820481",

"ipikkaadress": "Tamme tee 6, Pringi küla, Viimsi vald,

Harju maakond",

"onkort": "0",

"liikVal": "EHITISHOONE",

"ads_oid": "EE01030010"

},

{

"unik": "1",

"maakond": "Harju maakond",

"kort_unik": "",

"omavalitsus": "Rae vald",

"kort_nr": "",

"viitepunkt_x": "551152",

"viitepunkt_y": "6579076",

"adr_id": "1495585",

"kort_orig_tunnus": "",

"pikkaadress": "Harju maakond, Rae vald, Aaviku küla,

Tamme tee 6",

"kort_adob_id": "",

"aadresstekst": "Tamme tee 6",

"kort_adr_id": "",

"nimi": "",

"viitepunkt_b": "59.346671760331283",

"aadress_nr": "6",

"liikluspind": "Tamme tee",

"koodaadress": "376531050000001PS00007B3300000000",

"boundingbox": "551146.33,6579069.88

551146.33,6579081.24 551157.39,6579081.24 551157.39,6579069.88

551146.33,6579069.88",

"kood7": "7B33",

"g_boundingbox": "59.3466186277,24.8989535002

59.3466186277,24.8991494070 59.3467160374,24.8991494070

59.3467160374,24.8989535002 59.3466186277,24.8989535002",

"kood8": "0000",

"ehakov": "653",

"liik": "E",

"kood5": "01PS",

"ehak": "1050",

"kood6": "0000",

"tehn_id2": "1486580",

Page 84: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 84

"kood4": "0000",

"tunnus": "",

"old_aadresstekst": "",

"taisaadress": "Harju maakond, Rae vald, Aaviku küla,

Tamme tee 6",

"kort_ads_oid": "",

"asustusyksus": "Aaviku küla",

"viitepunkt_l": "24.899060358346123",

"vaikekoht": "",

"ehakmk": "37",

"adob_id": "7410344",

"ipikkaadress": "Tamme tee 6, Aaviku küla, Rae vald,

Harju maakond",

"onkort": "0",

"liikVal": "EHITISHOONE",

"ads_oid": "EE02678146"

},

{

"unik": "1",

"maakond": "Harju maakond",

"kort_unik": "",

"omavalitsus": "Lääne-Harju vald",

"kort_nr": "",

"viitepunkt_x": "513725",

"viitepunkt_y": "6583230",

"adr_id": "2686022",

"kort_orig_tunnus": "",

"pikkaadress": "Harju maakond, Lääne-Harju vald,

Laulasmaa küla, Tamme tn 6",

"kort_adob_id": "",

"aadresstekst": "Tamme tn 6",

"kort_adr_id": "",

"nimi": "",

"viitepunkt_b": "59.3868154867399838",

"aadress_nr": "6",

"liikluspind": "Tamme tn",

"koodaadress": "374314148000007RH00003O7200000000",

"boundingbox": "513718.19,6583221.44

513718.19,6583239.74 513731.95,6583239.74 513731.95,6583221.44

513718.19,6583221.44",

"kood7": "3O72",

"g_boundingbox": "59.3867349257,24.2413865902

59.3867349257,24.2416341412 59.3869050240,24.2416341412

59.3869050240,24.2413865902 59.3867349257,24.2413865902",

"kood8": "0000",

"ehakov": "431",

"liik": "E",

"kood5": "07RH",

"ehak": "4148",

"kood6": "0000",

"tehn_id2": "2278108",

"kood4": "0000",

Page 85: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 85

"tunnus": "116043574",

"old_aadresstekst": "",

"taisaadress": "Harju maakond, Lääne-Harju vald,

Laulasmaa küla, Tamme tn 6",

"kort_ads_oid": "",

"asustusyksus": "Laulasmaa küla",

"viitepunkt_l": "24.2415103336822035",

"vaikekoht": "",

"ehakmk": "37",

"adob_id": "7897648",

"ipikkaadress": "Tamme tn 6, Laulasmaa küla, Lääne-Harju

vald, Harju maakond",

"onkort": "",

"liikVal": "EHITISHOONE",

"ads_oid": "EE01111520"

},

{

"unik": "1",

"maakond": "Harju maakond",

"kort_unik": "",

"omavalitsus": "Saku vald",

"kort_nr": "",

"viitepunkt_x": "538982",

"viitepunkt_y": "6567116",

"adr_id": "3468119",

"kort_orig_tunnus": "",

"pikkaadress": "Harju maakond, Saku vald, Kiisa alevik,

Tamme tn 6",

"kort_adob_id": "",

"aadresstekst": "Tamme tn 6",

"kort_adr_id": "",

"nimi": "",

"viitepunkt_b": "59.2406059146685493",

"aadress_nr": "6",

"liikluspind": "Tamme tn",

"koodaadress": "377193048000006H300005W4200000000",

"boundingbox": "538972.64,6567096.67

538972.64,6567122.61 538991.40,6567122.61 538991.40,6567096.67

538972.64,6567096.67",

"kood7": "5W42",

"g_boundingbox": "59.2404361854,24.6828729934

59.2404361854,24.6831930019 59.2406679268,24.6831930019

59.2406679268,24.6828729934 59.2404361854,24.6828729934",

"kood8": "0000",

"ehakov": "719",

"liik": "E",

"kood5": "06H3",

"ehak": "3048",

"kood6": "0000",

"tehn_id2": "415744",

"kood4": "0000",

"tunnus": "116048078",

Page 86: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 86

"old_aadresstekst": "",

"taisaadress": "Harju maakond, Saku vald, Kiisa alevik,

Tamme tn 6",

"kort_ads_oid": "",

"asustusyksus": "Kiisa alevik",

"viitepunkt_l": "24.6830340676151074",

"vaikekoht": "",

"ehakmk": "37",

"adob_id": "9815625",

"ipikkaadress": "Tamme tn 6, Kiisa alevik, Saku vald,

Harju maakond",

"onkort": "0",

"liikVal": "EHITISHOONE",

"ads_oid": "EE01123536"

},

{

"unik": "1",

"maakond": "Harju maakond",

"kort_unik": "",

"omavalitsus": "Saku vald",

"kort_nr": "",

"viitepunkt_x": "538102",

"viitepunkt_y": "6574439",

"adr_id": "3467330",

"kort_orig_tunnus": "",

"pikkaadress": "Harju maakond, Saku vald, Saku alevik,

Tamme tee 6",

"kort_adob_id": "",

"aadresstekst": "Tamme tee 6",

"kort_adr_id": "",

"nimi": "",

"viitepunkt_b": "59.3064191182830598",

"aadress_nr": "6",

"liikluspind": "Tamme tee",

"koodaadress": "3771973610000072R0000689A00000000",

"boundingbox": "538095.76,6574432.07

538095.76,6574446.42 538108.73,6574446.42 538108.73,6574432.07

538095.76,6574432.07",

"kood7": "689A",

"g_boundingbox": "59.3063568217,24.6687888685

59.3063568217,24.6690195243 59.3064813252,24.6690195243

59.3064813252,24.6687888685 59.3063568217,24.6687888685",

"kood8": "0000",

"ehakov": "719",

"liik": "E",

"kood5": "072R",

"ehak": "7361",

"kood6": "0000",

"tehn_id2": "1652680",

"kood4": "0000",

"tunnus": "116019683",

"old_aadresstekst": "",

Page 87: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 87

"taisaadress": "Harju maakond, Saku vald, Saku alevik,

Tamme tee 6",

"kort_ads_oid": "",

"asustusyksus": "Saku alevik",

"viitepunkt_l": "24.6688954190838423",

"vaikekoht": "",

"ehakmk": "37",

"adob_id": "9838825",

"ipikkaadress": "Tamme tee 6, Saku alevik, Saku vald,

Harju maakond",

"onkort": "0",

"liikVal": "EHITISHOONE",

"ads_oid": "EE01023821"

},

{

"unik": "1",

"maakond": "Harju maakond",

"kort_unik": "",

"omavalitsus": "Keila linn",

"kort_nr": "",

"viitepunkt_x": "523045",

"viitepunkt_y": "6574569",

"adr_id": "302816",

"kort_orig_tunnus": "",

"pikkaadress": "Harju maakond, Keila linn, Tamme tn 6",

"kort_adob_id": "",

"aadresstekst": "Tamme tn 6",

"kort_adr_id": "",

"nimi": "",

"viitepunkt_b": "59.3086675822517222",

"aadress_nr": "6",

"liikluspind": "Tamme tn",

"koodaadress": "372960000000000CZ00001GUB00000000",

"boundingbox": "523040.25,6574563.70

523040.25,6574575.19 523050.33,6574575.19 523050.33,6574563.70

523040.25,6574563.70",

"kood7": "1GUB",

"g_boundingbox": "59.3086229704,24.4044978931

59.3086229704,24.4046746172 59.3087211705,24.4046746172

59.3087211705,24.4044978931 59.3086229704,24.4044978931",

"kood8": "0000",

"ehakov": "296",

"liik": "E",

"kood5": "00CZ",

"ehak": "",

"kood6": "0000",

"tehn_id2": "1424484",

"kood4": "0000",

"tunnus": "116055674",

"old_aadresstekst": "",

"taisaadress": "Harju maakond, Keila linn, Tamme tn 6",

"kort_ads_oid": "",

Page 88: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 88

"asustusyksus": "",

"viitepunkt_l": "24.4045862021033386",

"vaikekoht": "",

"ehakmk": "37",

"adob_id": "9470935",

"ipikkaadress": "Tamme tn 6, Keila linn, Harju maakond",

"onkort": "0",

"liikVal": "EHITISHOONE",

"ads_oid": "EE01150161"

},

{

"unik": "1",

"maakond": "Harju maakond",

"kort_unik": "",

"omavalitsus": "Jõelähtme vald",

"kort_nr": "",

"viitepunkt_x": "551923",

"viitepunkt_y": "6591233",

"adr_id": "1569033",

"kort_orig_tunnus": "",

"pikkaadress": "Harju maakond, Jõelähtme vald, Iru küla,

Tamme tee 6",

"kort_adob_id": "",

"aadresstekst": "Tamme tee 6",

"kort_adr_id": "",

"nimi": "",

"viitepunkt_b": "59.455693820426454",

"aadress_nr": "6",

"liikluspind": "Tamme tee",

"koodaadress": "372452100000007NA00007Y4T00000000",

"boundingbox": "551914.00,6591223.00

551914.00,6591242.00 551932.00,6591242.00 551932.00,6591223.00

551914.00,6591223.00",

"kood7": "7Y4T",

"g_boundingbox": "59.4556051695,24.9153651307

59.4556051695,24.9156870464 59.4557734958,24.9156870464

59.4557734958,24.9153651307 59.4556051695,24.9153651307",

"kood8": "0000",

"ehakov": "245",

"liik": "E",

"kood5": "07NA",

"ehak": "2100",

"kood6": "0000",

"tehn_id2": "381586",

"kood4": "0000",

"tunnus": "116044044",

"old_aadresstekst": "",

"taisaadress": "Harju maakond, Jõelähtme vald, Iru küla,

Tamme tee 6",

"kort_ads_oid": "",

"asustusyksus": "Iru küla",

"viitepunkt_l": "24.9155262084511691",

Page 89: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 89

"vaikekoht": "",

"ehakmk": "37",

"adob_id": "5863102",

"ipikkaadress": "Tamme tee 6, Iru küla, Jõelähtme vald,

Harju maakond",

"onkort": "0",

"liikVal": "EHITISHOONE",

"ads_oid": "EE01758191"

},

{

"unik": "1",

"maakond": "Harju maakond",

"kort_unik": "",

"omavalitsus": "Kuusalu vald",

"kort_nr": "",

"viitepunkt_x": "590646",

"viitepunkt_y": "6592039",

"adr_id": "2053467",

"kort_orig_tunnus": "",

"pikkaadress": "Harju maakond, Kuusalu vald, Vahastu

küla, Tamme ühistu 6",

"kort_adob_id": "",

"aadresstekst": "Tamme ühistu 6",

"kort_adr_id": "",

"nimi": "",

"viitepunkt_b": "59.4564142369350748",

"aadress_nr": "6",

"liikluspind": "",

"koodaadress": "3735388392DO9000000009W1300000000",

"boundingbox": "590623.00,6592015.00

590623.00,6592063.00 590669.00,6592063.00 590669.00,6592015.00

590623.00,6592015.00",

"kood7": "9W13",

"g_boundingbox": "59.4562037885,25.5980248306

59.4562037885,25.5988558482 59.4566246840,25.5988558482

59.4566246840,25.5980248306 59.4562037885,25.5980248306",

"kood8": "0000",

"ehakov": "353",

"liik": "E",

"kood5": "0000",

"ehak": "8839",

"kood6": "0000",

"tehn_id2": "1008960",

"kood4": "2DO9",

"tunnus": "116036222",

"old_aadresstekst": "",

"taisaadress": "Harju maakond, Kuusalu vald, Vahastu

küla, Tamme ühistu 6",

"kort_ads_oid": "",

"asustusyksus": "Vahastu küla",

"viitepunkt_l": "25.5984403368503841",

"vaikekoht": "Tamme ühistu",

Page 90: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 90

"ehakmk": "37",

"adob_id": "6886999",

"ipikkaadress": "Tamme ühistu 6, Vahastu küla, Kuusalu

vald, Harju maakond",

"onkort": "0",

"liikVal": "EHITISHOONE",

"ads_oid": "EE02156040"

}

]

}

8.2.8 Output structure Gazetteer XML service output structure is same as JSON service structure, only in XML format

Descriptions of parameters:

Parameter Description tehn_id/tehn_id2 Technical id boundingbox Address object’s BoundingBox, i.e. a rectangular box in

which the address object is contained. g_boundingbox Address object’s BoundingBox, i.e. a rectangular box in

geographical coordinates in which the address object is contained.

viitepunkt_x L-EST x coordinate (6 decimal places) of address object’s reference point.

viitepunkt_y L-EST y coordinate (7 decimal places) of object’s reference point

viitepunkt_b Geographic coordinate of object’s reference point – north latitude.

viitepunkt_l Geographic coordinate of object’s reference point – east longitude

ehak Address object’s EHAK code. tunnus Address object’s id in original register. unik (value 0 or 1) Object with the uniqueness requirement. liik Address object’s gazetteer type (1, 2, B, 4, E) liikVal Name of address object’s gazetteer type (EHAK,

TANAV, VAIKEKOHT, KATASTRIYKSUS, EHITISHOONE)

ads_oid Object’s id in ADS

Page 91: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 91

adob_id Version id of address object in ADS. kaugus Distance between the object found and given location

in meters. adr_id Unique key of address – identifier of address verson. koodaadress Code address ehak EHAK code of settlement unit ehakov EHAK code of local government ehakmk EHAK code of county kood4 Code of territorial unit kood5 Code of traffic space kood6 Code of name kood7 Code of address number kood8 Code of apartment number maakond Name of county omavalitsus Name of local government asustusüksus Name of settlement unit vaikekoht Name of territorial unit liikluspind Name of traffic space nimi Name aadress_nr Address number pikkaadress Normalized full address ipikkaadress Normalized full address in reversed order old_aadresstekst Invalid proximate address of address object onkort Does the address object have apartments (i.e. whether

building contains parts of building). kort_nr Apartment number tahis Apartment number kort_ads_oid Identifier of apartment’s address object kort_adr_id Identifier of apartment’s address kort_orig_tunnus Apartment’s identifier in original register kort_adob_id Version id of apartment’s address object kort_unik (value 0 or 1) Apartment with the uniqueness

requirement. appartments List of apartments aadresstekst Normalized proximate address sihtnumber Postal code poid Point of interest geometry Object geometry

Page 92: In-ADS Developer Guide€¦ · In-ADS Developer Guide ESTONIAN LAND BOARD 2020 6 3. Embed code generation The user can generate In-ADS HTML5 embed code dynamically by using the

In-ADS Developer Guide

ESTONIAN LAND BOARD 2020 92

In case of an error the gazetteer service returns JSON object, where intead of “vea tekst” there is a text describing the occurred error situation. {

"error": "error text in Estonian"

}

9. In-ADS gazetteer monitoring

In footer of In-ADS codegenerator page there are icons that will show how

loaded in-ADS gazetteer currently is. When green icon is displayed, then

currently there is no heavy load. When yellow icon is displayed, then there are

currently 200-400 open connections to gazetteer. When red icon is displayed,

then there are over 400 open connections to gazetteer.