Canvas overlay implementation. Added more shapes to vector.html test.

This commit is contained in:
florian 2011-06-20 10:15:53 +02:00
parent c1c79df31f
commit 86414aeef0
2 changed files with 23 additions and 2 deletions

View File

@ -51,6 +51,7 @@
'layer/vector/Path.js',
'layer/vector/Path.VML.js',
'layer/vector/Path.Canvas.js',
'layer/vector/Path.Popup.js',
'layer/vector/Polyline.js',
'layer/vector/Polygon.js',

View File

@ -30,8 +30,28 @@
map.addLayer(new L.Marker(latlngs[0]));
map.addLayer(new L.Marker(latlngs[len - 1]));
var circleLocation = new L.LatLng(51.508, -0.11),
circleOptions = {
color: 'red',
fillColor: '#f03',
fillOpacity: 0.5
};
var circle = new L.Circle(circleLocation, 500000, circleOptions);
map.addLayer(circle);
map.addLayer(path);
var p1 = latlngs[0],
p2 = latlngs[parseInt(len/2)],
p3 = latlngs[len - 1],
polygonPoints = [p1, p2, p3];
var polygon = new L.Polygon(polygonPoints, {
fillColor: "#333"
});
map.addLayer(polygon);
path.bindPopup("Hello world");
</script>
</body>