Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

php|architect:
Finding Exactly Where You Are
Nov 11, 2011 @ 18:05:40

On the php|architect site today Chris Tankersley has a new tutorial about geocoding, Finding Exactly Where You Are - a guide to integrating the Yahoo! Placefinder service into your application.

Yahoo! PlaceFinder is a REST web service that will turn an address into the latitudinal and longitudinal coordinates in XML, JSON, or serialized PHP objects. It has a few other functions too, like finding the nearest airport, time zone, and even telephone area code. [...] PlaceFinder is a very simple REST service, so cURL is a quick and easy way to access it. There are no authentication tokens to deal with or logon procedures. Just send a GET request, and read the response.

He links you to the service to get an API key and includes a simple class (PlaceFinderAPI) that builds the GET query for you and makes the request via curl. Also included is an example showing how to find a given location (coincidentally, his location choice is the hotel where the php|tek conferences are held).

tagged: geocode yahoo placefinder api tutorial rest webservice

Link:

Aaron McGowan' Blog:
Geocoding search terms with Bing Maps
Nov 17, 2010 @ 18:28:40

Aaron McGowan has a new post to his blog that looks at the work he's done interfacing with the Bing Maps API to do some geocoding for Emitter.ca.

One of the key features which was required for Emitter.ca, was the ability to geocode search terms like street addresses, cities, and postal codes, that a user enters so that Emitter.ca could easily return facilities that are nearby. To do this, we leveraged Bing Maps's API for performing the Geocode lookup. Microsoft offers a variety of APIs for allowing your application to interact with Bing Maps, however, for Geocoding search terms, we utilized Bing's SOAP API.

He shares the class he uses to pull the information out of the Bing Maps SOAP response and push the details into the properties of a class. The simpel class made interfacing with the API an easy task and allowed for string-based lookups on just about anywhere (like "Toronto, Ontario").

tagged: geocode search bing maps soap api

Link:

PHPRiot.com:
Geocoding with PHP and the Google Maps API
Feb 11, 2008 @ 14:06:29

New from PHPRiot today, there's this new tutorial showing you how to combine a PHP interface with the Google Maps API to do some geocoding of your own.

Geocoding is the process of finding the longitude and latitude of a given address or location. The Google Maps service gives developers and web site owners free access to their geocoder, both using the Google Maps JavaScript API, as well as using the web service. In this article I will show you how to access the geocoder web service using PHP so that it can be used in your own applications.

The tutorial walks you through every step of the way - from getting your Google API ID to making a simple request all the way out to using placemarks to store locations to fetch later on.

This is a great, very detailed summary that anyone wanting to work with the Google API in PHP should definitely check out.

tagged: tutorial google map api geocode placemark point

Link:

Spindrop.us:
Caching REST with sfFunctionCache
Apr 09, 2007 @ 15:49:00

On the SpinDrop blog, there's a new article from Dave Dash highlighting one of the features of the symfony framework they use to bounce requests off of Yahoo!'s Geocoding API to normalize addresses.

