MichDe / wordpress-geo-mashup

Automatically exported from code.google.com/p/wordpress-geo-mashup
1 stars 0 forks source link

Populate Geo Fields from Address Saved in Events Manager #580

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I'm using Events Manager to keep track of a number of events at many different 
locations. I want each of the events to show up on the Geo Mashup map. The only 
way I have found to do that is to manually insert the geo_latitude and 
geo_longitude fields on each event post. (These posts are of a custom post 
type.)
I've tried enabling the Geo Mashup entry on the Event entry page, but it 
conflicts with Events Manager's address entry.
What I'd really like is some way to automatically populate the proper fields 
using the address data that's already in the Event. I don't know how this data 
is stored. It doesn't seem to be a custom field.
Any ideas?

http://www.moretomass.com

Original issue reported on code.google.com by bryansul...@gmail.com on 18 Jun 2012 at 6:24

GoogleCodeExporter commented 9 years ago
The Events Manager would have to provide a hook to give you access to event 
data when it saved. Looks like a possibility: 

http://wp-events-plugin.com/documentation/hooks-and-filters/

If that data includes coordinates, you'd just call 
GeoMashupDB::set_object_location() to add the location:

http://code.cyberhobo.net/phpdoc/geo-mashup-1.4/GeoMashup/GeoMashupDB.html#metho
dset_object_location

It seems a little narrowly focused for a new feature, but we can see if gets 
voted up.

Original comment by dylankk...@gmail.com on 27 Jun 2012 at 12:27