check-in bower_components
This commit is contained in:
parent
4cc16bccd0
commit
9e08e74132
101 changed files with 90960 additions and 0 deletions
39
bower_components/leaflet-plugins/examples/marker-canvas.html
vendored
Normal file
39
bower_components/leaflet-plugins/examples/marker-canvas.html
vendored
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>Leaflet</title>
|
||||
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7/leaflet.css" />
|
||||
<script src="http://cdn.leafletjs.com/leaflet-0.7/leaflet.js"></script>
|
||||
<script src="../layer/Icon.Canvas.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div style="width:100%; height:100%" id="map"></div>
|
||||
<script type='text/javascript'>
|
||||
|
||||
var map = new L.Map('map', {center: new L.LatLng(67.66904, 33.68595), zoom: 10});
|
||||
map.addLayer(new L.TileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'));
|
||||
|
||||
var circle = new L.Icon.Canvas({iconSize: new L.Point(30, 30)});
|
||||
circle.draw = function(ctx, w, h) {
|
||||
ctx.translate(w/2, h/2);
|
||||
|
||||
ctx.beginPath();
|
||||
ctx.fillStyle = "#F00";
|
||||
ctx.arc(0, 0, w/2-1, 0, Math.PI*2, true);
|
||||
ctx.fill();
|
||||
|
||||
ctx.lineWidth = 2;
|
||||
ctx.strokeStyle = '#FFF';
|
||||
ctx.moveTo(-w/5, -h/5);
|
||||
ctx.lineTo(w/5, h/5);
|
||||
ctx.moveTo(-w/5, h/5);
|
||||
ctx.lineTo(w/5, -h/5);
|
||||
ctx.stroke();
|
||||
ctx.closePath();
|
||||
}
|
||||
|
||||
map.addLayer(new L.Marker(map.getCenter(), {icon: circle, draggable: true, opacity: 0.7}));
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue