openlayers 3 - How to get the coordinates of a polygon in OpenLayers3 on draw end -
i have tried add click handler map, not sure how tell when polygon has finished drawing. there simple function polygon coordinates on draw end ?
you can adapt https://stackoverflow.com/a/24835176/228885 purposes. mentioned in answer feature.once('change', ...)
might way go. expect in case pick last element feature passed handler. extract coordinates out of , off go.
tldr; listen add
or change
of features, extract coordinate.
Comments
Post a Comment