step 2 Open browser to the include leaflet page, click map to draw, the default blue marker disappeared.
When I run 'ng build --extract-css',Same page the behaviour is normal, can see the default blue marker on map and mouse also have the default blue marker
When I run 'ng build --prod --aot --vendor-chunk --common-chunk --delete-output-path --buildOptimizer --extract-css', Same page the behaviour is strange,I can not see the default blue marker on map and mouse didn't show the default blue marker
Minimal example reproducing the issue
[ 1 ]This is my ts code
import * as L from 'leaflet';
import 'leaflet-draw';
import 'leaflet.path.drag';
How to reproduce
When I run 'ng build --extract-css',Same page the behaviour is normal, can see the default blue marker on map and mouse also have the default blue marker
When I run 'ng build --prod --aot --vendor-chunk --common-chunk --delete-output-path --buildOptimizer --extract-css', Same page the behaviour is strange,I can not see the default blue marker on map and mouse didn't show the default blue marker
Minimal example reproducing the issue
[ 1 ]This is my ts code import * as L from 'leaflet'; import 'leaflet-draw'; import 'leaflet.path.drag';
initMap() { this.map = L.map('map', { minZoom: 3, maxZoom: 7, center: [0, -4000], zoom: 3, dragging: true, attributionControl: false, zoomControl: true, scrollWheelZoom: true, doubleClickZoom: false, crs: L.CRS.Simple }).setView([0, 0], 1); L.control.fullscreen({ position: 'topright' }).addTo(this.map); var w = 7000, h = 4000 var southWest = this.map.unproject([0, h], this.map.getMaxZoom() - 1); var northEast = this.map.unproject([w, 0], this.map.getMaxZoom() - 1); this.bounds = new L.LatLngBounds(southWest, northEast); this.map.setMaxBounds(this.bounds); this.map.fitBounds(this.bounds); }
ngAfterViewInit() { this.initMap(); this.marker = new L.Draw.Marker(this.map); this.lineDraw = new L.Draw.Polyline(this.map); }
drawMarker() { this.marker.enable(); this.mapOnDraw() } mapOnDraw() { this.removeDrawMarker();
this.map.off('draw:created'); this.map.on('draw:created', (e: L.DrawEvents.Created) => { }); }
Using jsfiddle or another example site.