A
A
Alexey Dabalaev2019-04-14 22:12:39
OpenStreetMap
Alexey Dabalaev, 2019-04-14 22:12:39

How to get polygon vertex coordinates in OpenLayers?

There is a task: to receive the list of all objects in the chosen area. The selected area is the area selected dynamically by the user. Having received the coordinates of the vertices, I can extract the desired objects from the database by their coordinates.
You can, of course, draw arbitrary shapes by clicking with the cursor, while getting the coordinates by clicking is not difficult. But then another "problem" will appear - users will start clicking anywhere and building various shapes, which will complicate the task "by an order of magnitude".
5cb385a1be203217095321.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
tosha4encko, 2020-02-05
@tosha4encko

https://openlayers.org/en/v4.6.5/examples/box-sele...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question