title: How to not display Leaflet PolyLine Decorator(using marker) on map but layer instead
body: <p>I am working on application uses the leaflet api <a href="http://smartminds.cloudapp.net/betaSecurity/" rel="nofollow noreferrer">Live Here</a></p>
  
  <p>User must enter "1" in alert input field to use the application.</p>
  
  <p><strong>Introduction</strong></p>
  
  <p>Application has some controls to draw different shapes on image.
  I am going to discuss one control, which suppose to draw line.</p>
  
  <p>The line actually (polyline) uses leaflet polyline decorator library to decorate the line with some css, nut here i use the marker to display on polyline.</p>
  
  <p>I am using multiple images using different featureGroups.</p>
  
  <p><strong>Problem</strong></p>
  
  <p>The line decorator works great, but it shows a strange behaviour as it also draw thos polyline decorator markers on map or map container.
  <a href="https://i.stack.imgur.com/263N4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/263N4.png" alt="On Top : ImageOverlay, Bottom : map container"></a></p>
  
  <p>The problem is actually when i draw on image except these polyline decorator marker everything works as desired.</p>
  
  <p><strong>Script</strong></p>
  
  <pre><code>    var polylinefence4 = new L.Polyline([], { color: 'red' });
      L.easyButton('&lt;img src="/assets/img/fence4.png"&gt;', function () {
      }).addTo(map);
      function fencePlace4(e) {
      // Add coordinate to the polyline
       new L.Marker(e.latlng, { icon: fence4Icon, draggable: false }).addTo(currentFeatureGroup);
                          polylinefence4.addLatLng(e.latlng).addTo(currentFeatureGroup);
  var decorator = L.polylineDecorator(polylinefence4, {
  patterns: [{ offset: 0, repeat: '10px', symbol: new L.Symbol.marker() }]}).addTo(currentFeatureGroup);
                      }
  </code></pre>
  
  <p>I don't know why this is happening, i can't entirely understand the polyline decorator so a bit confusion here.
  If someone has knowledge about that problem please do help. Thanks in advance</p>