Leaflet: Polyline above Marker - Javascript Leaflet

Javascript examples for Leaflet:Marker

Description

Leaflet: Polyline above Marker

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <link rel="stylesheet" type="text/css" href="http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.css"> 
      <script type="text/javascript" src="http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.js"></script> 
      <style id="compiled-css" type="text/css">

#map {//from   w  w w  .j a v a2 s .c  o m
   height: 500px;
}
.leaflet-overlay-pane { z-index: 5; }
.leaflet-shadow-pane  { z-index: 4; }


      </style> 
      <script type="text/javascript">
    window.onload=function(){
var map = L.map("map").fitBounds([[50.5, 5], [52.5, 6]]);
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
    attribution: '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
}).addTo(map);
var marker = L.marker([51.441767, 5.470247],{
    icon: L.icon({
        iconUrl: 'http://cdn.leafletjs.com/leaflet/v0.7.7/images/marker-shadow.png',
      shadowUrl: 'http://cdn.leafletjs.com/leaflet/v0.7.7/images/marker-icon.png'
   })
}).addTo(map);
L.circle([51.441767, 5.470247], 100000, {
   fillOpacity: 0.7,
    fillColor: 'red'
}).addTo(map);
    }

      </script> 
   </head> 
   <body> 
      <div id="map"></div>  
   </body>
</html>

Related Tutorials