If I have imported records with TurboCSV and set them to be geocoded with Mappress, is it possible to query the database for the latitude and longitude values? Are they saved somewhere?
Actually, I can see the relationships in the database in wp_mappress posts that connects the posts (via postid) and the maps (mapid to the wp_mappress_maps table). And it looks like I may be able to get the lat/long from the wp_mappress_maps table….
Hi, you’re correct, the data is saved in mappress_maps – but it’s saved as serialized obejcts, so it’s not easy to implement searches by lat/lng. You can read each map individually and unserialize it like this (where $mapid is the map you want):
Thanks for that bit of code. Yes, it would be a bit tricky to do a query on the lat/long in that field. It sure would be nice if I could get this code into a custom field for my post type.