TransWikia.com

Create a start and endpoint on a highlighted feature

Geographic Information Systems Asked by KLee on February 4, 2021

I have a highlighted line feature as shown:

function highlightFeature(e) {
    var layer = e.target;

        layer

        layer.setStyle({
        weight: 10,
        opacity: .4,
        color: '#FF0099',
        dashArray: '',
        fillOpacity: 0.7
    
    });

    if (!L.Browser.ie && !L.Browser.opera && !L.Browser.edge && !L.Browser.mobile-web-app-capable) {
    layer.bringToFront();
    }
    }

        function resetHighlight(e) {
        geojson.resetStyle(e.target);


            layer.setStyle({
            weight: 5,
            color: '#0000ff',
            dashArray: '',
            fillOpacity: 0.7

        });
        }

I would like to add a start and endpoint marker on my line. I would like each marker to be different (starter point green, endpoint red). I have 40 lines (trails) to add this to.

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP