Google Maps (gmaps) :: DTS Church Search

July 6, 2005 | Uncategorized | 7 Comments

For my first use of the newly released Google Maps API, I hooked up our database of churches with Dallas Seminary grads. We've had a "Find a church" list for a while, but this is much more helpful. Try it out:

The one problem I ran into was the number of flags that could be
placed on a page. Below is a picture of what a map looks like with >
300 icons placed on it. It took my P4 3.2 with 1GB RAM about 2 minutes
to load the map. It seems that around 50 is about right for a speedy
map. Here's a snapshot of the map with tons of churches on it:

Dallas Seminary Find a Church with Google Maps

PS. I relied on Google Maps for geocoding. I wrote some code to
lookup the latitude/longitude data for all the church addresses. After
doing this, I found out that it might be possible to use geocoder for retreiving this data.

7 responses to “Google Maps (gmaps) :: DTS Church Search”

  1. Unresolvable says:


    This site is simply incredible. I’ve been playing around with Google Maps for leisure and have to ask… How did you get the distance information? You are passing the radius and zip to another page, and getting back xml results, but how did you do it?


  2. Unresolvable says:

    Thanks for the compliments!

    Google Maps works primarily with lat/long data instead of directly with addresses (<a href="">yahoo‘s map<a/> lets you use addresses directly). So if you want to use Google’s API, you need to get lat/long info for all your addresses.

    Next, you need to have lat/long data for all US zip codes. There are several pay databases available with this information, but I found one <a href="">free database</a> on <a href="">Code Project</a>.

    When a user types in a zip code, the zip code’s lat/long is looked up, then it is compared to the lat/long of all the addresses. You can calculate the distance in a few ways. You can just add the "radius" to the lat and long which makes a square. You can use a^2 + b^2 = c^2 to approximate the distance and get more of a circle (not totally accurate since the earth is a sphere). Or, you can actually use a lat/long distance formula, but it is harder to do a direct SQL query that way.

    Hope that helps!


  3. Unresolvable says:

    Check it out: All the churches in a 500 mile radius of my zip code with a Dallas Theological Seminary graduate as pastor. Well, sort of. It appears to be U.S. only, and I can tell you that most of Kansas, Missouri, Kentucky and farther south are definitely more than 500 miles away. But it’s still cool. The DTS Church Search is a potential new feature for the DTS web site that they’re currently testing. John Deyer blogged about setting it up and passed it along to us. It uses…

  4. Unresolvable says:

    Our little Google Maps experiment was featured on a few websites this week:

    Google Maps Mania

  5. Unresolvable says:

    A few weeks ago I went a little crazy

    with the new Google Maps API. I also hooked it up to some pictures…

  6. Unresolvable says:

    A few weeks ago I went a little crazy

    with the new Google Maps API. I also hooked it up to some pictures…

  7. Unresolvable says:

    John, did you write this in I’d love to see some source code.

Hi, I'm John Dyer. In my day job, I build websites and create online seminary software for a seminary in Dallas. I also like to release open source tools including a pretty popular HTML5 video player and build tools that help people find best bible commentaries and do bible study. And just for fun, I also wrote a book on the theology of technology and media.

Fork me on GitHub

Social Widgets powered by