Combining the Maps plugin with the directory (and importing an overlay)

Hello,

I'm building a directory using the Directory plugin from WPMUDev and I wanted to implement the Google Maps Plugin. I've been having some problems though. I'm using WordPressMS 3.1.

1) I set the plugin to display maps automatically, pulling from a custom field named Address, to show each listed business's location. I tried setting it to show up before or after the tag, but in either case it didn't show up.

2) I want to overlay a pre-existing saved Google "My Map" or KML with the data on where each of the bus stops are for our area, so it will show the nearest bus stop. I'd even be willing to pull a FusionTable or type in a set of points using javascript, all options that GMaps seems to support, but I'm not sure how to build that into all the pre-existing code in the plugin.

I'd really like to use these two Premium WPMUDev plugins together, but I could really use some help to figure out where I'm going wrong.

Thanks.

  • Mason
    • DEV MAN’s Sidekick

    Hiya gmustumedia,

    First off, welcome to WPMU DEV :slight_smile:

    My first thought would be to check for a javascript conflict. Can you enable the scripting tab in firebug and do a hard refresh of the page? Let us know any errors that come up.

    We made some upgrades to the plugin to coincide with WordPress 3.2 which now uses a newer version of jQuery. All of that means if you're using an older version of WordPress you may also want to use an older version of this plugin.

    Also, what version of Directory are you using?

    I want to overlay a pre-existing saved Google "My Map" or KML with the data on where each of the bus stops are for our area, so it will show the nearest bus stop. I'd even be willing to pull a FusionTable or type in a set of points using javascript, all options that GMaps seems to support, but I'm not sure how to build that into all the pre-existing code in the plugin.

    I'll ask the developer about this. I imagine this'll take quite a bit to put together though. We may consider KML implementation in some form i the future.

    Happy to take a look with you at the front end. Gotta link to the site?

    I've tested the custom fields of the map plugin with the directory plugin and it seems to work fine.

    Thanks!

  • DavidM
    • DEV MAN’s Mascot

    Hi gmustumedia and welcome to WPMU DEV!

    I did some testing on this and found that the map does indeed display when the custom field's ID is entered in Settings -> WPMU DEV > Address field name rather than the name.

    Here's a quick illustration of where to find that ID in Directory -> Content Type.

    I'll mention this to the developer to see if there might be a way to clarify that in the Map settings page. The developer may be able to help you with some pointers on your second query also.

  • gmustumedia
    • New Recruit

    Hello masonjames and DavidM

    Thanks for your assistance!

    It looks like the fieldID data was the correct thing, it is properly pulling the info now and the map is showing up.

    @masonjames - According the Google Maps API documentation I was reading it should be possible to feed a set of latitude and longitude coordinates into the call for the map with either javascript for each point or with KML or a Fusion Table (http://code.google.com/apis/maps/documentation/javascript/overlays.html#LayersOverview). It looks like I could make a map in My Maps on Google and pull the KML to my server and call it.

    It would have to be done wherever you've coded in the call to the map in the plugin and since I need to call the same layer every time, I should be able to hard-code it in somewhere in the plugin.

    Somewhere in the plugin should be a call to the maps api, something along the lines of var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);.

    If you could tell me where the call is, I can add the required code to overlay my map.

    The site is http://oncue.onmason.com and you can see an active listing at http://oncue.onmason.com/listing/buffalo-wing-university/

  • Mason
    • DEV MAN’s Sidekick

    Hiya gmustumedia,

    Very cool stuff! I'd be very interested in seeing what you come up with here and have been looking at the KML documentation myself.

    The api call for maps happens in two files:
    wpmu_dev_maps_plugin/js/google_maps_admin.js - starts at line 518
    wpmu_dev_maps_plugin/js/google_maps_user.js - starts at line 307

    Thanks!

  • Mason
    • DEV MAN’s Sidekick

    Hiya,

    Did you get everything you needed here?

    As we haven't heard back from you we're going to assume the problem
    was sorted out and mark this ticket as resolved.

    If it wasn't resolved, or you have any more questions related to this
    thread please feel free to post them below and tick the 'Mark as Not
    Resolved (re-open)' box below the post area (or else we'll miss it!)

    Otherwise, thanks for using the forums, and for being a member of WPMU
    DEV, it's a pleasure to help you out and we look forward to being of
    assistance in the future.

    Thanks!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.