Android Question (solved)The markers are very small on google map on the samsung phone

gudino jose luis

Active Member
Licensed User
Longtime User
Hello everyone.
I have a problem with the Samsung phones,
The markers on the google map look very small, and in the same
Application on other brands of phone are seen correctly.
I attach the two images.
any solution?
thanks in advance

Phone ZTE

capt01.png


Phone Samsung

capt0201.png
 
Last edited:

gudino jose luis

Active Member
Licensed User
Longtime User
Hi, the problem continues.
Even the marke still small,
I comment that this only happens with the samsung phones
(S7), (S6), Note, with the other marks works correctly
thanks for the support
 
Upvote 0

gudino jose luis

Active Member
Licensed User
Longtime User
Thank.
Attachment file with demos
Note: Marker look perfect on all phone brands except on samsung phones.
 

Attachments

  • smallMarker.zip
    11.9 KB · Views: 318
Last edited:
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Try it with this code:
B4X:
Sub CreateScaledBitmap(Original As Bitmap, Width As Int, Height As Int) As Bitmap
   Dim bo As JavaObject
   bo.InitializeStatic("android.graphics.Bitmap")
   Dim bmp As Bitmap = bo.RunMethod("createScaledBitmap", Array As Object(Original, Width, Height, False))
   Return bmp
End Sub

Sub SetBitmapDensity(b As Bitmap) As Bitmap
   b = CreateScaledBitmap(b, 32dip, 32dip)
   Dim jo As JavaObject = b
   Dim den As Int = Density * 160
   jo.RunMethod("setDensity", Array(den))
   Return b
End Sub
You need to call SetBitmapDensity as before.
 
Upvote 0
Top