to 40.78343450, -73.96624950 http://maps.googleapis.com/maps/api/geocode/json?address=%22New%20York,NY%22&sensor=false
but after a few hours of messing with it, I can't figure out what to do with it and where to put it. Should it go in my html source where my map is? Should it go in my PHP file since the locations for geocoding will come from the PHP file? Should it go in it's own external file?
I tried using jQuery.parseJSON in my main html page but couldn't figure out how to get any output from it. Google also says that you can easily parse out the location coordinates by using this script, but I have no idea what to do with it either.
Could someone please write an example on how to take the JSON data, parse it so there's only location data, and make it available to the Google Maps API so that I can place a marker? I can't find anything that gives implementation examples or details, just how to do it if you already know what you're doing, which I obviously don't. I based my stuff off of Google's HTML example files but they don't have one for static geocoding, only dynamic geocoding (which is apparently built into the maps API).
Here's a basic road map of what I'm trying to do:
1. use scraper.php to scrape city and state from a job listing site into an array (done)
2. strip the 25 locations out of the array one at a time using a for loop (done)
3. feed those individual strings into the geocoding API url (done)
4. Parse the JSON output from the geocoding API URL and grab the coordinates from the location field, then overlay them on the map (this is what I need help with)