M
M
Makfroy2016-07-04 06:33:32
PHP
Makfroy, 2016-07-04 06:33:32

How to display from mysql address to Yandex map?

There is a database with companies, it has an address field (city / street / house) without any coordinates, all this is in MySQL .
It is necessary to bring these companies to the Yandex map. Tell me how to do this or throw a link to an example where it is implemented, I will be very grateful.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
Maxim Alekhin, 2016-07-04
@4Geka

Idea is like this:
However, I would still enter the coordinates into the database, since it does not always determine correctly, if you have a typo, for example, or an address without specifying a city, it may simply not be where you need to put a marker

D
doctorcat, 2016-07-04
@doctorcat

https://tech.yandex.ru/maps/jsbox/2.1/geo_object_c... - regarding working with maps.
Well, the coordinates still need to be stored somewhere, or create another table in mysql where to drive in the company id and coordinates. Or add the required fields to the same. There 2 fields as a matter of fact width and longitude are necessary. Probably in mysql it's a float.

B
bro-dev, 2016-07-04
@xPomaHx

1) from base to php variable
2) from php variable to js variable.
3) through the Yandex api, if possible, get coordinators by text line with the address.
4) display the marker on the map by coordinates.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question