meh
meh

Reputation: 22469

how do I get rid of the 'go to my location icon' on google maps v2

I want to display the user's current location, but without the go to my location icon on the right of the screen.

Which is achieved by calling :

mMap.setMyLocationEnabled(true)

Is there anything similar to the MyLocationOverlay from the MapView api.

Upvotes: 0

Views: 758

Answers (2)

CommonsWare
CommonsWare

Reputation: 1006869

Your question is exceptionally confusing. I am going to interpret it as "how do I get rid of the 'go to my location icon'".

In that case, try calling getUiSettings().setMyLocationButtonEnabled(false) on your GoogleMap object.

Upvotes: 1

san
san

Reputation: 1835

Have you tried animateto function

MapView mapView = (MapView) findViewById(R.id.mapView);
        MapController mc = mapView.getController();
        String coordinates[] = {"currentLat", "currentLat"};
        double lat = Double.parseDouble(coordinates[0]);
        double lng = Double.parseDouble(coordinates[1]);

        p = new GeoPoint(
            (int) (lat * 1E6), 
            (int) (lng * 1E6));

        mc.animateTo(p);
        mc.setZoom(17);  //Your zoom level in int
        mapView.invalidate();

Upvotes: 0

Related Questions