array(18) {
[0]=> string(30) "HTTP/1.0 301 Moved Permanently"
[1]=> string(32) "Location: http://www.google.com/"
[2]=> string(38) "Content-Type: text/html; CHARSET=Windows-1251"
[3]=> string(35) "Date: Sun, 26 Sep 2010 00:59:50 GMT"
[4]=> string(38) "Expires: Tue, 26 Oct 2010 00:59:50 GMT"
[5]=> string(38) "Cache-Control: public, max-age=2592000"
....
string(15) "HTTP/1.0 200 OK"
[10]=> string(35) "Date: Sun, 26 Sep 2010 00:59:51 GMT"
[11]=> string(11) "Expires: -1"
[12]=> string(33) "Cache-Control: private, max-age=0"
.....
}*/
ymaps.ready(function () {
var map = new ymaps.Map(
'map-pickups',
{center: [55.75, 37.64], zoom: 10, controls: ['zoomControl', 'fullscreenControl']},
{searchControlProvider: 'yandex#search'}
);
var objManager = new ymaps.ObjectManager({
clusterize: true,
gridSize: 32,
clusterDisableClickZoom: true
});
objManager.objects.options.set('preset', 'islands#blueDotIcon');
objManager.clusters.options.set('preset', 'islands#blueClusterIcons');
map.geoObjects.add(objManager);
var pickups = {
type: 'FeatureCollection',
features: []
};
var coordinates = [
[55.831903, 37.411961],
[55.763338, 37.565466],
[55.843363, 37.778445]
];
$.each(coordinates, function (id, coordinates) {
pickups.features.push({
type: 'Feature',
id: id,
geometry: {type: 'Point', coordinates: coordinates},
properties: {
balloonContentHeader: 'ПВЗ №' + id,
balloonContentBody: 'Адрес доставки',
balloonContentFooter: 'График работы',
clusterCaption: 'ПВЗ №' + id,
hintContent: 'ПВЗ №' + id
}
});
});
objManager.add(pickups);
map.setBounds(map.geoObjects.getBounds());
});
<input type="submit" value="Отправить" data-value="Отправка . . .">
$("#myForm").submit(function(event) {
event.preventDefault();
var msg = $("#msg").val();
if (!msg) {
return alert("Заполните текст сообщения!");
}
var $form = $(this),
$submit = $(':submit', $form);
$submit.val($submit.data('value'));
$.ajax({
url: "action.php",
data: "msg=" + msg + "&action=add",
success: function() {
$form.trigger('reset');
show_messages();
}
});
});