Skip to content
New issue

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

MarkerClusterer returning 404 image by incorrectly handling icon filePath #437

Closed
josephdburdick opened this issue Feb 23, 2017 · 2 comments

Comments

@josephdburdick
Copy link

josephdburdick commented Feb 23, 2017

Hello, I am requiring an image from Webpack and inserting into MarkerClusterer like so:

const clusterMarkerSrc = require('!file?name=[name].[ext]!../../../assets/images/marker-cluster--magenta.png'); // eslint-disable-line import/no-webpack-loader-syntax

<MarkerClusterer
        averageCenter
        enableRetinaIcons
        gridSize={60}
        maxZoom={12}
        imagePath={clusterMarkerSrc}
      >
        { renderMarkersOnMap(props) }
      </MarkerClusterer>

If I place <img src={clusterMarkerSrc} /> in the view it renders properly with the file path. When I place it in the map however via the MarkerCluster imagePath option console reports the following 404: http://localhost:3000/marker-cluster--magenta.png1.png 404 (Not Found). If I place an external link to an icon it renders properly, but this icon is local.

Please advise. Thank you very much!

@felipemfp
Copy link

imagePath should be the path to a folder where the MarkerClusterer can find images ([1-5].png).

See how it adds 1.png: localhost:3000/marker-cluster--magenta.png1.png

@tomchentw
Copy link
Owner

Please refer to Getting Help section in the README (or #469).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants