Comments (6)
Hi Prusswan,
Is this a usecase you need? I'm open to expanding the Geocoder
class to provide more of the underlying options. I do hope we can do that in a sane and minimal way though, so we don't take on too much extra maintenance load. If you have already related work done, could you show what you have in mind? Just open a PR if you like, I can take a look.
from folium.
@Conengmo thanks. See #1852, I have tested with 4 providers including Nominatim
from folium.
Thanks @prusswan! I took a look, and will continue the discussion here. I'll make a judgement call and say that this is too much custom Javascript code to accept in Folium. Meaning we cannot take on that maintenance burden.
Though it is cool work that you did! I suggest you host it as a Folium plugin yourself, and when you do we can link to it. We have done this with others before, see https://github.com/python-visualization/folium#packages-and-plugins.
Is this acceptable to you? Or do you have other thoughts or ideas? Love to hear them.
from folium.
@Conengmo I understand your reasoning, but I don't think I would want to maintain a plugin like this when 1) it is effectively a single class, expanded replacement of the "official" Geocoder 2) part of the functionality should have been supported by the Geocoder (as raised in this issue) 3) custom Javascript is unavoidable given the nature of the plugin (to be executed on client-side), and yet folium is designed with enough flexibility (a good thing) to accommodate such changes (I tried something similar with ipyleaflet, but could not see an "easy" way due to its design)
One way to reduce the custom Javascript is to exclude the functionality for user-defined geocoding providers and just allow the option to use non-Nominatim providers (and to make maintenance more manageable, just mention the providers that have been tested specifically in the docs, leaving the rest "open")
from folium.
Thanks for your response, that sounds like a very reasonable compromise. Since the custom template is most of the new code, that does reduce the maintenance load significantly. Let's continue with that PR then based on your suggestion. I'll also add some comments there so you can possibly address everything in one go.
from folium.
Since #1852 was merged I'll close this issue.
from folium.
Related Issues (20)
- Add ability to add a dynamic text/title per frame when using TimestampedGeoJson HOT 2
- Possibility to show all points from geojson file with the realtime plugin. HOT 2
- Folium maps not displayed with Safari in Iphones HOT 1
- GeoJson style is not being applied correctly HOT 2
- Keep original size of image in CustomIcon
- NumPy 2.0 support HOT 4
- AttributeError: module 'folium' has no attribute 'plugins' HOT 1
- Marker with same ID results into broken html HOT 1
- Make Folium follow the Leaflet class hierarchy more closely HOT 4
- Add example pattern for pulling JsCode snippets from external javascript files HOT 9
- Support function objects in Leaflet options. HOT 3
- HTML does not work when run on mobile. HOT 2
- Blue Lines when using TimestampedGeoJson in Folium HOT 2
- Docs not quite representative of the real "latest" version? HOT 5
- No popup when clicking on specific icons (BeautifyIcon plugin) HOT 2
- Geocoder plugin not working in Google Chrome HOT 1
- Making a tooltip stay when clicked on a marker/shape HOT 1
- Add Code of Conduct HOT 1
- Trying to figure out why I'm getting different sets of colors with to_step() versus StepColormap() when using a list of custom bins
- Realtime Circles have non-changing radii.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from folium.