I have a national customer who are currently recruiting dealers by selling each dealer an area for a set fee. They want a 'find a dealer' feature on their website which should point customers to the dealer who has purchased the area the visitor enters. At first we were going to list major cities with the hope that the visitor would click on the nearest city name that they recognised, but it occurred to me that it must be possible to use the maps API to map postcodes or town names to specific areas.
The problem is that it's not quite a "find my nearest dealer" scenario because of the way they're selling specific areas - the dealer for your area might not be the nearest to your postcode/town. I've used the Google maps API in the past, but mainly for plotting things on maps dynamically rather than using it to calculate some geography for help in a database query - can anyone help? I'll be using the PHP API if that makes any difference.