Answer the question
In order to leave comments, you need to log in
How to install a pin at the address (Yandex.maps)?
Hello, the situation is as follows: an address comes from the database, and it is necessary that a pin with this address and a description be generated on the Yandex map built into the site, figured out how the pin is generated, but there is no way to get coordinates from the address. I tried to copy-paste from the docks, still does not plow
Answer the question
In order to leave comments, you need to log in
In your code, when sending, the call () function is called with no bark, action points to void:
And this blocks your handler on jquery, the queue simply does not reach it.
try like this:
$(function() {
$('.form-order').on('submit', function() {
var empty = $(':text', this).filter(function() {
return $.trim($(this).val()).length < 3;
}).length;
if (empty) {
alert('В полях должно быть более 3 символов')
return false;
}
$.ajax({
type: 'POST',
url: '../php/send.php',
data: $(this).serialize(),
success: function(data) {
if (data) {
$('.result').text('Ваша заявка отправлена');
}
},
error: function(xhr, str) {
alert('Возникла ошибка: ' + xhr.responseCode);
}
});
});
});
How can one go wrong with geocoding and its example ?
Please note that the number of geocoding requests is 25,000 per domain per day. It is better to do geocoding once when adding an object to the database, and then transfer the coordinates.
Show your code, your attempts. Because if the task is to generate a map with the necessary addresses using geocoding when loading the page, an example from the Yandex API is enough.
Here is an example codepen.io/iiil/pen/Fhaty
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question