question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Get Coordinates of drawn polygon feature.

See original GitHub issue

I’m not able to use getCoordinates() in order to get polygon drawn coordinates like this:

onDrawEnd(feature: Feature) {
       console.log(feature.getGeometry().getCoordinates());
}

getCoordinates() just doesn’t exist.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
gasperiguillaumecommented, Jun 20, 2018

@mhosman

Is it what you are trying to do ? https://stackblitz.com/edit/angular-2zczhc

0reactions
mhosmancommented, Jun 20, 2018

That’s great! Thank you @gasperiguillaume

Read more comments on GitHub >

github_iconTop Results From Across the Web

OpenLayers: Get Coordinates of drawn features
The drawn feature are added to the layer named vector . ... Go through this array and get coordinates of their geometry. features....
Read more >
get coordinates of drawn feature in OpenLayers - Stack Overflow
I'm brand new to using OpenLayers, and all I'm trying to do is to get the coordinates of the points, lines, polygons that...
Read more >
Creating a point or vertex at an exact x,y location (absolute x,y)
These steps can be used to create either point features or vertices in lines and polygons: To create a point feature · Right-click...
Read more >
ee.Geometry.Polygon.coordinates - Earth Engine
Apply the coordinates method to the Polygon object. var polygonCoordinates = polygon.coordinates(); // Print the result to the console.
Read more >
Drawing lines, points or polygons (vectors) in ArcGIS
Creating Shapefiles - Drawing lines, points or polygons (vectors) in ArcGIS · In the Name field enter a name for the Shapefile you...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found