arthur-e / Wicket

A modest library for moving between Well-Known Text (WKT) and various framework geometries
https://arthur-e.github.io/Wicket/
Other
586 stars 226 forks source link

ESRI ArcGIS JavaScript API demo fails #152

Closed DLS-2019 closed 3 years ago

DLS-2019 commented 3 years ago

The ESRI ArcGIS JavaScript API demo (https://arthur-e.github.io/Wicket/sandbox-arcgis.html) is failing

image

DLS-2019 commented 3 years ago

I tried to use wicket in an Angular app:

const wkt = new Wkt.Wkt(); wkt.read("POLYGON ((30 10, 10 20, 20 40, 40 40, 30 10))");
console.log(wkt.components); //it works up to here

// but then fails on wkt.toObject();

image

I noticed that the arcgis.html demo code uses wkt.toObject(config);

        config = {
            spatialReference: {
                wkid: 4326 // WGS84 unprojected
            },
            editable: editable
        };
        obj = wkt.toObject(config); // Make an object

But wkt.toObject() is expecting 0 arguments....... it also results in the error above.

arthur-e commented 3 years ago

Thanks, @DLS-2019. I don't think the ArcGIS module in Wicket has been updated in a few years now, and the ArcGIS Javascript extension has likely made some breaking changes since then. See related issue #90.

DLS-2019 commented 3 years ago

Thank you for the feedback @arthur-e - I switched to using the TerraFormer plugin