You lost me after Working with the geocoder in PHP is quite simple. On Oct 5, 7:55 am, Jason Jonas <[email protected]> wrote: > James, > > I know of no PHP library for making GMAPI requests, but then I never > looked for one either. :) Like you, I'm not johnny-javascript and > essentially employ the learn-by-hacking method. > > Working with the geocoder in PHP is quite simple. At SpotWalla our > geoCoder is a cron-managed PHP script that utilizes curl and > json_decode. Once that's complete, you have an object that can be > easily manipulated. Here's a little snippet: > > $req = curl_init(); > curl_setopt( > $req, > CURLOPT_URL, > "http://maps.google.com/maps/api/geocode/json? > sensor=true&latlng=$latitude,$longitude"); > curl_setopt($req, CURLOPT_RETURNTRANSFER, 1); > $resp = curl_exec($req); > curl_close($req); > $o = json_decode($resp); > > You can also ask the geocoder for XML output instead of JSON and use > simplexml_load_string instead of json_decode. Alternatively, you can > use simplexml_load_file with the URL, but I've found it to be a little > slower than curl. Geo Coding and coordinate caching can be done > outside of writing JavaScript. > > Not sure about directions and such as I've never done anything with > that. > > Jason > > On Oct 4, 6:47 pm, James <[email protected]> wrote: > > > > > any ideas? > > > On Oct 1, 5:56 pm, James <[email protected]> wrote: > > > > I am not a javascript developer, I am a PHP developer and so I wanted > > > to know if anyone could recommend a good PHP class to handle the API > > > calls for me to google maps. The specifics of what I need to do is: > > > > Geocode addresses and have the coordinates avalible for me to cache in > > > a mysql database. > > > > Ask the user for their address and provide them directions from their > > > address to a given set of cached coordinates. > > > > Display a map for all of this, also have a failsafe for users without > > > javascript enables, such as static maps, server-side api calls, ect. > > > > Can anyone recommend such a php class, thanks.- Hide quoted text - > > - Show quoted text -
-- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.
