//
";
}
commentNode += " ";
commentNode += "Введите Ваш комментарий:
";
markerSelect.openInfoWindowHtml(commentNode);
}
/** Посылка запроса добавления комментария к метке **/
function insertCommentShop(id, user_id, type) {
var text_comment = document.getElementById("comment").value;
if (text_comment == "") {alert("Вы не ввели комментарий.");}
else {
commentId = id;
commentType = type;
if (user_id == "") {
var user_id = encodeURIComponent(document.getElementById("name").value);
}
var send = "id="+id+"&uid="+user_id+"&type="+type+"&text_comment="+encodeURIComponent(text_comment)+"&code=vldmg";
var url = "./catalog/mapscripts/map_insert_comment.php";
request.open("POST", url, true);
request.onreadystatechange = insertCommentShopAnswer;
request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
request.send(send);
}
}
/** Обработка ответа добавления комментария к метке **/
function insertCommentShopAnswer() {
if (request.readyState == 4) {
if (request.status == 200) {
alert("insertCommentShopAnswer");
alert(request.responseText);
getComment(commentId, commentType, 1);
}
}
}
/** Создание и добавление маркера **/
function createMarker(point, number) {
// получаем какой выбран тип
type = parseInt(document.getElementById("type_marker_id").value);
typeText = "";
var shop = 0;
switch (type) {
case 1:
markerOptions = { draggable: true, /*title: ""+number+" ДПС "*/ icon: new_icon[0] };
typeText = arType[0];
break;
case 2:
markerOptions = { draggable: true, icon: new_icon[1] };
typeText = arType[1];
break;
case 3:
markerOptions = { draggable: true, icon: new_icon[2] };
typeText = arType[2];
break;
case 4:
markerOptions = { draggable: true, icon: new_icon[3] };
typeText = arType[3];
break;
case 5:
markerOptions = { draggable: true, icon: new_icon[4] };
typeText = arType[4];
break;
case 6:
markerOptions = { draggable: true, icon: new_icon[5] };
typeText = arType[5];
break;
case 7:
markerOptions = { draggable: true, icon: new_icon[6] };
typeText = arType[6];
break;
case 8:
markerOptions = { draggable: true, icon: new_icon[7] };
typeText = arType[7];
break;
case 9:
markerOptions = { draggable: true, icon: new_icon[8] };
typeText = arType[8];
break;
case 10:
markerOptions = { draggable: true, icon: new_icon[9] };
typeText = arType[9];
break;
case 11:
markerOptions = { draggable: true, icon: new_icon[10] };
typeText = arType[10];
break;
case 12:
markerOptions = { draggable: true, icon: new_icon[11] };
typeText = arType[11];
break;
case 13:
markerOptions = { draggable: true, icon: new_icon[12] };
typeText = arType[12];
break;
}
if (type == 1 || type == 2 || type == 3 || type == 13) {
commentNode = "Введите описание*:
Введите Ваш комментарий:
";
}
else {
shop = 1;
commentNode = "Добавление новой организации
Название*: | |
E-mail: | |
Телефон: | |
Web-сайт: | |
Описание: | |
Комментарий: | |
Ссылка на текущее место на карте:
http://localhost/index.php?lat="+center.lat()+"&lng="+center.lng()+"&size="+size+"