Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KML: only blue fill and stroke #124

Open
dl-tg opened this issue Oct 26, 2022 · 1 comment
Open

KML: only blue fill and stroke #124

dl-tg opened this issue Oct 26, 2022 · 1 comment

Comments

@dl-tg
Copy link

dl-tg commented Oct 26, 2022

Polygons/lines have only standard blue colors. Individually styling every polygon is hard and i'm 100% sure there's an easier way to this.

@queenvictoria
Copy link

Change the colour of the poly lines (not the icons):

        const myCustomColour = '#ff4f00'

        const customLayer = L.geoJson(null, {
          // http://leafletjs.com/reference.html#geojson-style
          style: function(feature) {
            return { color: myCustomColour };
          }
        });
        // this can be any kind of omnivore layer
        const runLayer = omnivore.kml(kml, null, customLayer)

        runLayer.addTo(w.map)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants