K
K
Konstantin Malyarov2019-06-12 19:13:24
Android
Konstantin Malyarov, 2019-06-12 19:13:24

How to keep the current position in the center on the map?

I decided to make a tracker, found how to determine the position, found how to center the image by position, but I still didn’t understand how to make it so that it was in the center while moving.
The documentation says Handling location update information .

locationListener = new LocationListener() {
            @Override
            public void onLocationUpdated(@NonNull Location location) {
                mapview.getMap().move(new CameraPosition(userLocationLayer.cameraPosition().getTarget(), 15.0f, 0.0f, 0.0f));
            }

            @Override
            public void onLocationStatusUpdated(@NonNull LocationStatus locationStatus) {

            }
        };

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question