Giter Club home page Giter Club logo

Comments (6)

Conengmo avatar Conengmo commented on June 2, 2024

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.

prusswan avatar prusswan commented on June 2, 2024

@Conengmo thanks. See #1852, I have tested with 4 providers including Nominatim

from folium.

Conengmo avatar Conengmo commented on June 2, 2024

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.

prusswan avatar prusswan commented on June 2, 2024

@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.

Conengmo avatar Conengmo commented on June 2, 2024

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.

Conengmo avatar Conengmo commented on June 2, 2024

Since #1852 was merged I'll close this issue.

from folium.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.