I put the map on the panel, can guarantee that the image without distortion, but the background of serious deformation, please enlighten.
B4X:
SetNinePatchDrawable (Panel, "msgstyle")
Sub SetNinePatchDrawable (Control, As, View, ImageName, As, String)
Dim R As Reflector
Dim package As String
Dim ID As Int
Package = r.GetStaticField ("anywheresoftware.b4a.BA", "packageName")
Id = r.GetStaticField (package &.R$drawable, ImageName)
R.Target = r.GetContext
R.Target = r.RunMethod ("getResources")
Control.Background = r.RunMethod2 ("getDrawable", "Id", "java.lang.int")
End Sub