Hi there again..
i have some questions as a new starter to b4j (by the way) seems more powerful than any language i ve used (.net, vb6, c++) ofcourse with the help of all these libraries created by online community...
I am using a map (mapquest offline tiles)..
I want the feature user draw rectangles at lat lon (X1,Y1) - (X2, Y2) and the program used them as limits for specific reasons...
But because i am starter i am falling to walls...
The rectangle used as node... how change it's layout settings ???
Is there a Mappane tip will help me or other way to create map rectangles ?
i have some questions as a new starter to b4j (by the way) seems more powerful than any language i ve used (.net, vb6, c++) ofcourse with the help of all these libraries created by online community...
I am using a map (mapquest offline tiles)..
I want the feature user draw rectangles at lat lon (X1,Y1) - (X2, Y2) and the program used them as limits for specific reasons...
But because i am starter i am falling to walls...
B4X:
Sub Process_Globals
' here i am using a rectangle created by Designer:
Private rect1 As Node
Dim rlat As Double,rlon As Double,clat As Double,clon As Double
Dim isdrawon As Boolean
end sub
....
Sub MapPane1_Mouseclicked (EventData As MouseEvent)
If isdrawon=True Then
rect1.Left=EventData.X 'seems good here..
rect1.Top=EventData.y
rect1.width = 1
rect1.height = 1
rect1.Visible = True
End If
End Sub
Sub MapPane1_MousePressed (EventData As MouseEvent)
If isdrawon=True Then
'seems no with, height... :-( am i wrong and what to do ?
rect1.width = EventData.x - rect1.Left
rect1.height = EventData.Y - rect1.top
End If
' here must convert x,y of screen to lat/lon...
rlat = convertsomehow(rect1.left)
rlon = = convertsomehow(rect1.top)
.....clat,clon......
End Sub
The rectangle used as node... how change it's layout settings ???
Is there a Mappane tip will help me or other way to create map rectangles ?