Leaflet - Layer Name
Fiddle explains the leaflet layers.
HTML
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.0.0/leaflet.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.0.0/leaflet.css">
<script src="https://cdn.rawgit.com/kekscom/L.Line3/master/dist/L.Line3.js"></script>
<div id="map"></div>
CSS
#map {
height: 400px;
}
JavaScript
var map = new L.Map('map').setView([52.52020, 13.37570], 16);
new L.TileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
{ attribution: 'Map tiles © <a href="http://mapbox.com">MapBox</a>', name: 'El Nombre', maxZoom: 17 }).addTo(map);
var geoJSON = {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"color": "rgb(255,0,0)"
},
"geometry": {
"type": "LineString",
"coordinates": [
[13.37356, 52.52064, 5000],
[13.37350, 52.51971, 40]
]
}
}
]
};
new L.Line3(geoJSON).addTo(map);