How to set dashed line on Leaflet?

Line style in leaflet always are solid ,I want the line to be -1)Dashed line style -2)Train line style

  var L2 = new L.geoJson(L2, {   style: function(feature) {     return {       color: 'black',       weight: 7     };   },   onEachFeature: function(feature, layer) {     layer.on({       'mousemove': function(e) {{           weight: 7,           color: 'red'         });        },       'mouseout': function(e) {         L2.resetStyle(;       },       'click': function(e) {         mymap.fitBounds(;         L2.bindPopup("<b>" +;       }     });   } }).addTo(mymap); 

Here is my code result


Category: leaflet Time: 2016-07-29 Views: 4

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development


Front-end development


development tools

Open Platform

Javascript development

.NET development

cloud computing


Copyright (C), All Rights Reserved.

processed in 0.160 (s). 12 q(s)