A
A
Alexander Stepanov2019-07-28 01:17:46
Yii
Alexander Stepanov, 2019-07-28 01:17:46

How to make yii2 friends with geolocation?

I want to attach to my site the geolocation of users by ip and geodata for gadgets with display on a Google map and transfer of the city, region to the search query on the same site.
The search for add-ons did not give anything sensible, except for one that can give out something by ip. Perhaps something will work out with it, but the question remains with the transfer of the location of a certain gadget.
How can yii2 be friends with geolocation in this perspective?
Maybe there are ready-made solutions that are hiding from me?
Maybe even an article to read?
Where to dig?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Bay, 2019-07-28
@Exebeche

There write on the strength of half an hour.
1) by ip - write a widget, it is elementary. ip api for example service.
2) by gadget geo - write a js function that requests the location and sends it to the server for saving, or stores it on the client. Google maps has examples of implementation.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question