Hi Bas, You can check the geometry object of your feature. You'll find a Polygon object which has points and there you can check the first and the last if they have the same coordinates.
yourFeature.geometry.components[0].components[0].x // the first point.x yourFeature.geometry.components[0].components[0].y // the first point.y yourFeature.geometry.components[0].components[last].x // the last point.x yourFeature.geometry.components[0].components[last].x // the last point.y Hope this helps, Alexandre Bas Couwenberg wrote: > Hello, > > is there a way in OpenLayers to check if a feature is a valid Polygon? > I want to check it the start and end point are the same coordinate and > such. > > Best regards, > > Bas Couwenberg > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > [email protected] > http://openlayers.org/mailman/listinfo/users > -- Alexandre Dubé Mapgears www.mapgears.com _______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
