GEO my WP Support

Use this forum for technical support and general questions related to GEO my WP plugin and its core add-ons only. For technical support and general questions related to any of the premium extensions please open a new premium support ticket.

[Resolved]WORDPRESS MOBILE APP AND LOCATION COMPATIBILITY

Home Forums Support WORDPRESS MOBILE APP AND LOCATION COMPATIBILITY

This topic contains 10 replies, has 2 voices, and was last updated by  Eyal Fitoussi 11 months ago.

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #56189

    winetrade
    Participant

    Hi,
    i notice that on the IOS WordPress App that we can use to publish blog posts there is an option called “post location”.
    Is compatible with geo mywp?

    Mean, if i have a website with your plugin and from the mobile app i add the post location, i can see the article on the Geomywp map?

    If no, there somenthing we can do to let people writing articles with geo location from their smartphone or tablet?

    Thanks

    • This topic was modified 9 months, 1 week ago by  Eyal Fitoussi.
    #56191

    winetrade
    Participant

    An update. i read that plugin is not compatible with wordpress geo data but i found this: https://wordpress.org/support/topic/get-post-location-from-custom-fields/
    that can help.

    My question is:
    Is possible to change the function explained in the post above to automaticly update geomywp location informations by getting them from wordpress geodata core?

    I want that when people send an article from the WordPress Ios App adding the location, the post show on the geomywp map and can be searchable.

    #56211

    Eyal Fitoussi
    Keymaster

    Hello winetrade,
    You should be able to modify the function mentioned here to work for your needs. In the example mentioned in the tutorial the plugin will grad the address from a specific custom fields and update GEO my WP based on that.

    You need to find out where the “post location” of the app that you are using is being saved. I believe that it is being saved in custom fields as well. And if that is the case you only need to modify the example function based on the custom fields of your app. Otherwise, if the “post location” is saved in custom location, such as custom database table, you need to modify the function in the example to grab the data from the custom database and then pass it into the function that updates the data in GEO my WP database.

    Let me know if this helps.

    #56217

    winetrade
    Participant

    Thank you, the fields are the standard wordpress field. MEan that i use the ios wordpress app to add the post and in that app i can see the geolocation fields.

    If i check then the post on desktop i can see the two custom fields.
    I’ll try as you suggest. Thank you

    #58349

    winetrade
    Participant

    Hi, i reopen the topic for a question.
    I followed the tutorial but i notice that in the functions i have in the array the field “address”, “city” …
    I need to use “latitude” and “longitude”.
    What are the labels i can use to import these values from WP Geocode to GEOMYWP location fileds?
    Thanks

    #58355

    winetrade
    Participant

    An update, i need to “read” values from the fields showed in “FROM” and UPDATE GeoMyWP fields “TO” everytime i save or update an article.
    I can reverse geocode to get address and update a “location” field for GeoMyWP but i don’t know where i need to put functions.

    I followed this: http://docs.geomywp.com/gmw_update_post_location-function/
    but nothing happens

    Thanks

    • This reply was modified 11 months, 1 week ago by  winetrade.
    Attachments:
    You must be logged in to view attached files.
    #58359

    Eyal Fitoussi
    Keymaster

    Hello @winetrade,

    First thing you need to do is to update to GEO my WP v3.2 beta 2 which you can download from here.

    On that same page you can read why the geocoder function does not work on GEO my WP 3.1 or later.

    You will also need to create an additional Google Maps Server API key, enter it in the settings page of GEO my WP and test it. This is all described in the page linked above.

    When you are done updating to v3.2 and adding a server API key, see this page for details about the function that you need to use.

    To use coordinates with the function you need to pass an array of ‘lat’ and ‘lng’.

    I hope this helps.

    #58360

    winetrade
    Participant

    Thanks, i start to follow your instruction and update you soon.
    Thank you

    #58361

    winetrade
    Participant

    You mean i need to do somenthing like this:

    $location = array(
    ‘lat’ => ‘26.754347’,
    ‘lng’ => ‘81.001640’,
    );
    gmw_update_post_location( $post_id, $location );

    After this test, then i need to “read” lat & lng from my custom fields right?

    #58362

    winetrade
    Participant

    THAT’S WORK!
    I don’t know if you want to share this in a tutorial but with this TRICK on your function you will be able to do this:

    1) Use the WORDPRESS Ios or Android app to post on your website
    2) Add your location to the post from the APP
    3) The function get Lat & Lng from the post and put them into GeoMyWp fields correctly to display them on the map.

    $lat= get_post_meta( $post_id, ‘geo_latitude’, true ); //latitude
    $lng= get_post_meta( $post_id, ‘geo_longitude’, true ); //longitude
    //run the udpate location function
    $location = array(
    ‘lat’ => $lat,
    ‘lng’ => $lng,
    );
    gmw_update_post_location( $post_id, $location );
    }

    YES!

    • This reply was modified 11 months, 1 week ago by  winetrade.
    • This reply was modified 11 months, 1 week ago by  winetrade.
    #58366

    Eyal Fitoussi
    Keymaster

    Perfect! I am glad it is working.

    Thank you for posting the details. I have made this post sticky as other users might find it useful.

Viewing 11 posts - 1 through 11 (of 11 total)

The topic ‘WORDPRESS MOBILE APP AND LOCATION COMPATIBILITY’ is closed to new replies.