2017-09-29 15 views
0

"標準化された"方法で私の場所を共有したいと思います。iOSの地図アプリと同じ方法で共有する

アップルマップのアプリ共有が私のベンチマークであるユーザーの場所です。マップアプリのようにユーザーの場所を共有するにはどうすればよいですか?

答えて

0

次の機能を試してください。 私は現在の場所を共有する1つの機能を作っています。

-(NSURL *)funSetGoogleMapImage :(NSString *)str IMAGE:(UIImageView *)imgViewBounds LAT:(NSString *)strlatitude LONG:(NSString *)strLongitude 
{ 

    NSString *strImageResolution = @""; 
    if (ScreenWidth == 414) 
     strImageResolution = [NSString stringWithFormat:@"%.fx%.f",(imgViewBounds.bounds.size.width*3),imgViewBounds.bounds.size.height*3]; 
    else 
     strImageResolution = [NSString stringWithFormat:@"%.fx%.f",(imgViewBounds.bounds.size.width*2),imgViewBounds.bounds.size.height*2]; 

//define pin 
    NSString *strMarkerURl = [NSString stringWithFormat:@"icon:%@..../ws/images/[email protected]",MapImage]; 


//Return image of current location mapp 
    NSURL *ImgUrl=[NSURL URLWithString:[NSString stringWithFormat:@"http://maps.google.com/maps/api/staticmap?center=%@,%@&markers=%@%@%@,%@&zoom=15&size=%@&scale=2&sensor=false",strlatitude,strLongitude,strMarkerURl,@"%7C",strlatitude,strLongitude,strImageResolution]]; 

    return ImgUrl; 
} 
関連する問題