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

前端 未结 4 1520
执笔经年
执笔经年 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 04:56

    I know I could also conditionally check for the user-agent and create the link accordingly but I was hoping that there would be a more elegant way to do this.

    This IS the most elegant solution. The two platforms differ too much, to do this with the same link for both platforms. Add Blackberry or Windows Phone in the equation, and you will have even more difficulties in achieving the same behaviour without checking the user-agent

提交回复
热议问题