Custom Fields
Re-Envisioned
Support Meta Box Geolocation New Google maps pricing policy and MB geolocation

This topic contains 15 replies, has 3 voices, and was last updated by  Anh Tran 2 hours, 6 minutes ago.

Viewing 6 posts - 11 through 16 (of 16 total)
  • Author
    Posts
  • #10446

    Anh Tran
    Keymaster

    Great links, David! I’ll keep continue on that 🙂

    Update: I’ve done that! Now the “osm” field works similarly to the “map” field. The code is available here. And this is the demo code.

    Please try it and let me know what you think.

    #10463

    david.h
    Participant

    Hi Anh,

    This looks perfect.

    I’m currently juggling several projects and my staging environment is down at the moment, but I’ll try and test it next week.

    Thanks

    #10555

    poehnix
    Participant

    Hi Ahn and David, sorry for the delayed answer.
    I will be able to test the code only next week. Anyway, the provided link on github (https://github.com/wpmetabox/meta-box/tree/map-field) returns a 404, so i do not know how to get the code. Ahn, could you please give us the right url ?
    I am eager to try the new map&geocoding plugin. Just out of curiosity, is there any reason why you haven’t used the Nominatim tools for geocoding that comes with openstreetmap? Reference can be found here
    https://wiki.openstreetmap.org/wiki/Nominatim

    Thank you for your effort. Next week, once I have the code I will be able to test it.
    For the moment thank you for your hard work

    Bye
    Michele

    #10573

    Anh Tran
    Keymaster

    Hi Michele,

    I’ve merged the branch into the master branch, so it’s available at https://github.com/wpmetabox/meta-box/. At the moment, I only finished the osm field, which is an alternative for map field. If everything goes right, Geolocation will be the next step.

    And yes, I use Nominatim for the geocoding :). I found the wiki, but didn’t look at that carefully until I read code of other libraries. It’s great and not hard to implement.

    #10604

    poehnix
    Participant

    Hi Ahn,
    I have made a bit of testing. I made a new post type with title, editor and osm metabox in code ( osm map + address text field) using metabox from github master branch

    On the backend everything seems to be ok. Geolocation works almost fine. The only problem I see is that if the address is not known by openstreetmap, which happens in OSM more than google maps, there is no feedback message (something like “address not found”) but, given that markers can be moved “by hand” one can look for another place and then move the marker manually, so it’s not a big deal.

    On the frontend unfortunately I am not able to display the map. rwmb_meta( ‘mapID’, $args ) returns an array with the coordinates and zoom value and not the map as expected, something like array(3) { [“latitude”]=> string(10)
    “39.7995053” [“longitude”]=> string(10) “18.3579493” [“zoom”]=> string(2) “16” }
    I might be missing something trivial here, can you please give me an advice on what I am doing wrong ?

    One last thing: I had upgraded the geolocation plugin to latest release but I had to revert it back because of some notices on line 73 of geolocation class (types not defined). Probably something related to the geo paramenter. Since geolocation is working, at this point it is not clear if the “geo” parameter (or even the geolocation plugin itself) is needed and / or what one has to put in there.

    I will made more tests when I have these info. In the meantime thank you for your hard work.
    Bye
    Michele

    #10608

    Anh Tran
    Keymaster

    Hi Michele,

    Thanks a lot for your feedback!

    • No results message: I’ve just added it to both osm and map field.
    • Output the map: I’ve fixed it.
    • Geolocation extension: I couldn’t find the bug on line 73. There is a check isset on line 72. Maybe I’m missing something.

    One note: The Geolocation extension has not been updated to use OSM yet. It still uses the Google Maps API. Only the core Meta Box plugin with osm field use the new OSM. I’ll update the Geolocation later if everything goes well with osm field.

Viewing 6 posts - 11 through 16 (of 16 total)

You must be logged in to reply to this topic.