• Hi,

    I am trying to create a somewhat complex application using WP2.2 as the base. I am new to WP, & am picking up enough PHP to get me by. The problem I am now experiencing is how to integrate Google Maps into my WP application. I’d like for user posts to appear marked on the map; also I’d like the map that a user sees when they first arrive on the site to be personalized to their IP address/ location.

    I’d appreciate any resources/ examples where maps have been integrated into WP.

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • I assume you’ve already dug through the Google Maps API documentation?

    I’ve included a map in a WP page. It’s a static map that shows a number of points with lines drawn between them. The points and the info about them are stored in a db table. So my little script probably won’t help you that much. But this is what I did, more or less:

    1) I got a google map api key.

    2) I set up a template for my map page because I wanted it to be separate from my main blog.

    3) I put a call to the google map script, including the key for my page.

    4) I added onload="showMap();" to my body tag.

    5) I replaced the loop with <div id="map" style="width: 820px; height: 700px"></div>

    6) I wrote a script that reads the db table and plots the markers and lines on the map and stored it with my template.

    7) In the footer of my template I include the script page.

    8) In WP, I created a page using my template.

    I’m not all that good at this, and may have done more than needed and may have done it in a hokey way. But it did work.

    I use a couple of google map plugins on my site(http://cjw.me.uk), some of which might fit the bill…

    Geo Mashup
    http://www.cyberhobo.net/downloads/geo-mashup-plugin/
    Adds a Google Maps mashup of geocoded blog posts. By Dylan Kuhn.

    Inline Google Maps
    http://avi.alkalay.net/2006/11/google-maps-plugin-for-wordpress.html
    This plugin shows google maps anywhere on blogpage. By Avi Alkalay.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Using Google Maps in WP’ is closed to new replies.