Skip to content

Commit

Permalink
PB-790: Fix failed to print on empty string text drawing.
Browse files Browse the repository at this point in the history
  • Loading branch information
ismailsunni committed Jul 24, 2024
1 parent 1428f4f commit 9939f0a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/api/print.api.js
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,15 @@ async function transformOlMapToPrintParams(olMap, config) {
dpi: dpi,
customizer: customizer,
})
// Note (IS): This is a dirty fix to handle empty text annotation. See PB-790
// It should be removed once the issue is fixed in the mapfishprint library
encodedMap.layers.forEach((layer) => {
layer.geoJson?.features?.forEach((feature) => {
// Delete the editableFeature property because it will cause an error in the mapfishprint
// Should be handled inside GeoAdminCustomizer.feature but it skip the feature with empty text
delete feature.properties?.editableFeature
})
})
if (printGrid) {
encodedMap.layers.unshift({
baseURL: WMS_BASE_URL,
Expand Down

0 comments on commit 9939f0a

Please sign in to comment.