MapPress Pulling Info

Home Forums MapPress Support MapPress Pulling Info

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #9579
    cusackd
    Participant

    Hello there,

    I am just wondering have you got any advice on pulling the GPS location from map press database entry as im trying to create a custom xml feed but there is so much data in the obj field.

    #9580
    Chris
    Keymaster

    Hi, my advice would be to not read the data directly – it’s saved as a serialized PHP object. You can use the mappress_api.php functions, like Mappress_Map::get() to read it, or you should also be able to just unserialize() it if you’re not using WordPress. Once you get the object, it should be easy to get the data you want.

    #9581
    cusackd
    Participant

    Thanks Chris it is outside wordpress so makes it a bit more manageable. Thanks for the quick reply.

    #9582
    cusackd
    Participant

    Chris seem to be getting errors when unserializing

    error:
    FATAL: file for class Mappress_Map not found
    FATAL: file for class Mappress_Poi not found

    #9583
    Chris
    Keymaster

    Hi, normally the class definition is included before unserialize().

    One solution might be to create a stub class with the properties you want. I mean copy the Mappress_Map and Mappress_Poi classes from mappress_api.php with the properties (but not the methods) and include them in your own project.

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