How to set custom marker icon size in static google map?

393 Views Asked by At

How to set custom marker icon size in static google map in website? I want to set size 100 * 130.

1

There are 1 best solutions below

3
Mrunal On

Using this code you also can add your custom marker with your desirable size

       int height = 100;
        int width = 130;
        BitmapDrawable bitmapdraw = (BitmapDrawable) getResources().getDrawable(R.mipmap.marker);
        Bitmap b = bitmapdraw.getBitmap();
        Bitmap smallMarker = Bitmap.createScaledBitmap(b, width, height, false);
        Marker marker = myMap.addMarker(new MarkerOptions().position(latLng).icon(BitmapDescriptorFactory.fromBitmap(smallMarker)));