I wrote a wrapper (I'll release it as a plugin if requested) for the Geocoding API, the bulk of the work (the REST call) occurs in a function called doQueryGIS.

He include the code for the wrapper function and show how to use it to make a call to the API, setting up the caching directory and passing in the raw address data from the user.

tagged: symfonyframework geocode yahoo api sffunctionclass symfonyframework geocode yahoo api sffunctionclass

Link:

Spindrop.us:
Caching REST with sfFunctionCache
Apr 09, 2007 @ 15:49:00

On the SpinDrop blog, there's a new article from Dave Dash highlighting one of the features of the symfony framework they use to bounce requests off of Yahoo!'s Geocoding API to normalize addresses.

I wrote a wrapper (I'll release it as a plugin if requested) for the Geocoding API, the bulk of the work (the REST call) occurs in a function called doQueryGIS.

He include the code for the wrapper function and show how to use it to make a call to the API, setting up the caching directory and passing in the raw address data from the user.

tagged: symfonyframework geocode yahoo api sffunctionclass symfonyframework geocode yahoo api sffunctionclass

Link:

Community News:
PHPGeocache 1.0 Released
Aug 17, 2006 @ 12:44:45

The PHPGeocache library is a newly released (version 1.0 on July 30th) toolkit to help any web developer work with geocaching quickly and easily on their own site.

More and more people are learning about the fun sport Geocaching. Why not integrate geocaching data into your own website, creating a mashup or simply creating your own geocaching website?

PHPGeocache is a free toolkit implemented in PHP which allows everyone to integrate geocaching information into his own website. And yes, it can also be used for commercial projects.

The library allows you to grab and store geocoded data in a local database and makes it easy to pull the information out and manipulate it as you need. There's also a built in system to create paths of wyapoints for a hunt in true geocaching fashion.

tagged: geocachie geocode waypoint library toolkit google api geocachie geocode waypoint library toolkit google api

Link:

Community News:
PHPGeocache 1.0 Released
Aug 17, 2006 @ 12:44:45

The PHPGeocache library is a newly released (version 1.0 on July 30th) toolkit to help any web developer work with geocaching quickly and easily on their own site.

More and more people are learning about the fun sport Geocaching. Why not integrate geocaching data into your own website, creating a mashup or simply creating your own geocaching website?

PHPGeocache is a free toolkit implemented in PHP which allows everyone to integrate geocaching information into his own website. And yes, it can also be used for commercial projects.

The library allows you to grab and store geocoded data in a local database and makes it easy to pull the information out and manipulate it as you need. There's also a built in system to create paths of wyapoints for a hunt in true geocaching fashion.

tagged: geocachie geocode waypoint library toolkit google api geocachie geocode waypoint library toolkit google api

Link:

Developer.com:
Performing HTTP Geocoding with the Google Maps API
Jul 24, 2006 @ 17:09:22

Developer.com is continuing their series (on the Google Maps API, see here for a previous article) today with this new tutorial, a look at using the geocaching functionality the Google Maps API offers over a HTTP connection.

In this tutorial I showed you how to submit geocoding requests via JavaScript, which is convenient because it's easy to subsequently build a map using the retrieved coordinates. However, if you're interested in performing bulk geocoding for reason of storing a series of coordinates in a database, you might be interested in taking advantage of a second means for geocoding, accomplished by way of HTTP request.

Storing the coordinates locally will not only decrease the number of required daily geocoding requests (limited to 50,000 daily), but it will speed your application by cutting down on the total requests required to ultimately build a map.

They start off with a simple example, showing how to sed the request out to Google as well as the output. They show how to get the information you need out of the return XML. This basic example leads to something more complex - the server-side caching of the geocode results in a MySQL database.

tagged: google maps api xml http geocode mysql database cache google maps api xml http geocode mysql database cache

Link:

Developer.com:
Performing HTTP Geocoding with the Google Maps API
Jul 24, 2006 @ 17:09:22

Developer.com is continuing their series (on the Google Maps API, see here for a previous article) today with this new tutorial, a look at using the geocaching functionality the Google Maps API offers over a HTTP connection.

In this tutorial I showed you how to submit geocoding requests via JavaScript, which is convenient because it's easy to subsequently build a map using the retrieved coordinates. However, if you're interested in performing bulk geocoding for reason of storing a series of coordinates in a database, you might be interested in taking advantage of a second means for geocoding, accomplished by way of HTTP request.

Storing the coordinates locally will not only decrease the number of required daily geocoding requests (limited to 50,000 daily), but it will speed your application by cutting down on the total requests required to ultimately build a map.

They start off with a simple example, showing how to sed the request out to Google as well as the output. They show how to get the information you need out of the return XML. This basic example leads to something more complex - the server-side caching of the geocode results in a MySQL database.

tagged: google maps api xml http geocode mysql database cache google maps api xml http geocode mysql database cache

Link:

The OC Food Review Blog:
Notes on implementing location based search (part 2 of 2)
Jun 30, 2006 @ 17:05:41

Rahim Sonawalla has posted part two of his series on The OC Food Review blog covering the creation of a location-based search using geocoding.

We got geocoding out of the way in the first part, so now it's time to talk distances. To figure out how far apart two places are, we could use the traditional method of calculating distances between two points, but that damn Columbus didn't fall off into the Twighlight Zone when he passed the horizon. Turns out the Earth isn't flat, go figure. Oh, and since it isn't flat, assuming that it is will cause your numbers to be off when calculating distances using normal geometry—sometimes by miles.

He links to a formula for finding the difference when the distances are short as well as a PHP implementation of the Haversine formula when the distances get long.

He combines this new knowledge with the information already obtained by the geocoding in the first part and a SQL database to help narrow down the items in the list. Then, for each of those, he compares the latitude and longitudes to get the difference between them (in miles).

tagged: location based search geocode distance between miles location based search geocode distance between miles

Link:


Trending Topics: