You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ol/Layer/Vector features of GeometryType Multi* are not rendered in Legends. However, a simple addition of the 3 missing types in Legend.js seems to solve the problem:
switch (typeGeom) {
case ol_geom_Point:
case 'Point':
case 'MultiPoint': // ADDED
vectorContext.drawGeometry(new ol_geom_Point([cx, cy]));
break;
case ol_geom_LineString:
case 'LineString':
case 'MultiLineString': // ADDED
ctx.save();
ctx.rect(legend.get('margin') * ratio, 0, size[0] * ratio, canvas.height);
ctx.clip();
vectorContext.drawGeometry(new ol_geom_LineString([[cx-sx, cy], [cx+sx, cy]]));
ctx.restore();
break;
case ol_geom_Polygon:
case 'Polygon':
case 'MultiPolygon': // ADDED
vectorContext.drawGeometry(new ol_geom_Polygon([[[cx-sx, cy-sy], [cx+sx, cy-sy], [cx+sx, cy+sy], [cx-sx, cy+sy], [cx-sx, cy-sy]]]));
break;
}
(Alternatively any "Multi" prefix can be stripped from a GeometryType at an earlier point).
The text was updated successfully, but these errors were encountered:
ol/Layer/Vector features of GeometryType Multi* are not rendered in Legends. However, a simple addition of the 3 missing types in Legend.js seems to solve the problem:
(Alternatively any "Multi" prefix can be stripped from a GeometryType at an earlier point).
The text was updated successfully, but these errors were encountered: