0

When I tried to console the result of dragbox coordinates it returns an 2d array. What is the meaning of coordinates returned?

I need to get the points to use it in SQL and make a polygon.

Index 0 is minx and miny and what about the others?

dragBox.getGeometry().getCoordinates()
0:[13466767.761325281, 1601017.3688731098]
1:[13466767.761325281, 1601011.3225847394]
2:[13466776.737450918, 1601011.3225847394]
3:[13466776.737450918, 1601017.3688731098]
4:[13466767.761325281, 1601017.3688731098]
1
  • maxx and maxy. There are only 2 x and 2 y, and the corners are the 4 possible combos of those. Aug 25, 2017 at 13:13

1 Answer 1

1

Those ones is the corner coordinates of the box you're plotting.(The box is meaning DrawBox) Index 0 and 4 same values, because it must be a polygon. You can use these values to plotting a polygon.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.