Open gergely-ujvari opened 6 years ago
Very annoying indeed. If you need it changed just once override the IMAGE_PATH
property of what the marker-clusterer-plus
module exports.
import MarkerClustererPlus from 'marker-clusterer-plus'
import { MarkerClusterer } from 'react-google-maps/lib/components/addons/MarkerClusterer'
MarkerClustererPlus.IMAGE_PATH = '/mapclusterer/m'
// your important stuff as usual
This worked for me
Setting the
iconPath
property for the MarkerClusterer Component has no effect. Markerclustererplus still gets the icons from the default url.This is because how the underlying library works:
setupStyles_()
uses the property to set the icon urls: https://github.com/googlemaps/v3-utility-library/blob/master/markerclustererplus/src/markerclusterer.js#L818A possible workaround is to reset the style list manually, something like this. Inside
src/components/addons/MarkerClusterer.jsx
:instead of