strap("map.GeositionMap");
strap("coordinate.CoordinateRT90");
strap("map.item.ItemPointDefault");
strap("map.item.ItemArea");

var map;

function onLoadGeosition() {
	map = new GeositionMap(document.getElementById("map"), mapSettings);
	var startPoint = new CoordinateRT90(6567914, 1627470);
    
    map.setScale(2500);
 	map.setCenter(startPoint);
 	
 	//show_metazones();
}

function show_metazones()
{
	var chb = $('#SearchForm :checkbox');
	
	if(chb.fieldValue().length > 0)
	{		
		//alert(chb.fieldValue());
		// Draw zones on the map
		get_mzone(chb.fieldValue());
	}
}
function clear_map()
{
	map.clear();
}
//Converts input to coordinates.
function toCoordinates(intArray) {
  var coordinateArray = new Array();
  
  for (var i = 0; i < intArray.length; i++) {
    coordinateArray.push(new CoordinateRT90(intArray[i][0], intArray[i][1]));
  }
  
  return coordinateArray;
}