Skip to content

Commit d3a160c

Browse files
authored
[WC-3158] Maps: mitigate not rendering (#1950)
2 parents 5f4ffff + 3032712 commit d3a160c

File tree

7 files changed

+15
-12
lines changed

7 files changed

+15
-12
lines changed

packages/pluggableWidgets/maps-web/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
88

99
### Fixed
1010

11+
- We mitigated the issue with Maps widgets not rendering in some cases.
12+
1113
- We fixed an issue where GoogleMap and LeafletMap uses array index for the list item which causes issues when filtering large amounts of locations. Thanks to @jeroen-huizer-conclusion for the contribution.
1214

1315
- We fixed an issue where where browser console throw warning of unknown listener when the location has title in LeafletMap. Thanks to @jeroen-huizer-conclusion for the contribution.
-3.39 KB
Loading
1.28 KB
Loading

packages/pluggableWidgets/maps-web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@mendix/maps-web",
33
"widgetName": "Maps",
4-
"version": "4.0.1",
4+
"version": "4.1.0",
55
"description": "Show locations on Maps",
66
"copyright": "© Mendix Technology BV 2025. All rights reserved.",
77
"license": "Apache-2.0",

packages/pluggableWidgets/maps-web/src/components/LeafletMap.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ export function LeafletMap(props: LeafletProps): ReactElement {
8484
scrollWheelZoom={scrollWheelZoom}
8585
zoom={autoZoom ? translateZoom("city") : zoom}
8686
zoomControl={zoomControl}
87+
style={{ top: 0, bottom: 0, left: 0, right: 0, position: "absolute", zIndex: 1 }}
8788
>
8889
<TileLayer {...baseMapLayer(mapProvider, mapsToken)} />
8990
{locations
@@ -101,7 +102,7 @@ export function LeafletMap(props: LeafletProps): ReactElement {
101102
}
102103
interactive={!!marker.title || !!marker.onClick}
103104
key={`marker_${marker.id ?? marker.latitude + "_" + marker.longitude}`}
104-
eventHandlers={marker.title ? undefined : { click: marker.onClick }}
105+
eventHandlers={!marker.title && marker.onClick ? { click: marker.onClick } : undefined}
105106
position={{ lat: marker.latitude, lng: marker.longitude }}
106107
title={marker.title}
107108
>

packages/pluggableWidgets/maps-web/src/components/__tests__/__snapshots__/LeafletMap.spec.tsx.snap

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ exports[`Leaflet maps renders a map with HERE maps as provider 1`] = `
1111
>
1212
<div
1313
class="widget-leaflet-maps leaflet-container leaflet-touch leaflet-grab leaflet-touch-drag leaflet-touch-zoom"
14-
style="position: relative;"
14+
style="top: 0px; bottom: 0px; left: 0px; right: 0px; position: absolute; z-index: 1;"
1515
tabindex="0"
1616
>
1717
<div
@@ -120,7 +120,7 @@ exports[`Leaflet maps renders a map with MapBox maps as provider 1`] = `
120120
>
121121
<div
122122
class="widget-leaflet-maps leaflet-container leaflet-touch leaflet-grab leaflet-touch-drag leaflet-touch-zoom"
123-
style="position: relative;"
123+
style="top: 0px; bottom: 0px; left: 0px; right: 0px; position: absolute; z-index: 1;"
124124
tabindex="0"
125125
>
126126
<div
@@ -229,7 +229,7 @@ exports[`Leaflet maps renders a map with attribution 1`] = `
229229
>
230230
<div
231231
class="widget-leaflet-maps leaflet-container leaflet-touch leaflet-grab leaflet-touch-drag leaflet-touch-zoom"
232-
style="position: relative;"
232+
style="top: 0px; bottom: 0px; left: 0px; right: 0px; position: absolute; z-index: 1;"
233233
tabindex="0"
234234
>
235235
<div
@@ -362,7 +362,7 @@ exports[`Leaflet maps renders a map with current location 1`] = `
362362
>
363363
<div
364364
class="widget-leaflet-maps leaflet-container leaflet-touch leaflet-grab leaflet-touch-drag leaflet-touch-zoom"
365-
style="position: relative;"
365+
style="top: 0px; bottom: 0px; left: 0px; right: 0px; position: absolute; z-index: 1;"
366366
tabindex="0"
367367
>
368368
<div
@@ -484,7 +484,7 @@ exports[`Leaflet maps renders a map with markers 1`] = `
484484
>
485485
<div
486486
class="widget-leaflet-maps leaflet-container leaflet-touch leaflet-grab leaflet-touch-drag leaflet-touch-zoom"
487-
style="position: relative;"
487+
style="top: 0px; bottom: 0px; left: 0px; right: 0px; position: absolute; z-index: 1;"
488488
tabindex="0"
489489
>
490490
<div
@@ -620,7 +620,7 @@ exports[`Leaflet maps renders a map with percentage of parent units renders the
620620
>
621621
<div
622622
class="widget-leaflet-maps leaflet-container leaflet-touch leaflet-grab leaflet-touch-drag leaflet-touch-zoom"
623-
style="position: relative;"
623+
style="top: 0px; bottom: 0px; left: 0px; right: 0px; position: absolute; z-index: 1;"
624624
tabindex="0"
625625
>
626626
<div
@@ -729,7 +729,7 @@ exports[`Leaflet maps renders a map with percentage of width and height units re
729729
>
730730
<div
731731
class="widget-leaflet-maps leaflet-container leaflet-touch leaflet-grab leaflet-touch-drag leaflet-touch-zoom"
732-
style="position: relative;"
732+
style="top: 0px; bottom: 0px; left: 0px; right: 0px; position: absolute; z-index: 1;"
733733
tabindex="0"
734734
>
735735
<div
@@ -838,7 +838,7 @@ exports[`Leaflet maps renders a map with pixels renders structure correctly 1`]
838838
>
839839
<div
840840
class="widget-leaflet-maps leaflet-container leaflet-touch leaflet-grab leaflet-touch-drag leaflet-touch-zoom"
841-
style="position: relative;"
841+
style="top: 0px; bottom: 0px; left: 0px; right: 0px; position: absolute; z-index: 1;"
842842
tabindex="0"
843843
>
844844
<div
@@ -947,7 +947,7 @@ exports[`Leaflet maps renders a map with right structure 1`] = `
947947
>
948948
<div
949949
class="widget-leaflet-maps leaflet-container leaflet-touch leaflet-grab leaflet-touch-drag leaflet-touch-zoom"
950-
style="position: relative;"
950+
style="top: 0px; bottom: 0px; left: 0px; right: 0px; position: absolute; z-index: 1;"
951951
tabindex="0"
952952
>
953953
<div

packages/pluggableWidgets/maps-web/src/package.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8" ?>
22
<package xmlns="http://www.mendix.com/package/1.0/">
3-
<clientModule name="Maps" version="4.0.1" xmlns="http://www.mendix.com/clientModule/1.0/">
3+
<clientModule name="Maps" version="4.1.0" xmlns="http://www.mendix.com/clientModule/1.0/">
44
<widgetFiles>
55
<widgetFile path="Maps.xml" />
66
</widgetFiles>

0 commit comments

Comments
 (0)