I have a google map working fine. I just need to put a label from top left of the map.
I've read that creating a bitmap with the label then add a marker, but I don't know the coordinates, unless the user pulse the map in a long click, and I don't want that.
Any help would be greatly appreciated
Sub MapDrawlabel1_SnapshotReady(Bitmap1 As Bitmap)
Private c As Canvas, b As Bitmap
b = Bitmap1
c.Initialize2(b)
c.DrawText("Testtext",25dip,25dip,Typeface.DEFAULT,20,Colors.Blue,"LEFT")
Private out As OutputStream
out = File.OpenOutput(FolderImagesLogo, "MAPA1.png", False)
b.WriteToStream(out, 100, "PNG")
out.Close
End Sub
Map is saved. But with no text. Something I'm missing?
Sub Mapextra_SnapshotReady(Bitmap1 As Bitmap)
Log($"Mapextra_SnapshotReady()"$)
Dim cvs As Canvas
cvs.Initialize2(Bitmap1)
cvs.DrawText("Testtext",25dip,25dip,Typeface.DEFAULT,20,Colors.Blue,"LEFT")
Starter.rp.CheckAndRequest(Starter.rp.PERMISSION_WRITE_EXTERNAL_STORAGE)
Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
Dim Out As OutputStream
Out = File.OpenOutput(File.DirRootExternal, "Test.png", False)
cvs.Bitmap.WriteToStream(Out, 100, "PNG")
Out.Close
End Sub