N
N
NotBad_Bugfix2014-08-23 19:52:45
PHP
NotBad_Bugfix, 2014-08-23 19:52:45

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

4 answer(s)
M
Maxim Alekhin, 2016-07-08
@Settler1

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.

A
Andrey Minisol, 2016-07-08
@AmadeyMinisol

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);
            }
        });
    });
});

E
Evgeny Petrov, 2014-08-23
@NotBad_Bugfix

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.

Y
Yuri Lobanov, 2014-08-24
@iiil

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 question

Ask a Question

731 491 924 answers to any question