Hi all!
I am using EGMap extension, which works fine until i needed to get coordinates from an given address.
I am using the example that is found on the extension page, http://www.yiiframework.com/extension/egmap#hh12
The next code is exactly the same code than the one in the documentation, but the latitude and longitude which are returning is 0,0.
$gMap = new EGMap();
$gMap->setWidth(500);
$gMap->setHeight(400);
$gMap->zoom = 5;
$sample_address = 'Czech Republic, Prague, Olivova';
// Create geocoded address
$geocoded_address = new EGMapGeocodedAddress($sample_address);
$geocoded_address->geocode($gMap->getGMapClient());
// Center the map on geocoded address
$gMap->setCenter($geocoded_address->getLat(), $geocoded_address->getLng());
// Add marker on geocoded address
$gMap->addMarker(
new EGMapMarker($geocoded_address->getLat(), $geocoded_address->getLng())
);
$gMap->renderMap();
I tried changing the address, i am executing it with the Mozilla Firefox Console running and it is telling me NO errors.
So I can not figure out why is happening this…
Has anyone any idea about the reason of this problem?
I will really appreciate any suggestion
Thank you very much!
Regards!