Skip to content

Commit

Permalink
Merge pull request #3852 from 3liz/backport-3850-to-release_3_6
Browse files Browse the repository at this point in the history
[Backport release_3_6] Fix popup from atlas not working with shortnames
  • Loading branch information
nboisteault authored Aug 21, 2023
2 parents a5e2e44 + 038fa9d commit ab82b63
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 ab82b63

Please sign in to comment.