Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport release_3_6] Fix popup from atlas not working with shortnames #3852

Merged
merged 1 commit into from
Aug 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading