Code Monkey home page Code Monkey logo

Comments (7)

arthur-e avatar arthur-e commented on June 2, 2024

Hi @Anexo, version 1.3.7 passed all the tests, so I'm sorry to hear you're having an issue. My understanding is that the change to wicket.js made by @cancastilho moves Wkt to global scope. It could be that our tests are not comprehensive. Could you provide some more details, including a specific error message?

In the meantime, you can revert to version 1.3.6. If you need advice on how to install a specific version, let me know which package manager you are using.

from wicket.

Anexo avatar Anexo commented on June 2, 2024

Yes, I installed version 1.3.6 and its working. I am using angular by the way. Here is the error on version 1.3.7:

Uncaught ReferenceError: Wkt is not defined
    at wicket.js:50
    at Object.<anonymous> (wicket.js:27)
    at wicket.js:28
    at Object../node_modules/wicket/wicket.js (wicket.js:36)

from wicket.

cancastilho avatar cancastilho commented on June 2, 2024

@Anexo Could you provide a sample code to reproduce this error?

@arthur-e I can send another pull request with Wkt not global that works with arcgis, but probably it is better to have a sample code to reproduce the error first.

from wicket.

Anexo avatar Anexo commented on June 2, 2024

Yes of course, here is an extract of my working code, using 1.3.6. It is a *.ts file

import * as Wkt from 'wicket';

// Request to cadastre: response WKT geometry by reference number:
    this.cadastre.getWKTRC(request)
        .subscribe( (response: any) => {
            if (response.wkt != -1) {
                this.rc = response.rc;
                // Instantiate Wkt to transform wkt -> geoJSON
                const wkt = new Wkt.Wkt();
                wkt.read(response.wkt);
                const geoJson = wkt.toJson();

                // Validate intersection with target area with turf
                this.validateIntersection(geoJson, this.RCFeatureGroup);
            }
        });

from wicket.

cancastilho avatar cancastilho commented on June 2, 2024

I could not reproduce the problem. Here is a working test with typescript and webpack.

@Anexo could you provide a self-contained code sample so we can run and reproduce the problem?

from wicket.

arthur-e avatar arthur-e commented on June 2, 2024

@Anexo Version 1.3.8 was just published with @cancastilho's changes.

from wicket.

Anexo avatar Anexo commented on June 2, 2024

Thank you so much. Version 1.3.8. is working perfectly

from wicket.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.