File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,10 +23,22 @@ import {
2323} from "./services/User/User" ;
2424import "./theme.scss" ;
2525import "./styles/index.css" ;
26+ import L from "leaflet" ;
2627import "leaflet/dist/leaflet.css" ;
2728import "mapillary-js/dist/mapillary.css" ;
2829import "leaflet.markercluster/dist/MarkerCluster.css" ;
2930import "leaflet.markercluster/dist/MarkerCluster.Default.css" ;
31+ import markerIcon2x from "leaflet/dist/images/marker-icon-2x.png" ;
32+ import markerIcon from "leaflet/dist/images/marker-icon.png" ;
33+ import markerShadow from "leaflet/dist/images/marker-shadow.png" ;
34+
35+ // Fix Leaflet default marker icon paths broken by bundler
36+ delete L . Icon . Default . prototype . _getIconUrl ;
37+ L . Icon . Default . mergeOptions ( {
38+ iconRetinaUrl : markerIcon2x ,
39+ iconUrl : markerIcon ,
40+ shadowUrl : markerShadow ,
41+ } ) ;
3042
3143// Setup Apollo graphql client
3244const graphqlClient = new ApolloClient ( {
You can’t perform that action at this time.
0 commit comments