Canvas overlay implementation. Added more shapes to vector.html test.
This commit is contained in:
parent
c1c79df31f
commit
86414aeef0
@ -51,6 +51,7 @@
|
|||||||
|
|
||||||
'layer/vector/Path.js',
|
'layer/vector/Path.js',
|
||||||
'layer/vector/Path.VML.js',
|
'layer/vector/Path.VML.js',
|
||||||
|
'layer/vector/Path.Canvas.js',
|
||||||
'layer/vector/Path.Popup.js',
|
'layer/vector/Path.Popup.js',
|
||||||
'layer/vector/Polyline.js',
|
'layer/vector/Polyline.js',
|
||||||
'layer/vector/Polygon.js',
|
'layer/vector/Polygon.js',
|
||||||
@ -97,4 +98,4 @@
|
|||||||
for (var i = 0; i < scripts.length; i++) {
|
for (var i = 0; i < scripts.length; i++) {
|
||||||
document.writeln("<script type='text/javascript' src='" + path + "../src/" + scripts[i] + "'></script>");
|
document.writeln("<script type='text/javascript' src='" + path + "../src/" + scripts[i] + "'></script>");
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
|
@ -30,9 +30,29 @@
|
|||||||
map.addLayer(new L.Marker(latlngs[0]));
|
map.addLayer(new L.Marker(latlngs[0]));
|
||||||
map.addLayer(new L.Marker(latlngs[len - 1]));
|
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);
|
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");
|
path.bindPopup("Hello world");
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
Reference in New Issue
Block a user