iOS Question Google maps marker modification

Discussion in 'iOS Questions' started by rboeck, Jun 4, 2018.

  1. rboeck

    rboeck Well-Known Member Licensed User

    In B4A i was able to change a bitmap and add a number, before i used this bitmap for a marker.

    In B4I i tried this code:
    Dim Bitm As B4XBitmap = LoadBitmap(File.DirAssets,"Markerg.png")
    Dim f As Font=Font.CreateNewBold(14)
    "1",25dip45dip, f,Colors.Yellow,"CENTER")
        m1= gmap.AddMarker3(
    48.5416.132"Marker Nr.1", Bitm)
    but i got this error: Expected: UIView, object type: UIImage
    So my question: is it possible and which type of object has to be used?
  2. Erel

    Erel Administrator Staff Member Licensed User

    You are not using Canvas correctly.

    Code to create a B4XCanvas:
    Public Sub CreateCanvas (width1 As Int, height1 As Int) As B4XCanvas
    Dim iv As ImageView
    0100, width1, height1)
    Dim c As B4XCanvas
    Return c
    End Sub
    You should then draw the bitmap, draw the other stuff, call Cv.Invalidate and get the bitmap with Cv.CreateBitmap.
    Then release the canvas with Cv.Release (unless you want to keep it and use it again).
    rboeck likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice