Git Product home page Git Product logo

Comments (9)

JamesLMilner avatar JamesLMilner commented on June 2, 2024

Hey @ingalls - thanks for this. Let me try and help you here!

I am a bit confused as getCoordinatePrecision comes from the base class that all adapters extend from, and should be present in all adapters. Let me do a bit of digging and report back.

from terra-draw.

JamesLMilner avatar JamesLMilner commented on June 2, 2024

I can't reproduce this locally in the development folder. The build there is powered by Webpack. I am wondering if it's something specific about vue-tsc ? A reproduction case might be helpful.

from terra-draw.

ingalls avatar ingalls commented on June 2, 2024

@JamesLMilner Gladly, I really appreciate you spending the time to look into this for me.

I've build the smallest reproducible test case I possibly could here:
https://stackblitz.com/edit/vitejs-vite-6likzu?file=src%2FApp.vue

  • The only file that is really relevant is the src/App.vue
  • Typescript compilation by vue-tsc can be initiation with npm run build and will output the same error as above.

I've also attached a static version in a zip to this issue
vitejs-vite-6likzu.zip

from terra-draw.

JamesLMilner avatar JamesLMilner commented on June 2, 2024

Thanks for sharing the reproduction - I'll try and get to this as soon as I get a moment.

from terra-draw.

JamesLMilner avatar JamesLMilner commented on June 2, 2024

@ingalls thanks for the reproduction case - super helpful. I was able to see the error. However, I am a bit unsure as to why it is happening, as the abstract class that it extends from TerraDrawBaseAdapter already has the concrete implementation for unregister and getCoordinatePrecision. I have a gut feeling that this might go away if we added:

	public getCoordinatePrecision(): number {
		return super._coordinatePrecision;
	}

On the parent adapters, but this shouldn't be necessary to my understanding. My gut instinct is this might be a vue-tsc issue but I can't be 100% sure - I might see if I can get just a plain tsc build working locally.

from terra-draw.

JamesLMilner avatar JamesLMilner commented on June 2, 2024

Okay, I can replicate with plain tsc so this is not isolated to vue-tsc. Give me some time to resolve this as I can imagine this will be a pain point for a lot of people

from terra-draw.

JamesLMilner avatar JamesLMilner commented on June 2, 2024

@ingalls this is now resolved in 0.0.1-alpha.66 🎉 I don't fully understand why this didn't work - it may be something to do with microbundle, but it was too time consuming to keep debugging. If anyone reading this knows I'd be happy to learn more!

Anyhow, very much appreciate you raising this and glad we could get it fixed. Would be interested to hear what you're working on - let me know if there's any other issues you hit along the way!

from terra-draw.

ingalls avatar ingalls commented on June 2, 2024

Hey @JamesLMilner Really appreciate you taking the time to dive in and fix this. I'm a former Mapboxer, now working for the State of Colorado on a public safety situational awareness tool called COTAK - https://cotak.gov .

COTAK provides public safety specific user and real-time geospatial data management around a the federal TAK program - https://tak.gov/. TerraDraw currently powers the editing tools in CloudTAK - https://github.com/dfpc-coe/CloudTAK.

Your library just yesterday, helped coordinate an interagency (Mountain Rescue, EMS, & Air-Medical) rescue of an mountain biker with a suspected femor Fx be packaged and airlifted to definitive care.

from terra-draw.

JamesLMilner avatar JamesLMilner commented on June 2, 2024

Hey @ingalls no problem, I'm glad we could get it resolved! The reproduction case and all the info you provided made it really smooth to figure out what was happening.

That's really cool to hear - thank you for taking the time to share that with me. Always nice to hear when your OSS libraries are powering real applications!

If you find any more issues, or have ideas for new features, please feel free to raise them on the issue tracker.

from terra-draw.

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.