Code Monkey home page Code Monkey logo

Comments (9)

HarelM avatar HarelM commented on May 28, 2024

Not sure what's needed here.
If you think this should be part of the docs please create a PR.
Point is a maplibre-gl-js dependency that can't be removed and export as default (the "old way").

from ngx-maplibre-gl.

Ste-denko avatar Ste-denko commented on May 28, 2024

I am facing the same problem after following the exact documentation of ngx-maplibre-gl.
Any solution for this?

from ngx-maplibre-gl.

HarelM avatar HarelM commented on May 28, 2024

See the following example (missing css though):
https://stackblitz.com/edit/angular-ivy-fpge8r?file=src%2Findex.html

from ngx-maplibre-gl.

HarelM avatar HarelM commented on May 28, 2024

@Ste-denko, @damian-kociszewski isn't adding allowSyntheticDefaultImports to tsconfig.json solves this?

from ngx-maplibre-gl.

Ste-denko avatar Ste-denko commented on May 28, 2024

Adding allowSyntheticDefaultImports to tsconfig.json fixes it.

@HarelM could you provide some background info about this.
What is the parameter allowSyntheticDefaultImports for?
To which value should it be set in the tsconfig.json (true/false)?

from ngx-maplibre-gl.

HarelM avatar HarelM commented on May 28, 2024

It's worth reading this in the typescript manual as I might not explain it very good.
The bottom line is that the geomerty-point is exported in a way that requires this flag and the typings for the geomerty-point honors that type of export.
This package is used in the maplibre-gl package which is also needed in order to work with this package.
I hope this explain this well enough, but if not I advise to read about this flag in the manual...

from ngx-maplibre-gl.

Ste-denko avatar Ste-denko commented on May 28, 2024

@HarelM thank you.
For me this is fixed now and could be closed.

from ngx-maplibre-gl.

Sampath-Lokuge avatar Sampath-Lokuge commented on May 28, 2024

Hi @HarelM

Please update the doc too. I was not able to find this on the readme: https://github.com/maplibre/ngx-maplibre-gl

This works for me:

tsconfig.json

 "angularCompilerOptions": {
   ...
    "allowSyntheticDefaultImports": true
  }

from ngx-maplibre-gl.

HarelM avatar HarelM commented on May 28, 2024

@Sampath-Lokuge feel free to open a PR to improve the docs.

from ngx-maplibre-gl.

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.