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

前端 未结 4 1535
执笔经年
执笔经年 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:14

    In Iphone you can get the current location by using CLLocationManagerDelegate in the following method.

    - (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation{
    
        CLLocationCoordinate2D location = newLocation.coordinate;
        Float x = location.latitude, y = location.longitude;
    }
    

提交回复
热议问题