hello guys, is there some sort of getLatitude or getLongitude function in yii i want to get the latitude and logitude value from an address to represent it on a google map, kindly help me if any one know about this… thanks in advance
hello guys, is there some sort of getLatitude or getLongitude function in yii i want to get the latitude and logitude value from an address to represent it on a google map, kindly help me if any one know about this… thanks in advance
It’s as simple as making a curl request to
https://maps.googleapis.com/maps/api/geocode/json?sensor=false&address=New+York+City,+United+States
capture the output, json_decode it and find the lat/lng of the location.
i guess there should be a function for this in yii because i have seen a jquery code which is just using .lat() and .lng() for getting latitude and longitude here it is: http://www.ramirezcobos.com/2011/02/05/a-reverse-geolocator-tool-with-egmap-2-0-extension/