open google maps app from a browser with default start location on android and iphone

前端 未结 4 1516
执笔经年
执笔经年 2020-12-30 04:47

I have a mobile site and I have a link that can open the google maps native app on iphone and android with default start and end locations by using the link format: http://m

4条回答
  •  旧巷少年郎
    2020-12-30 05:22

    Take a look at the url handler geo to tell Browser to use native App

    Location here!
    

    There is a polyfill script available which would be worth a try for fallback for Desktop Browsers: https://github.com/prowestgis/dojo-geo-uri-polyfill

    You may try also for IOs devices those:

    comgooglemaps://?parameters
    

    or:

    comgooglemaps-x-callback://?parameters
    

    https://developers.google.com/maps/documentation/urls/ios-urlscheme

提交回复
热议问题