pbugnion / gmaps

Google maps for Jupyter notebooks
https://jupyter-gmaps.readthedocs.io/en/stable/
Other
760 stars 146 forks source link

In the marker layer, fill and stroke opacity seem to do nothing #259

Closed pbugnion closed 6 years ago

pbugnion commented 6 years ago

I would expect the following to lead to an invisible layer, but that doesn't seem to work.

df = gmaps.datasets.load_dataset_as_df('starbucks_kfc_uk')
starbucks_df = df[df['chain_name'] == 'starbucks']
starbucks_df = starbucks_df[['latitude', 'longitude']]

fig = gmaps.Map()
starbucks_layer = gmaps.symbol_layer(
    starbucks_df, fill_color="green", 
    stroke_color="green", scale=2, fill_opacity=0.0,
    stroke_opacity=0.0)
fig.add_layer(starbucks_layer)
fig

As a work-around, you can set the opacity directly in the color:

df = gmaps.datasets.load_dataset_as_df('starbucks_kfc_uk')
starbucks_df = df[df['chain_name'] == 'starbucks']
starbucks_df = starbucks_df[['latitude', 'longitude']]

fig = gmaps.Map()
starbucks_layer = gmaps.symbol_layer(
    starbucks_df, fill_color="rgba(0, 255, 0, 0.0)", 
    stroke_color="rgba(0, 255, 0, 0.0)", scale=2)
fig.add_layer(starbucks_layer)
fig
pbugnion commented 6 years ago

Closed by PR #263.