#StackBounty: #java #android #xml #android-layout How can I change marker position and change google Map view with it

Bounty: 50

I am trying to set my android App Google Map View to bottom of the screen but it does not changes its position to bottom. I am trying to replicate a GoogleMap/Waze kind of navigation feature in my Android Application.

Marker Code: Here I set the marker position to custom position according to user position and set a custom icon.

MarkerOptions markerOptions = new MarkerOptions();
markerOptions.position(userlatLng);
markerOptions.icon(markerIcon);
markerOptions.rotation(userlocation.getBearing());
markerOptions.title("Current Position");
markerOptions.anchor((float) 0.5, (float) 0.5);
markerOptions.flat(true);
currentLocationMarker = map.addMarker(markerOptions);

Camera Position I am changing the Camera position accourding to User current location with the zoom level of 20.

CameraPosition cameraPosition = new CameraPosition.Builder()
                .target(userlatLng)
                .zoom(20)
                .bearing(userlocation.getBearing())
                .tilt(45)
                .build();
        map.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));

I wanted to ask how can I drop the icon to the bottom of the screen and show the remaining route on wide angle screen.

Mobile App Current view that is showing the Icon in the middle

Mobile App Icon Position that I want to set


Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.