question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Transparent GeoJson

See original GitHub issue

Trying to create a transparent GeoJson, i only want to see the tooltips over a choropleth.

Trying the below, but getting nowhere.

style_function = {'fillColor': '#00FFFFFF',
                 'lineColor': '#00FFFFFF'}

folium.GeoJson(combined,
               tooltip=folium.GeoJsonTooltip(fields=['LGA','MBRS'],
                                             aliases=['Location','Members']),
               style_function=style_function).add_to(m)

folium.LayerControl().add_to(m)

Can you tell me how to make the GeoJson layer transparent?

Thanks.

Jack.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

6reactions
jackemcphersoncommented, Nov 21, 2018

Thanks a lot for getting back to me, both options worked!

Just for anybody finding this in future: replace the dict from my code with:

{'fillColor': '#00000000', 'color': '#00000000'}

1reaction
paaghicommented, May 24, 2019

I came across a similar problem like yours. Try to set the ‘fillOpacity’ property in your style function. Because according to the original Leaflet documentation, the default value is 0.2. I hope it helps.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I set the opacity of a geojson object or layer in leaflet?
I'm trying to apply opacity to a geojson layer in leaflet.js . The documentation seems to show that opacity can be set in...
Read more >
how to make geojson layer transparent (not visible on map)
I'm trying to make a geojson layer in leaflet transparent (not visible on the map) . I require the layer to perform a...
Read more >
Style GeoJSON Visualization - HERE Developer
To customize the visual appearance of GeoJSON data, you can add the following custom properties to a Feature object: "properties": { "tooltip": "",...
Read more >
V2 - Usage - geoJSON - Icon Map
0 = completely transparent. 100 = completely opaque. Inactive Fill Color. Shape fill color when there is not corresponding data item in the...
Read more >
Data Layer | Maps JavaScript API - Google Developers
You can use the Data layer to store your custom data, or to display GeoJSON data on a Google map. Overview. Watch this...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found