Force Safari to Open in Google Maps

New home Forums Pro Add-on General queries Force Safari to Open in Google Maps

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #31766

    I notice that in IOS on Iphone it opens Apple Maps when GetDirections is clicked, and not Google Maps. The biggest problem is then that the “from” input field is empty and cannot be populated automatically. It is generally accepted where I live that Apple Maps is a 100% sure way to get lost never to be seen by human kind again. Is there a way to force WPGMaps to open in Google maps on IOS device? It works 100% on Android.

    Thx

    Armand

    #31772
    Perry
    Moderator

    Hi Armand,

    Thanks for reporting this, “lost never to be seen” did make me laugh!

    I’ll add an option to force this in future releases, in the mean time, would you be comfortable editing some Javascript yourself? If you’re not familiar with the language, could you give me login details for the site so I can force it manually?

    Kind regards
    – Perry

    #31787

    Thanks Perry

    I am comfortable with Javascript, so I would be happy if you could give me pointers on how to do it.

    Regards

    Armand

    #31792
    Perry
    Moderator

    Hi Armand,

    Please open /wp-google-maps-pro/js/core.js and do a search for “apple”. This will take you to the relevant block.

    Please delete or comment out if/else block leaving the window.open(“http://maps.google …

    Let me know if that works for you?

    Kind regards
    – Perry

    #31803

    Perry

    It works perfect thanks

    if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {

    window.open(“http://maps.google.com/maps?daddr=”+latLong+”&ll=”);
    } else {

    jQuery(“#wpgmaps_directions_edit_”+wpgmzamid).show();
    jQuery(“#wpgmaps_directions_editbox_”+wpgmzamid).show();
    jQuery(“#wpgmza_input_to_”+wpgmzamid).val(end.length > 0 ? end : latLong);
    jQuery(“#wpgmza_input_from_”+wpgmzamid).focus().select();
    }

    Thanks for the great support.

    Regards

    Armand

    #31903
    Perry
    Moderator
    This reply has been marked as private.
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.