Skip to content

Commit

Permalink
Merge pull request #173 from OutSystems/ROU-4864
Browse files Browse the repository at this point in the history
ROU-4864: Offset and Localization is not being properly treated as an object
  • Loading branch information
bmarcelino-fe authored Apr 18, 2024
2 parents 1d4f0eb + 8519b46 commit 30f2bd3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/OSFramework/Maps/OSMap/AbstractMap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,13 @@ namespace OSFramework.Maps.OSMap {
public changeProperty(propertyName: string, propertyValue: unknown): void {
//Update Map's config when the property is available
if (this.config.hasOwnProperty(propertyName)) {
const propName = Maps.Enum.OS_Config_Map[propertyName];

// Check if the property value is offset or localization to parse the value
if (propName === Maps.Enum.OS_Config_Map.offset || propName === Maps.Enum.OS_Config_Map.localization) {
propertyValue = JSON.parse(propertyValue as string);
}

this.config[propertyName] = propertyValue;

if (Maps.Enum.OS_Config_Map.respectUserZoom === Maps.Enum.OS_Config_Map[propertyName]) {
Expand Down

0 comments on commit 30f2bd3

Please sign in to comment.