mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
Fix non-native geometries not visible in map layout (#10308)
* Fix non-native geometries not showing up in map layout * Don't add bbox to edited and parsed geometries
This commit is contained in:
@@ -82,7 +82,6 @@ export function getParser(options: GeometryOptions): GeoJSONParser {
|
||||
const geomRaw = entry[options.geometryField];
|
||||
const geom = geomRaw && parse(geomRaw);
|
||||
if (!geom) return undefined;
|
||||
geom.bbox = getBBox(geom);
|
||||
return geom;
|
||||
};
|
||||
}
|
||||
@@ -99,7 +98,7 @@ export function toGeoJSON(entries: any[], options: GeometryOptions): FeatureColl
|
||||
for (let i = 0; i < entries.length; i++) {
|
||||
const geometry = parser(entries[i]);
|
||||
if (!geometry) continue;
|
||||
const [a, b, c, d] = geometry.bbox!;
|
||||
const [a, b, c, d] = getBBox(geometry);
|
||||
geojson.bbox = expandBBox(geojson.bbox!, [a, b]);
|
||||
geojson.bbox = expandBBox(geojson.bbox!, [c, d]);
|
||||
const properties = { ...entries[i] };
|
||||
|
||||
Reference in New Issue
Block a user