I am adding a custom marker to my map with code
marker =new MarkerOptions().icon(BitmapDescriptorFactory.fromResource(R.drawable.bus)));
but it appears too large and covers the whole screen
how to solve this issue.
I am adding a custom marker to my map with code
marker =new MarkerOptions().icon(BitmapDescriptorFactory.fromResource(R.drawable.bus)));
but it appears too large and covers the whole screen
how to solve this issue.
you can resize programmatically
Solution 1:
int height = 100;
int width = 100;
BitmapDrawable bitmapdraw=(BitmapDrawable)getResources().getDrawable(R.drawable.bus);
Bitmap b=bitmapdraw.getBitmap();
Bitmap smallMarker = Bitmap.createScaledBitmap(b, width, height, false);
MarkerOptions marker = new MarkerOptions()
.title("Your title")
.icon(BitmapDescriptorFactory.fromBitmap(smallMarker));
googleMap.addMarker(marker);
Solution 2:
Simple you need to Change your Image into Small size.