Hi Andreas. I know what getCoordinates does, but that is not what I want.
I want method that returns an array of points (array of ol.geom.Point), for any geometry type. *Example 1: Point* var geometry = new ol.geom.Point([-8, 40]); geometry.getCoordinates(); // Returns [-8, 40] geometry.getVertices(); // Returns an array with only the point (-8, 40), as an instance of ol.geom.Point *Example 2: LineString* var geometry = new ol.geom.LineString( [ [-8, 40], [-5, 30], [1, 52] ] ); geometry.getCoordinates(); // Returns [ [-8, 40], [-5, 30], [1, 52] ] geometry.getVertices(); // Returns an array with the two end points (-8, 40) and (1, 52), as a instances of ol.geom.Point *Example 3: Polygon* var geometry = new ol.geom.Polygon( [ [ [-8, 40], [-5, 30], [1, 52], [-8, 40] ] ] ); geometry.getCoordinates(); // Returns [ [ [-8, 40], [-5, 30], [1, 52], [-8, 40] ] ] geometry.getVertices(); // Returns an array with the three points (not the closed ring) (-8, 40), (-5, 30) and (1, 52), as a instances of ol.geom.Point Am I right about "getCoordinates"? As you can see, I want something different, and you certainly know it because it was in OpenLayers 2. Thanks a lot for your answer. :) João Rodrigues -- You received this message because you are subscribed to the Google Groups "OL3 Dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/ol3-dev. To view this discussion on the web visit https://groups.google.com/d/msgid/ol3-dev/57aa5f04-8d14-408c-9dfa-32723d265727%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
