Skip to content

Commit

Permalink
Website updates
Browse files Browse the repository at this point in the history
  • Loading branch information
ahocevar committed Nov 27, 2023
1 parent a91d519 commit d386386
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion dist/en/main/examples/common.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/en/main/examples/common.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/en/main/ol/dist/ol.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/en/main/ol/dist/ol.js.map

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions dist/en/main/ol/format/GeoJSON.js
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ function readLineStringGeometry(object) {
type: 'LineString',
flatCoordinates,
ends: [flatCoordinates.length],
layout: getLayoutForStride(coordinates[0].length),
layout: getLayoutForStride(coordinates[0]?.length || 2),
};
}

Expand All @@ -415,7 +415,7 @@ function readLineStringGeometry(object) {
*/
function readMultiLineStringGeometry(object) {
const coordinates = object['coordinates'];
const stride = coordinates[0][0].length;
const stride = coordinates[0]?.[0]?.length || 2;
const flatCoordinates = [];
const ends = deflateCoordinatesArray(flatCoordinates, 0, coordinates, stride);
return {
Expand All @@ -435,7 +435,7 @@ function readMultiPointGeometry(object) {
return {
type: 'MultiPoint',
flatCoordinates: coordinates.flat(),
layout: getLayoutForStride(coordinates[0].length),
layout: getLayoutForStride(coordinates[0]?.length || 2),
};
}

Expand All @@ -446,7 +446,7 @@ function readMultiPointGeometry(object) {
function readMultiPolygonGeometry(object) {
const coordinates = object['coordinates'];
const flatCoordinates = [];
const stride = coordinates[0][0][0].length;
const stride = coordinates[0]?.[0]?.[0].length || 2;
const endss = deflateMultiCoordinatesArray(
flatCoordinates,
0,
Expand All @@ -468,7 +468,7 @@ function readMultiPolygonGeometry(object) {
function readPolygonGeometry(object) {
const coordinates = object['coordinates'];
const flatCoordinates = [];
const stride = coordinates[0][0].length;
const stride = coordinates[0]?.[0]?.length;
const ends = deflateCoordinatesArray(flatCoordinates, 0, coordinates, stride);
return {
type: 'Polygon',
Expand Down

0 comments on commit d386386

Please sign in to comment.