WordPress.org

Forums

Pods - Custom Content Types and Fields
[resolved] Pods and displaying geolocation? (8 posts)

  1. fringer
    Member
    Posted 1 year ago #

    I've just installed Pods and so far it works great. I am building a website which lists certain objects and their properties.

    One thing I would like to do is add the geolocation for each object and display it in a post as a location on a map. What would be the best way to do it?

    I could use a different plugin just for that, but it would be better if I could do it all within Pods. Any suggestions? Any way to display a location on the map by using custom fields from Pods?

    http://wordpress.org/plugins/pods/

  2. Scott Kingsley Clark
    Member
    Plugin Author

    Posted 1 year ago #

    See http://events.dell.com/ for a really nice example of this. Also, http://nakedpizza.biz/order/

    It's not so much trying to figure out how to do it with Pods, it's just trying to figure out how to display them on the map. I ended up using Google Maps JS API and adding markers based on lat/long. I would geocode each address on save, and store the lat/long in another field.

  3. fringer
    Member
    Posted 1 year ago #

    Sorry for not responding sooner, but I completely omitted your response.

    And also, I didn't understand anything you just said :)

    If I'm not mistaken, I would need to create two separate fields for latitude and longitude, and then somehow tell Google Maps API to display the marker using those two fields?

  4. Scott Kingsley Clark
    Member
    Plugin Author

    Posted 1 year ago #

    You could create one field and store lat/long like: "XXX,-XXX"

    Then split it with an $latlong = explode( ',', $value ) to get the $latlong[0] and $latlong[1]

  5. fringer
    Member
    Posted 1 year ago #

    Thanx for your help, but that's beyond my capabilities currently.

  6. maiki
    Member
    Posted 1 year ago #

    I've used Geo Mashup with Pods. That plugin has this reverse geocode lookup feature, which you can build from other fields. I'll have an example up soon, but I figured I would point ya in that direction, fringer.

  7. mrcfisher
    Member
    Posted 1 year ago #

    So What is the best way (if at all in pods) to handle the geolocation mysql extension (that is the 'point' type).

    I'm leaning towards an 'external' mysql table (external to WP and pods) which will handle the lat/lon and geolocation indexing etc, since there's no (current?) point supported by pods.

    Thx
    Martin

  8. maiki
    Member
    Posted 1 year ago #

    I wrote a post about how I used Pods + Geo Mashup to create the directory listing maps at Live Work Oakland. Hope it is helpful for folks that don't mind plugins doing the heavy lifting for them. ^_^

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic