We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Angular 18 esbuild: Cannot read properties of undefined (reading 'Event') Draw is not defined map.on(Draw.Event.CREATED, (e: any) => LeafletUtil.handleEvent(this.zone, this.onDrawCreated, e));
map.on(Draw.Event.CREATED, (e: any) => LeafletUtil.handleEvent(this.zone, this.onDrawCreated, e));
Fix: projects/ngx-leaflet-draw/src/lib/core/leaflet-draw.directive.ts
Change imports order: import { Control, Draw, DrawEvents, drawLocal } from 'leaflet'; import 'leaflet-draw';
To: import 'leaflet-draw'; import { Control, Draw, DrawEvents, drawLocal } from 'leaflet';
Then Draw will be defined, and it solves the problem.
The text was updated successfully, but these errors were encountered:
Fix issue bluehalo#156 by changing the order of imports in the directive
95a9818
No branches or pull requests
Angular 18 esbuild:
Cannot read properties of undefined (reading 'Event')
Draw is not defined
map.on(Draw.Event.CREATED, (e: any) => LeafletUtil.handleEvent(this.zone, this.onDrawCreated, e));
Fix:
projects/ngx-leaflet-draw/src/lib/core/leaflet-draw.directive.ts
Change imports order:
import { Control, Draw, DrawEvents, drawLocal } from 'leaflet';
import 'leaflet-draw';
To:
import 'leaflet-draw';
import { Control, Draw, DrawEvents, drawLocal } from 'leaflet';
Then Draw will be defined, and it solves the problem.
The text was updated successfully, but these errors were encountered: