Return Lat/Long Values?

Home Forums MapPress Support Return Lat/Long Values?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #12256
    arrowplane
    Participant

    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?

    Thanks!

    #12257
    arrowplane
    Participant

    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….

    #12258
    Chris
    Keymaster

    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):

    Mappress_Map::get($mapid);

    #12259
    arrowplane
    Participant

    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.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.