Skip to content

Commit

Permalink
Fix popup from atlas not working with shortnames
Browse files Browse the repository at this point in the history
Fix #3762
  • Loading branch information
nboisteault authored and github-actions[bot] committed Aug 21, 2023
1 parent a5e2e44 commit 038fa9d
Show file tree
Hide file tree
Showing 3 changed files with 848 additions and 1 deletion.
4 changes: 3 additions & 1 deletion assets/src/legacy/atlas.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
}
const layerConfig = getLayerConfig[1];
var featureType = getLayerConfig[0];
const wmsName = layerConfig?.shortname || featureType;

var atlasLayerOptions = lizAtlasLayers.layerOptions[layerId];

Expand All @@ -100,6 +101,7 @@
var lizAtlasConfig = {
'layername': featureType,
'layerId': layerConfig.id,
'wmsName': wmsName,
'displayLayerDescription': atlasLayerOptions['atlasDisplayLayerDescription'] == 'True' ? true : false,
'primaryKey': primaryKey,
'titleField': titleField,
Expand Down Expand Up @@ -520,7 +522,7 @@

// Display popup
if (lizAtlasConfig['atlasDisplayPopup']) {
lizMap.getFeaturePopupContent(lizAtlasConfig.featureType, feature, function (data) {
lizMap.getFeaturePopupContent(lizAtlasConfig.wmsName, feature, function (data) {
var popupContainerId = 'liz-atlas-item-detail';
// Add class to table
var popupReg = new RegExp('lizmapPopupTable', 'g');
Expand Down
Loading

0 comments on commit 038fa9d

Please sign in to comment.