Skip to: Site menu | Main content

offroadatlas

Custom GMap Solution for Automatically Centering on User Location (Part 3)

In my previous two posts, I discussed how I implemented dynamic markers and the PdMarker custom marker type into the home page for OffRoadAtlas.com. The final major GMap customization I added was the ability of the map to automatically center and zoom on the user's location based on their IP address. The solution isn't always perfect (depending on the user's internet access provider), but more often than not, it gets pretty close.

The tricky part of implementing this feature was being able provide it for anonymous users while Drupal caching mechanism was activated. Later in this post, I'll show you how I did it using a combination of hook_init(), cookies, and Javascript.

Submitted by michael on Sun, 08/31/2008 - 10:33am
Filed under:

Custom GMap Solution for Dynamically Updated Markers (Part 2)

In my previous post, I talked about how I implemented the dynamic marker system on OffRoadAtlas.com. In this post, I'll cover the functionality that the PdMarker adds to the site.

When you first hit the home page of the site, you'll see that the main content area is separated into two main sections: the narrow column to the left of the map (I call this the "info column") and the map itself.

Submitted by michael on Wed, 08/27/2008 - 10:54am
Filed under:

Custom GMap Solution for Dynamically Updated Markers (Part 1)

I recently upgraded OffRoadAtlas.com with a custom map interface based on the GMap module. I was able to do this while leaving the GMap module is virtually un-hacked (with the exception of modifying the "GMAP_API_VERSION" variable) - all of the customizations were made via an additional "helper" module that was written specifically for this site.

The site utilizes a map on the home page that shows all the off-roading areas and clubs in the database. The problem I was trying to solve was that I didn't want to have to load all 1,500+ points each time the home page was hit. Not only was this a waste of resources, but it also slowed things down considerably for the user.

Submitted by michael on Mon, 08/25/2008 - 10:08am
Filed under:

OffRoadAtlas.com Launched

I just soft-launched OffRoadAtlas.com - a new site that utilizes Drupal and Google Maps to provide users with an easy way to find and share off-road areas for their vehicles.

The site allows its members as well as anonymous users to submit off-road areas to be displayed on the site. When submitting a new area, the user can specify not only the name and description of the site, but they can also submit links associated with the area and they can pinpoint the location of the area using a highly-interactive Google Map embedded in the page.

The site also integrates various social-networking features like buddylists and user points. In addition, users of the site can search for off-road areas by zip code.

Submitted by michael on Fri, 11/16/2007 - 1:53pm
Filed under: