From a07401940c6ed2e9575a49f16585f9367720ca02 Mon Sep 17 00:00:00 2001 From: Patricio Emiliano Sartore Date: Tue, 26 Nov 2024 10:47:17 +0100 Subject: [PATCH] feat(components/map/google): Add support to inject mapId prop to google map component --- components/map/google/src/index.js | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/components/map/google/src/index.js b/components/map/google/src/index.js index e8ceb61c1..c10f49b2a 100644 --- a/components/map/google/src/index.js +++ b/components/map/google/src/index.js @@ -30,24 +30,26 @@ function MapGoogle({ center = DEFAULT_CENTER, children, errorNode, - isInteractive: isInteractiveProp, height, - width, + isInteractive: isInteractiveProp, language = DEFAULT_LANGUAGE, loaderNode, - staticImageNode, - zoom = DEFAULT_ZOOM, + mapIds, onError, onLoad, onUnmount, signedUrl, + staticImageNode, + width, + zoom = DEFAULT_ZOOM, ...others }) { const [isInteractive, setIsInteractive] = useControlledState(isInteractiveProp) const {isLoaded, loadError} = useLoadScript({ googleMapsApiKey: apiKey, - language + language, + mapIds }) const handleOnLoad = useCallback( @@ -107,16 +109,17 @@ MapGoogle.propTypes = { children: PropTypes.node, errorNode: PropTypes.node, height: PropTypes.number, - width: PropTypes.number, isInteractive: PropTypes.bool, language: PropTypes.string, loaderNode: PropTypes.node, + mapIds: PropTypes.array, onError: PropTypes.func, onLoad: PropTypes.func, onUnmount: PropTypes.func, + signedUrl: PropTypes.string, staticImageNode: PropTypes.node, - zoom: PropTypes.number, - signedUrl: PropTypes.string + width: PropTypes.number, + zoom: PropTypes.number } export default MapGoogle