Android Save Polygon From Map As Bitmap Same Size For All Devices
I am drawing polygon on Google map and it works great. What I need is to save this polygon as bitmap for fixed scale. I am using this code to do that. private static List
Solution 1:
A clever hack that might work for you- why not manually zoom the camera to fit the polyline whenever user tries to save the geofence.
val latLngs = getLatLngs()
val builder = LatLngBounds.Builder()
latLngs.forEach {
builder.include(it.position)
}
val padding = 200
val bounds = builder.build()
val cameraUpdate = CameraUpdateFactory.newLatLngBounds(bounds, padding)
map.moveCamera(cameraUpdate)
//Do your projection operation here...
Solution 2:
Save an svg image of your polygon. svg is vectoriel, bitmap is not
Post a Comment for "Android Save Polygon From Map As Bitmap Same Size For All Devices"