Directions form: Change "Directions To" address from lat/lng to actual address

Home Forums MapPress Support Directions form: Change "Directions To" address from lat/lng to actual address

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #14138
    grego3781
    Participant

    Hello,

    By default, when the directions window opens, the “Directions To” address field contains the lat/lng for the “To Address”.

    Is there a way to show the actual address in this field instead of the lat/lng?

    thanks

    #14188
    Chris
    Keymaster

    Hi,

    I’m assuming you’re creating the POI by entering an address, then dragging the marker.

    If so, this is fixed in version 2.40.8. Previous versions would ‘forget’ the address when a POI was dragged.

    With the new version, the plugin should remember the original address for directions, even if the marker is dragged to a new location.

    #14196
    grego3781
    Participant

    Hi Chris,

    I’m actually adding POI’s via a loop using php:

    ${‘mypoi_’ . $the_count} = new Mappress_Poi(array(“iconid” => $search_term, “title” => $title, “body” => $body, “point” => array(“lat” => $list_locations[‘latitude’], “lng” => $list_locations[‘longitude’])));

    Let me know if this clarifies things.

    Thanks!

    #14197
    Chris
    Keymaster

    Hi,

    OK – then in the loop, I think you just need to set the address:

    new Mappress_Poi(array("corrected_address" => "200 Main Street", “iconid” => $search_term, “title” => $title, “body” => $body, “point” => array(“lat” => $list_locations['latitude'], “lng” => $list_locations['longitude'])));

    #14201
    grego3781
    Participant

    Hi Chris,

    Worked like a charm.

    One minor correction is that the correct syntax is “correctedAddress” and not “corrected_address”.

    I have a couple of other questions. Should I post those here or start a new thread?

    thanks for your help!

    #14202
    Chris
    Keymaster

    It’ll make more sense if you start a new thread, or you can email me directly if you like.

    #14203
    grego3781
    Participant

    I’ll go ahead and start a new thread.

    thanks again!

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