I am using leaflet, mapbox, and omnivore to build a map. I have a set of markers in a .kml file, which I'm able to load into leaflet using omnivore.
leafletData.getMap('map').then(function(map) {
var pointLayer = omnivore.kml('/kml/points-of-interest-places-to-eat-kml.kml').addTo(map)
.on('error', function(error) {
console.log(error);
})
}
)
Each of these markers should have a style and icon associated with them in the .kml file:
<Style id="buildingLabel">
<IconStyle>
<Icon>
<href>/icons/building-label.png</href>
</Icon>
</IconStyle>
</Style>
<Placemark>
<name>Building</name>
<description>Building description</description>
<styleUrl>#buildingLabel</styleUrl>
<Point>
<coordinates>-78.893733888,43.944767691,0.0</coordinates>
</Point>
</Placemark>
The .kml file loads the markers fine, but they show up as generic markers and don't use the icon descibed in the .kml file (using the same file in Google maps they display fine).
How would I go about getting omnivore/leaflet to use these icons?
Thanks!