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) {         e.target.setStyle({           weight: 7,           color: 'red'         });        },       'mouseout': function(e) {         L2.resetStyle(e.target);       },       'click': function(e) {         mymap.fitBounds(e.target.getBounds());         L2.bindPopup("<b>" + feature.properties.Nom);       }     });   } }).addTo(mymap); 

Here is my code result

Replay

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

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development

search

Front-end development

Database

development tools

Open Platform

Javascript development

.NET development

cloud computing

server

Copyright (C) avrocks.com, All Rights Reserved.

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