J
J
jao2012-05-29 14:05:05
Yii
jao, 2012-05-29 14:05:05

How to get user's current coordinates using Yii?

There is a wonderful EGMap extension ( www.yiiframework.com/extension/egmap) that allows you to work with the Google maps API. There is a wonderful javascript framework ( code.google.com/p/geo-location-javascript/) that allows you to get the current coordinates. But there is no Yii extension that works with this framework.
There is a task to get the current location of the user and display it on the map. How can this be done with all of the above?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
B
Bogdan Pasechnik, 2012-05-29
@taral

You generate a map with a server script, and get the coordinates through the js library. Normally, this is solved either by the EGMap extension in the script registration of which you will add the appropriate code with geo-location-javascript. Or stop using EGMap. Connect it manually (which is very simple) and add the code there to determine the coordinates with geo-location-javascript

A
Alexey Prokhorov, 2012-05-29
@megahertz

Everything is elementary, we connect geo-location-javascript, get location data in JS and pass it to the server handler with Ajax, or save it in a cookie.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question