//print_r($_POST);
//цвет полигонов
$color="#581845";
//центр
$center = isset($_POST['center']) ? $_POST['center'] : '';
if($center==''){$center = '[55.74953, 37.62337]';}
//зум
$zoom_min = isset($_POST['zoom_min']) ? $_POST['zoom_min'] : '';
if($zoom_min==''){$zoom_min = '0';}
$zoom_max = isset($_POST['zoom_max']) ? $_POST['zoom_max'] : '';
if($zoom_max==''){$zoom_max = '20';}
//граница области (55.66519, 37.22443);(55.86529, 38.06076)
$border_view = isset($_POST['border_view']) ? $_POST['border_view'] : '';
if($border_view!=''){
$pieces = explode(";", $border_view);
if(isset($pieces[0])&&isset($pieces[1])){
$border_view ='var bounds = new L.LatLngBounds(new L.LatLng'.$pieces[0].', new L.LatLng'.$pieces[1].');';
}else{
$border_view='';
}
}
//полигон [55.81594, 37.46063],[55.8252, 37.8273],[55.71976, 37.60757]
if($_POST['polygon_type']=='polygon'){
$coordinates = isset($_POST['coordinates']) ? $_POST['coordinates'] : '';
if($coordinates!=''){
$polygon="L.polygon([".$coordinates."
], {color: '".$color."',fillColor: '".$color."'}).addTo(map);";
}else{
$polygon='';
}
}
//круг [55.76962, 37.70096]
if($_POST['polygon_type']=='circle'){
$circle_center = isset($_POST['circle_center']) ? $_POST['circle_center'] : '';
$circle_radius = isset($_POST['circle_radius']) ? $_POST['circle_radius'] : '';
if($circle_radius==""){$circle_radius='0';}
if($circle_center!=''){
$circle="L.circle(".$circle_center.", ".$circle_radius.", {
color: '".$color."',
fillColor: '".$color."'}).addTo(map);";
}else{
$circle='';
}
}
?>
Ixodes System, developed by Chernenko Vladislav