You could use something like 
http://gmaps-samples-v3.googlecode.com/svn/trunk/geocoder/v3-geocoder-tool.html
So this could populates the lat/lng values to a form input field and you can 
save that…

they have sample code:
https://developers.google.com/maps/documentation/javascript/examples/
https://developers.google.com/maps/documentation/javascript/demogallery

Andras Kende
http://www.kende.com




On Apr 29, 2012, at 10:33 PM, Daniel Baird wrote:

> 
> To get the long and lat, you have to use javascript, and the Google Maps API 
> -- so you mightn't get much help on that from this CakePHP list.
> 
> Once your javascript has the values in the user's browser, you'll need to 
> post them back to  your cake app somehow; probably just dumping the numbers 
> into form fields for the user to submit would be fine.
> 
> From memory Google have a web service for getting the longitude and latitude 
> for a street address; have you thought about using that?
> 
> Cheers
> Daniel
> 
> On Mon, Apr 30, 2012 at 2:13 PM, Michael Gaiser <[email protected]> wrote:
> So, I want to use Google maps on my project which makes use of a
> Location model. In that model there is a longitude and latitude value.
>  Most of the tutorials I have looked at talk about how to place
> markers on your map. What I want to do is use the map to allow people
> to navigate to the location they are editing and set the longitude and
> latitude based on the current center of the map giving an easy
> interface for entering in such values. So it leads me to this
> question: How do I get the long/lat values from the google map and
> save those values to my database? Thanks.
> 
> --
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
> 
> 
> To unsubscribe from this group, send email to
> [email protected] For more options, visit this group at 
> http://groups.google.com/group/cake-php
> 
> 
> 
> -- 
> Daniel Baird
> I've tried going to the XHTML <bar /> a few times, but it's always closed.
> 
> 
> -- 
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org 
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
>  
>  
> To unsubscribe from this group, send email to
> [email protected] For more options, visit this group at 
> http://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to