@longline/aqua-ui 1.0.71 → 1.0.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -63,7 +63,7 @@ interface IProps {
|
|
|
63
63
|
maxZoom?: number;
|
|
64
64
|
}
|
|
65
65
|
/**
|
|
66
|
-
* A `ClusterLayer` manages its own `Source`. It does not
|
|
66
|
+
* A `ClusterLayer` manages its own `Source`. It does not take GeoJSON, but a list of objects which must at least have
|
|
67
67
|
* `latitude` and `longitude` keys. Other object keys may be used for the aggregate values of clusters; if no field is
|
|
68
68
|
* supplied, then the cluster will display the number of features inside them (the `point_count`).
|
|
69
69
|
*
|
|
@@ -83,7 +83,7 @@ var ClusterLayerBase = function (_a) {
|
|
|
83
83
|
})));
|
|
84
84
|
};
|
|
85
85
|
/**
|
|
86
|
-
* A `ClusterLayer` manages its own `Source`. It does not
|
|
86
|
+
* A `ClusterLayer` manages its own `Source`. It does not take GeoJSON, but a list of objects which must at least have
|
|
87
87
|
* `latitude` and `longitude` keys. Other object keys may be used for the aggregate values of clusters; if no field is
|
|
88
88
|
* supplied, then the cluster will display the number of features inside them (the `point_count`).
|
|
89
89
|
*
|
|
@@ -14,7 +14,7 @@ interface IProps {
|
|
|
14
14
|
* Every feature must have a unique ID in its properties. This is used to
|
|
15
15
|
* tell features apart. If the `source` should ever change, then it is
|
|
16
16
|
* important that new items have new IDs, so that old markers get removed
|
|
17
|
-
* correctly.
|
|
17
|
+
* correctly. Features that do not have an ID field are not displayed.
|
|
18
18
|
*/
|
|
19
19
|
idField: string;
|
|
20
20
|
/**
|
|
@@ -138,8 +138,10 @@ var HtmlMarkerLayerBase = function (props) {
|
|
|
138
138
|
var feature = features_1[_i];
|
|
139
139
|
var coords = feature.geometry.coordinates;
|
|
140
140
|
var fprops = feature.properties;
|
|
141
|
-
// if (!props.cluster) continue;
|
|
142
141
|
var id = fprops[props.idField];
|
|
142
|
+
// Do not render makers without an ID field:
|
|
143
|
+
if (!id)
|
|
144
|
+
continue;
|
|
143
145
|
// Is there a marker for this feature?
|
|
144
146
|
var marker = markers.current[id];
|
|
145
147
|
// If not, create one:
|