Closed phptek closed 5 years ago
I suspect this happens because the final point is not precisely located on top of the first point. Is there a way to "snap" a point onto another in LeafletJS? Meanwhile I have hacked this slightly in my PoC application, by converting "LINESTRING" into "POLYGON" in the custom map JS, which works for my purposes.
Leaflet.draw doesn't close polygons. Fixed in e9bfb3d. Thanks
In the CMS, and using the Polygon map-tool to select a multi-point area, I cannot seem to be able to save the record. Using the line-tool works though.
php 7.2 / SilverStripe 4.3 / Postgres 9.5 / Postgis 2.2
The error I get is:
I gather this is a PostGIS error. Could the lat/lon be the wrong way around? Is each DB connection using the correct datum/projection?
EDIT:
When creating or editing a record with only 3 points, I get the error:
Which begs the question "What is the minimum no. points that PostGIS will allow"? If there is a minimum. there should probably be some client-side validation or SilverStripe validation to prevent creation of polygons with too few points. But really..If I want to create a triangle, why can't I?!
Here are the steps to reproduce:
DataObject
subclass and create aDataExtension
for it, whose$db
static containsLocation => 'Geometry'
ModelAdmin
for it