Skip to content

Commit

Permalink
Fix heatmapLibrary
Browse files Browse the repository at this point in the history
  • Loading branch information
itsmichaeldiego committed Aug 31, 2020
1 parent 2d55ced commit 8e67c08
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
@@ -1,7 +1,7 @@
## [2.1.0] - 2020-08-31

- #921 Add support to libraries: places, visualization, places, and geomerty.
And keeps support for previous heatMapLibrary prop to avoid breaking older usage.
And keeps support for previous heatmapLibrary prop to avoid breaking older usage.

## [2.0.4] - 2020-07-30

Expand Down
12 changes: 7 additions & 5 deletions src/loaders/google_map_loader.js
Expand Up @@ -58,13 +58,13 @@ export default (bootstrapURLKeys, heatmapLibrary) => {
}
}

// Support for older version using heatMapLibrary option
if (heatMapLibrary) {
// Support for older version using heatmapLibrary option
if (heatmapLibrary) {
bootstrapURLKeys.libraries
? bootstrapURLKeys.libraries.append('visualization')
: (bootstrapURLKeys['libraries'] = ['visualization']);
: (bootstrapURLKeys.libraries = ['visualization']);
console.warn(
"heatMapLibrary will be deprecated in the future. Please use bootstrapURLKeys.libraries property instead (libraries=['visualization'])."
"heatmapLibrary will be deprecated in the future. Please use bootstrapURLKeys.libraries property instead (libraries=['visualization'])."
);
}

Expand All @@ -82,7 +82,9 @@ export default (bootstrapURLKeys, heatmapLibrary) => {
(r, key) => `${r}&${key}=${bootstrapURLKeys[key]}`,
''
);


const { libraries } = bootstrapURLKeys;

$script_(
`${DEFAULT_URL}${API_PATH}${params}${libraries}`,
() =>
Expand Down

0 comments on commit 8e67c08

Please sign in to comment.