B4J Question calculat area

I converted LatLon To XY and calculated the area of polygons...
How have you done this?
I suppose that LatLon coordinates are degrees, how did you convet them to XY.
Without knowing what you have done impossible to give a concrete advice.
 
Upvote 0
There are no built in functions for that. You'll have to compute it by doing some maths. There are lots of examples on internet for that : https://www.google.co.th/search?q=math compute perimeter polygon&oq=math compute perimeter polygon

Edit: more example http://www.mathopenref.com/coordpolygonarea.html
http://janmatuschek.de/LatitudeLongitudeBoundingCoordinates
I 'm calculation but I do not know unit
I would like meter unit
There is an excel spreadsheet - here, which should help you.
tanks but this is not area calculation
How have you done this?
I suppose that LatLon coordinates are degrees, how did you convet them to XY.
Without knowing what you have done impossible to give a concrete advice.
https://www.b4x.com/android/forum/threads/find-screen-x-y-of-google-map.61309/#post-386710
 
Last edited:
Upvote 0
Try this:

Code: Copy
Dim ll as LatLng
ll.Initialize(0, 1)
Dim xy() as Double =LatLonToXY(ll)
The coordinate is 1 degree on the equator.
What values do you get?
If you get something similar to 111.319 the unit is km.
If you get something similar 111319 the unit is m.
If you get something similar 69.171 the unit is mile.

My GoogleMap doesn't work anymore so I couldn't test it.
 
Upvote 0
Back
Top