I have a python dash app in which I use dash-leaflet to generate a map. For my airports overlay, I am trying to add an airplane icon from Font Awesome or Awesome Markers, however it is not working. So basically the geojson_data should appear like it does now. However when geojson_airport checked it should have a marker of a plane from font awesome or awesome markers
Find code snippet below:
# GeoJson with all data
geojson_data = {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [row["Longitude"], row["Latitude"]]
}
for index, row in df.iterrows()
]
}
# GeoJson airport data
geojson_airport = {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [row['Longitude'], row['Latitude']]
},
}
for _, row in airports.iterrows()
]
}
# Create map
dl.Map(
center=[51.505, -0.09],
zoom=6,
children=[
dl.LayersControl(
[
# Default map
dl.BaseLayer(
dl.TileLayer(
url="https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png",
attribution="© <a href='https://www.openstreetmap.org/copyright'>OpenStreetMap</a> contributors",
opacity=0.6,
),
name="Default Map",
checked=True,
),
# Add overlay for airport
dl.Overlay(
dl.GeoJSON(
data=geojson_airport,
cluster=False),
name="Airports",
checked=False,
),
]
+ [
# GeoJSON data
dl.Overlay(
dl.GeoJSON(
data=geojson_data,
cluster=True,
),
name="Locations",
checked=True,
)
]
),
],
),
),