Closed janbaykara closed 2 years ago
Ended up reimplementing a lot of the javascript using https://github.com/hotwired/stimulus at https://github.com/commonknowledge/django-map-widgets/compare/mapbox..master so I probably won't do too much more work on this PR, but I hope it's useful for anyone who wants to take it further!
@janbaykara I am very glad to see your PR, the frontend side of the project needed to be updated but I couldn't spare time to do it.
However, I am on holiday at the moment I will review your changes in the following weeks.
Thanks!
@janbaykara Sorry for my super delayed response. I have tested your Mapbox widget, static files loaded fine but it seems you didn't add api-key parameter for JS source.
I have merged your changes to main branch but I haven't published the changes yet. Would be great if you can fix the API key issue with a new PR otherwise, I will fix it at some point.
Many thanks again your contribution.
Oh, nice one! Glad that's working for you.
Here is the config I used to make it work:
MAP_WIDGETS = {
"MapboxPointFieldWidget": (
("access_token", MAPBOX_API_PUBLIC_TOKEN),
),
"MAPBOX_API_KEY": MAPBOX_API_PUBLIC_TOKEN
}
@janbaykara I have updated MapBox widget implementation since merge your PR to master.
it's all documented here; https://django-map-widgets.readthedocs.io/en/mapbox_widget_fixes/widgets/mapbox_point_field_map_widgets.html
Feel free to test or contribute to the new release.
So glad to hear! Thank you for maintaining this package - I hope this encourages other substantial contributions!
This PR adds
MapPointFieldWidget
. We've done a simple translation from the GooglePointFieldWidget for use in a small academic project.I'd be happy to do some tidying up and so on so we can this merged in, butI don't anticipate having the capacity any time too soon to add the other widgets required to reach parity with the Google suite of widgets.