react-google-maps icon indicating copy to clipboard operation
react-google-maps copied to clipboard

Broken path to cluster images

Open johnBgood opened this issue 5 years ago • 6 comments

Linked with this issue. Markercluster lib has refactor the project layout so there are 404 errors concerning images urls. e.g.

https://raw.githubusercontent.com/googlemaps/v3-utility-library/master/markerclustererplus/images/m1.png

My guess is that react-google-maps should use a fixed version of the markercluster lib (if there's any).

The fact is we have no icons anymore in production, thanks for helping :)

johnBgood avatar Oct 04 '19 08:10 johnBgood

Same issue here

jetonk avatar Oct 04 '19 08:10 jetonk

As a temporary workaround, you can change the package.json dependency to "react-google-maps": "desmoteo/react-google-maps#fix-markerclusterpath",

desmoteo avatar Oct 04 '19 08:10 desmoteo

For those who use react-google-maps download the Images from the links below:

https://raw.githubusercontent.com/googlemaps/v3-utility-library/master/packages/markerclustererplus/markerclustererplus/images/m1.png https://raw.githubusercontent.com/googlemaps/v3-utility-library/master/packages/markerclustererplus/markerclustererplus/images/m2.png https://raw.githubusercontent.com/googlemaps/v3-utility-library/master/packages/markerclustererplus/markerclustererplus/images/m3.png https://raw.githubusercontent.com/googlemaps/v3-utility-library/master/packages/markerclustererplus/markerclustererplus/images/m4.png https://raw.githubusercontent.com/googlemaps/v3-utility-library/master/packages/markerclustererplus/markerclustererplus/images/m5.png

Save them in your local images folder, and customize the MarkerCluster styles.

<MarkerClusterer
         gridSize={googleMapConfig.gridSize}
         averageCenter
         enableRetinaIcons
         styles={[
                {
                  url: '/markercluster/m1.png',
                  height: 53,
                  width: 53,
                },
         ]}
  >

jetonk avatar Oct 04 '19 09:10 jetonk

@jetonk The repo of this project is unmaintained more than a year, and we had build new version https://www.npmjs.com/package/@react-google-maps/api

We had rewrite it to TypeScript, and updating it frequently: https://github.com/JustFly1984/react-google-maps-api/tree/master/packages/react-google-maps-api You can enjoy autocomplete.

You can see our docs: https://react-google-maps-api-docs.netlify.com/

Also a lot of examples: https://react-google-maps-api-gatsby-demo.netlify.com/ https://github.com/JustFly1984/react-google-maps-api/tree/master/packages/react-google-maps-api-gatsby-example/src/examples

The bundle size is much smaller: https://bundlephobia.com/result?p=@react-google-maps/[email protected]

Enjoy!

JustFly1984 avatar Oct 09 '19 23:10 JustFly1984

@JustFly1984 this is great. If possible, I think it would be really helpful to have this explained in this project Readme and/or homepage

desmoteo avatar Oct 10 '19 08:10 desmoteo

@desmoteo not possible, cos author is not responding since 2 years. possible he is dead...

JustFly1984 avatar Oct 10 '19 21:10 JustFly1984