You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you have multiple features on a geojson file, it would be handy to keep the features as 'abstract' layers to select which style to be used. By 'abstract' here I mean that they're working on the same data.
An example could be to highlight a set of polygons reflecting feature A in abstract layer 1, while it would highlight feature B in abstract layer 2.
Right now I would have to add the same polygons (geojson) with different style functions to achieve this, essentially duplicating the data. The problem grows with more features I would want to illustrate..
Hi @Trollgeir, I think I understand what you mean. We currently don't have that exact functionality in folium.
We recently merged a change where you can use GeoJson with a style_function and still not embed the data in the html, if you pass a URL or a file path. Would that work for you? You can make multiple GeoJson objects, each with their own style_function, but not embed the data so they can use the same data source.
As I understood it #975 is more about general solutions to reduce the html size, not about optimizing a single class (like GeoJson). Though of course ideas to improve are welcome whatever their scope. But if you want to talk about GeoJson specifically let's open a new issue.
Activity
Conengmo commentedon Mar 25, 2019
Hi @Trollgeir, I think I understand what you mean. We currently don't have that exact functionality in folium.
We recently merged a change where you can use
GeoJsonwith astyle_functionand still not embed the data in the html, if you pass a URL or a file path. Would that work for you? You can make multipleGeoJsonobjects, each with their ownstyle_function, but not embed the data so they can use the same data source.Trollgeir commentedon Mar 25, 2019
@Conengmo what merge is this? This could possibly contribute to another issue: #975 (comment)
[-]Feature request: conditional style functions[/-][+]Feature request: dynamic style functions[/+]Conengmo commentedon Mar 25, 2019
That was #1058.
As I understood it #975 is more about general solutions to reduce the html size, not about optimizing a single class (like
GeoJson). Though of course ideas to improve are welcome whatever their scope. But if you want to talk aboutGeoJsonspecifically let's open a new issue.