Blurred or blank google map when animating camera
Asked Answered
P

0

6

I'm developing android app and I'm tracking user movement. I want to animate the camera when user moves (on every onLocationChange call). Firstly I was doing it like that and it was working fine:

map.moveCamera(CameraUpdateFactory.newLatLng(new LatLng(location
                .getLatitude(), location.getLongitude())));

Here is a screenshot of the screen when using this snippet: enter image description here

But as you can see it's not an animation, so I wrote this:

CameraPosition cameraPosition = new CameraPosition.Builder()
                .zoom(zoom)
                .target(new LatLng(location.getLatitude(), location
                        .getLongitude())).build();
        map.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));

But it's not working fine, map is moving with animation but streets are blurred and streets' names are not visible (look at the screenshot):

enter image description here

I was also trying animation without zoom - same result. Map gets clear only after when I press zoom buttons however some points and routes are still blurred. So any ideas how to solve this? Thanks in advance!

Protonema answered 24/11, 2014 at 10:47 Comment(6)
I'm having the same problem.. If I move the map with my finger it immediately gets clear. Did you find a solution? ThanksVinavinaceous
this might be due to the slow data connection . is your data connection is fast enough.Attendance
@FidelEduardoLópez I am also having same problem, did you guys found any solution?Literal
@Meet I don't remember well, but try using animateCamera with a new created camera position.Vinavinaceous
@FidelEduardoLópez I am using that method, but the map is getting vlurry when continuously this method is called programmatically. (i.e take 3 camera positions very far from each other, and when you animate to those positions at some delay, between that do not touch the screen, then map is getting blurred).Literal
Map require 1 sec to update the map tiles if your animation continues upto 1 sec you map will not get clear. You have to take pause between two animate callsMaples

© 2022 - 2024 — McMap. All rights reserved.