Skip to content

Instantly share code, notes, and snippets.

@explooosion
Last active December 7, 2018 16:03
Show Gist options
  • Save explooosion/08d2ae4031a8c00b53b621e89415e3e9 to your computer and use it in GitHub Desktop.
Save explooosion/08d2ae4031a8c00b53b621e89415e3e9 to your computer and use it in GitHub Desktop.
import 'leaflet/dist/leaflet.css';
import 'leaflet.markercluster/dist/MarkerCluster.css';
import 'leaflet.markercluster/dist/MarkerCluster.Default.css';

import marker from 'leaflet/dist/images/marker-icon.png';
import marker2x from 'leaflet/dist/images/marker-icon-2x.png';
import markerShadow from 'leaflet/dist/images/marker-shadow.png';

import L from 'leaflet';
import 'leaflet.markercluster';

delete L.Icon.Default.prototype._getIconUrl;

L.Icon.Default.mergeOptions({
    iconRetinaUrl: marker2x,
    iconUrl: marker,
    shadowUrl: markerShadow,
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment