objective c - Switching maps from 2D to 3D in iOS in Map Mode Satellite/Hybrid -
i trying switch maps 2d mode 3d mode when map mode satellite/hybrid. same iphone maps apps apple. doing below coding. please check , let me know doing wrong.
mkmapcamera *camera1 = [mkmapcamera cameralookingatcentercoordinate:contactlocation fromeyecoordinate:userlocation eyealtitude:200.0]; [camera1 setpitch:0]; // 2d mode when maps switch 2d mode [camera1 setpitch:50]; // 3d mode when maps switch 3d mode [_mapview setcamera:camera1];
please note: points above code works when map type standard. above solution not working map type satellite/hybrid.
try setting pitchenabled
property on mkmapview yes. otherwise mkmapview renders in 2d if camera looking straight down, regardless of how set camera.
Comments
Post a Comment