0

i am working on a Cakephp 2.x .. i have implemented the google maps into my app ...i am using this helper

https://github.com/marcferna/CakePHP-GoogleMapHelper

what i want is i want to get the address on the basis of longitude and lattitude.. dont know how can i get this as i have never worked on the google maps before ...

here is code of my view page which is showing the map

      $map_options = array(
    'id' => 'map_canvas',
    'width' => '950px',
    'height' => '600px',
    'style' => '',
    'zoom' => 16,
    'type' => 'ROADMAP',
    'custom' => null,
    'localize' => false,
    'latitude' => $latitude,
    'longitude' =>  $longitude,
    'address' => '1 Infinite Loop, Cupertino',
    'marker' => true,
    'markerTitle' => 'This is my position',
    'markerIcon' => 'http://google-maps-icons.googlecode.com/files/home.png',
    'markerShadow' => 'http://google-maps-icons.googlecode.com/files/shadow.png',
    'infoWindow' => true,
    'windowText' => 'My Position'
);
?>



<?php echo $this->GoogleMap->map($map_options); 
mynameisjohn
  • 175
  • 1
  • 9
  • 31
  • Might want to check this link for how to get longitude and latitude from an address https://stackoverflow.com/a/8633623/2003890 – Thijs Limmen Jul 15 '13 at 14:59
  • well i have the longitude and lattitude ... i want to retrive the address on the basic of these two ... in simple php we can do something like formatted address – mynameisjohn Jul 15 '13 at 15:07

1 Answers1

0

So reverse geocoding basically?

Check this out: https://developers.google.com/maps/documentation/javascript/examples/geocoding-reverse

mark
  • 21,691
  • 3
  • 49
  • 71