objective c - How to add the tilt effect in google map in ios? -
i have added following lines in code tilt google map:
gmscameraposition* camera = [gmscameraposition camerawithtarget:currentposition zoom:20 bearing:self.locationmanager.heading.trueheading viewingangle:30]; _googlemapview.camera = camera; self.googlemapview.settings.tiltgestures = yes;
but not work.i can't find tilt effect in google map view adding above code.here have added 2 images.i'm getting map second image.but,i need map 1st image. please help.
instead of setting _googlemapview.camera property directly use method instead:
[_googlemapview animatetocameraposition:camera];
edit: can use following if want change camera tilt:
[_googlemapview animatetoviewingangle:30.0]
just note angle needs between 30 , 45 degrees (or 0 if want straight down view).
Comments
Post a Comment