WordPress.org

Ready to get started?Download WordPress

Forums

Geo Mashup
[resolved] Custom Post Type with geo_address - bulk geocoding possible? (4 posts)

  1. MCM
    Member
    Posted 1 year ago #

    In short, I have hundreds of custom posts that have geo_address but I would like them to be geocoded such that the lat/long custom fields be updated accordingly (they currently not set).

    i.e. I had custom posts with custom-field 'address' and renamed it to geo_address.

    Is there an automated way (code) to iterate through these posts and calculate the coordinates and update/insert the lat/long values?

    http://wordpress.org/extend/plugins/geo-mashup/

  2. Dylan Kuhn
    Member
    Plugin Author

    Posted 1 year ago #

    I haven't written that code. It's tricky because you have make sure you don't exceed the number of requests allowed by the API used for geocoding. The simplest way I can think of would be to set the "Geocode Custom Field" setting to something like "temp_address", then loop through all the posts with "geo_address" and add "temp_address" with the same content. Geo Mashup will attempt to geocode when the custom field is saved - then you could remove it.

  3. MCM
    Member
    Posted 1 year ago #

    Dylan I found a plugin that can do it, but problem is my posts are already in the system, SimpleMap Plugin for WordPress.

    Perhaps you can checkout the code and advise how to write my own function to do it.

  4. Dylan Kuhn
    Member
    Plugin Author

    Posted 1 year ago #

    I can't write that code now, but I've added a feature request for it:

    http://code.google.com/p/wordpress-geo-mashup/issues/detail?id=597

    If you write it or find another way, even if it's using SimpleMap, I'd love to see your solution.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic