Open UltimateForm opened 4 years ago
i've written the input as well but it's a bit longer and dirtier
@UltimateForm would you mind sharing it as well?
@UltimateForm - +2 for what @MathiasBerwig said!
@MathiasBerwig
https://codesandbox.io/s/wizardly-dijkstra-6br6x (you will need to set your google maps API key at config.js)
this is a somewhat rushed impl, but still better than what i have locally (mine has other extra stuff like geoHash conversion i.e). Everything you need is at the "googleMaps" folder and the forms on post/index.tsx
, the rest is just what I copied from react-admin's demo
@MathiasBerwig @AdamDocherty also note that on my impl i separated the input from the map viewer because at some points I need only the viewer, a purely input usage can combine the two for better readability
@UltimateForm Great work, could you please share a { PostShow } example
react-google-maps-api
Why? react-google-maps has been unmaintained for 2 years and every new issue seems to be followed by this https://github.com/tomchentw/react-google-maps/issues/1020#issuecomment-562797063
I've tested react-google-maps-api on my side and it works quite well with new react-admin version, most importantly 3.0.0
here's an example implementation of a viewer (i've written the input as well but it's a bit longer and dirtier):