|
|
|
|
|
Downloading an address of a point

setInfoCallback function

Assigns function caused by any use of the information action(Information icon) on the map. Data to be transmitted to the substitution function included:

Available parameters:
callback{Function} The additional sernice function of information action.


map.setInfoCallback(onInfo);  //assign the function called each time the
                              //on the map

function onInfo(elem) //parameter 'elem' contains information about the specified point on the map
{
  var div = document.getElementById('adres'); //DIV element, where the information will be embedded
                                              //about the point
  var p = elem.position
  div.innerHTML ='Country: ' + p.areaName0           //
           + '
Voivodeship: ' + p.areaName1 // + '
Zip Code: ' + p.zip //the information that will be displayed + '
City: ' + p.cities //in DIV element + '
Longitude: ' + p.lon // + '
Latitude: ' + p.lat; // };
//DIV element, where will be inserted the downloaded data

After selecting the Information icon in the left column will appear the data point on the map.