tomchentw / react-google-maps

React.js Google Maps integration component
https://tomchentw.github.io/react-google-maps/
MIT License
4.62k stars 939 forks source link

Broken path to cluster images #1009

Open johnBgood opened 5 years ago

johnBgood commented 5 years ago

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 :)

jetonk commented 5 years ago

Same issue here

desmoteo commented 5 years ago

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

jetonk commented 5 years ago

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,
                },
         ]}
  >
JustFly1984 commented 4 years ago

@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/api@1.7.5

Enjoy!

desmoteo commented 4 years ago

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

JustFly1984 commented 4 years ago

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