Closed richardbarad closed 4 years ago
@richardbarad Can you clarify what popup configuration through the layer panel
means? We noticed this pop-up behavior doesn't occur with Cameroon's secondary language
@csphang. We support adding a pop-up for a layer configured through the Layer Panel in a non webmap group and our Georgia application makes heavy use of this since it contains multiple groups with custom layers. The Cameroon layers seem to not be impacted because all the layers with pop-ups come from the webmap group instead of the layers in the configuration panel.
For example, the JSON below shows the configuration for our Protected Areas layer in the Georgia Atlas. When I click on a protected area I see the Georgian label text instead of the English text even through the language is set to English.
Let me know if you need additional information.
{
"order": 5,
"id": "PA",
"type": "dynamic",
"visible": true,
"url": "https://gis.mepa.gov.ge/server/rest/services/atlas/protected_areas/MapServer",
"layerIds": [
4
],
"label": {
"en": "Protected Areas",
"ka": "დაცული ტერიტორიები"
},
"filterField": {
"en": "Category_EN",
"ka": "Category_KA"
},
"filterLabel": {
"en": "Filter by Category",
"ka": "ფილტრი კატეგორიების მიხედვით"
},
"popup": {
"title": {
**"en": "Protected Areas",
"ka": "კატეგორიები"**
},
"content": {
"ka": [
{
"label": "დაცული ტერიტორია",
"fieldExpression": "Protected_Areas_KA"
},
{
"label": "დაარსების წელი",
"fieldExpression": "Year_of_Establishment_KA"
},
{
"label": "ადმინისტრაცია",
"fieldExpression": "Administration_KA"
},
{
"label": "კატეგორია",
"fieldExpression": "Category_KA"
},
{
"label": "ფართობი ჰა",
"fieldExpression": "PA_Area_ha_KA"
}
],
"en": [
{
"label": "Protected Area Name",
"fieldExpression": "Protected_Areas_EN"
},
{
"label": "Year of Establishment",
"fieldExpression": "Year_of_Establishment_KA"
},
{
"label": "Administration",
"fieldExpression": "Administration_EN"
},
{
"label": "Category",
"fieldExpression": "Category_EN"
},
{
"label": "Area (ha)",
"fieldExpression": "PA_Area_ha_KA"
}
]
}
}
}
@csphang Can we talk about features in InfoWindow getting cleared out on language-toggle
?
@SwampGuzzler we can proceed with closing the infowindow when a user switches languages
@csphang Check this out here: http://alpha.blueraster.io/gfw-mapbuilder/660-language-toggle-update/
@richardbarad I reviewed the updated build and believe it's ready for your review. This url encompasses updates to the attribute info window in regards to language toggling: http://alpha.blueraster.io/gfw-mapbuilder/660-language-toggle-update/
@csphang. It looks like the update is not working for point layers. It works for polygon and line.
To see this:
1) Set the language to English 2) Clear all layers 3) Turn on the following two layers:
a) Protected Areas - Infrastructure of Protected Areas b) Biodiversity - EUNIS Habitats (first layer in Biodiversity group)
4) Click on a point. The text for the layer name will be in Georgian instead of English as shown in the screenshoot below.
Interestingly, it is working correctly for Fires though in which the pop-up is also configured through the configuration.
Hi @richardbarad - We discovered this issue was occurring with layers containing a layerId of 0. We've updated the code and this is ready for your testing. You can use the same URL as before! http://alpha.blueraster.io/gfw-mapbuilder/660-language-toggle-update/
@csphang. Looks good!
Describe the bug
If a pop-up is configured for a layer through layer panel, clicking on shape returns the layer name in wrong language when app is in secondary language.
To Reproduce Steps to reproduce the behavior:
Go to http://blueraster.teaches-yoga.com/GEO?l=en (make sure app is in English)
Click on a shape from the protected area layer (i.e: the polygon shown in the screenshot below)
Expected behavior
The layer name in the layer drop-down should show in English since the application language is currently set to English. Currently, it shows the name of the layer in Georgian as shown in the screenshot below.
Screenshots
Desktop (please complete the following information):