I have a custom made .bmp file and I am drawing it on googlemaps with the addMarker call. Now I want to change the size depending on the zoomlevel from the google maps. It actually changes the size as it should, but the result is far from ok. It destroys my whole bitmap from the looks of it and I don't know what I can do to have the copy look exactly the same but smaller/bigger. I divide there by 13 because thats my starting zoomlevel for the normal .bmp Here is my code:
var Bitmap_copy = original_Bitmap.copy(original_Bitmap.config,true) // kopiert elipse, da es sonst nicht in canvas gewandelt werden kann
Bitmap_copy.height=mMap.cameraPosition.zoom.toInt()*Bitmap_copy.height/13
Bitmap_copy.width=Bitmap_copy.width*mMap.cameraPosition.zoom.toInt()/13
var canvas = Canvas(Bitmap_copy); //Benötigt um Text auf Elipse zu schreiben
var paint = Paint() //Grafikdaten des Textes
mMap.addMarker(MarkerOptions().position(LatLng(breitengrade_live[k], langengrade_live[k])).title(Busname).icon(BitmapDescriptorFactory.fromBitmap(Bitmap_copy)))