Make 2D outlines support Y coordinates other than y=64

This commit is contained in:
Mike Primm 2011-12-30 23:38:19 +08:00 committed by mikeprimm
parent a743524318
commit 3c1c8ec8dc

View File

@ -189,10 +189,10 @@ componentconstructors['markers'] = function(dynmap, configuration) {
function create2DBoxLayer(maxx, minx, maxy, miny, maxz, minz, style) { function create2DBoxLayer(maxx, minx, maxy, miny, maxz, minz, style) {
return new L.Polygon([ return new L.Polygon([
latlng(minx,64,minz), latlng(minx,miny,minz),
latlng(maxx,64,minz), latlng(maxx,miny,minz),
latlng(maxx,64,maxz), latlng(maxx,miny,maxz),
latlng(minx,64,maxz) latlng(minx,miny,maxz)
], style); ], style);
} }
@ -223,7 +223,7 @@ componentconstructors['markers'] = function(dynmap, configuration) {
var llist = []; var llist = [];
var i; var i;
for(i = 0; i < xarray.length; i++) { for(i = 0; i < xarray.length; i++) {
llist[i] = latlng(xarray[i], 64, zarray[i]); llist[i] = latlng(xarray[i], miny, zarray[i]);
} }
return new L.Polygon(llist, style); return new L.Polygon(llist, style);
} }