Skip to content

Commit ad4ada0

Browse files
committed
various fixes
1 parent f29f4c8 commit ad4ada0

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

web/client/components/map/openlayers/VectorStyle.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
var markerIcon = require('./img/marker-icon.png');
22
var markerShadow = require('./img/marker-shadow.png');
33
var ol = require('openlayers');
4-
const {last, head} = require('lodash');
4+
const {last, head, isArray} = require('lodash');
55
const blue = [0, 153, 255, 1];
66
const assign = require('object-assign');
77
const {trim, isString} = require('lodash');
@@ -480,8 +480,13 @@ function getStyle(options, isDrawing = false, textValues = []) {
480480
}));
481481
}
482482
let gStyle = getValidStyle(type, options, isDrawing, textValues);
483+
if (isArray(gStyle)) {
484+
gStyle.forEach(s => {s.setGeometry(c); });
485+
return p.concat(gStyle);
486+
}
483487
gStyle.setGeometry(c);
484488
return p.concat([gStyle]);
489+
485490
}, []);
486491
return styles;
487492
}

web/client/components/mapcontrols/annotations/Annotations.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ class Annotations extends React.Component {
171171
}
172172
if (featureType === "GeometryCollection" || featureType === "FeatureCollection") {
173173
return (<span className={"mapstore-annotations-panel-card"}>
174-
{(!!(geometry.geometries || geometry.features).filter(f => f.type !== "MultiPoint").length || (properties.textValues && properties.textValues.length)) && (<MultiGeomThumb styleMultiGeom={style} geometry={geometry} properties={properties}/>)}
174+
{(!!(geometry.geometries || geometry.features || []).filter(f => f.type !== "MultiPoint").length || (properties.textValues && properties.textValues.length)) && (<MultiGeomThumb styleMultiGeom={style} geometry={geometry} properties={properties}/>)}
175175
{markerStyle ? (<span className={"mapstore-annotations-panel-card"}>
176176
<div className={"mapstore-annotations-panel-card-thumbnail-" + marker.name} style={{...marker.thumbnailStyle, margin: 'auto', textAlign: 'center', color: '#ffffff', marginLeft: 7}}>
177177
<span className={"mapstore-annotations-panel-card-thumbnail " + this.getConfig().getGlyphClassName(markerStyle)} style={{marginTop: 0, marginLeft: -7}}/>

0 commit comments

Comments
 (0)