W webhost.company Active Member Licensed User Longtime User Sep 24, 2021 #1 My codes : B4X: Copy Dim marker_icon As Bitmap = LoadBitmap(File.DirAssets,"marker.png") Dim m As Marker = map1.GetMap.AddMarker3(ChooseLocation.Latitude,ChooseLocation.Longitude,"Your location",marker_icon.Resize(45dip,45dip,True)) Why added marker icon is low quality? While my icon is high quality with 150px in 150px I think that I have to load image from Special folders, is that? Please help me
My codes : B4X: Copy Dim marker_icon As Bitmap = LoadBitmap(File.DirAssets,"marker.png") Dim m As Marker = map1.GetMap.AddMarker3(ChooseLocation.Latitude,ChooseLocation.Longitude,"Your location",marker_icon.Resize(45dip,45dip,True)) Why added marker icon is low quality? While my icon is high quality with 150px in 150px I think that I have to load image from Special folders, is that? Please help me
W webhost.company Active Member Licensed User Longtime User Sep 24, 2021 #2 Seem that is needing to scale bitmap and then use on marker Upvote 0
W webhost.company Active Member Licensed User Longtime User Sep 24, 2021 #3 The problem was solved with below code : B4X: Copy Dim scale As Float = GetDeviceLayoutValues.NonnormalizedScale Dim marker_icon As Bitmap = LoadBitmap(File.DirAssets,"marker.png") Dim m As Marker = map1.GetMap.AddMarker3(ChooseLocation.Latitude,ChooseLocation.Longitude,"Your location",marker_icon.Resize(45dip * scale,45dip * scale,True)) Upvote 0
The problem was solved with below code : B4X: Copy Dim scale As Float = GetDeviceLayoutValues.NonnormalizedScale Dim marker_icon As Bitmap = LoadBitmap(File.DirAssets,"marker.png") Dim m As Marker = map1.GetMap.AddMarker3(ChooseLocation.Latitude,ChooseLocation.Longitude,"Your location",marker_icon.Resize(45dip * scale,45dip * scale,True))
TILogistic Expert Licensed User Longtime User Sep 24, 2021 #4 test: use XUI library. B4X: Copy Dim xui As XUI Dim marker_icon As B4XBitmap = xui.LoadBitmapResize(File.DirAssets, "marker.png", 26dip, 26dip, True) Dim m As Marker = map1.GetMap.AddMarker3(ChooseLocation.Latitude,ChooseLocation.Longitude,"Your location",marker_icon) note: the size showing fine in my app is 24dip or 26dip Upvote 0
test: use XUI library. B4X: Copy Dim xui As XUI Dim marker_icon As B4XBitmap = xui.LoadBitmapResize(File.DirAssets, "marker.png", 26dip, 26dip, True) Dim m As Marker = map1.GetMap.AddMarker3(ChooseLocation.Latitude,ChooseLocation.Longitude,"Your location",marker_icon) note: the size showing fine in my app is 24dip or 26dip