Skip to content

Commit 6c05b97

Browse files
authored
#98 Add map_id option for cloud based styling
2 parents aec208a + 14de51c commit 6c05b97

3 files changed

Lines changed: 7 additions & 1 deletion

File tree

src/components/StaticGoogleMap.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ class StaticGoogleMap extends Component {
4141
region: PropTypes.string,
4242
visible: PropTypes.string,
4343
style: PropTypes.string,
44+
mapId: PropTypes.string,
4445

4546
center: PropTypes.string,
4647
zoom: PropTypes.string,
@@ -119,6 +120,7 @@ class StaticGoogleMap extends Component {
119120
zoom,
120121
scale,
121122
style,
123+
mapId,
122124
center,
123125
format,
124126
client,

src/strategies/map.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ const MapStrategy = props => {
77
zoom,
88
scale,
99
style,
10+
mapId,
1011
center,
1112
format,
1213
client,
@@ -25,6 +26,7 @@ const MapStrategy = props => {
2526
urlParts.push(urlBuilder('zoom', zoom, '='));
2627
urlParts.push(urlBuilder('scale', scale, '='));
2728
urlParts.push(urlBuilder('style', style, '='));
29+
urlParts.push(urlBuilder('map_id', mapId, '='));
2830
urlParts.push(urlBuilder('center', center, '=')); // Todo: Allow Objects.
2931
urlParts.push(urlBuilder('format', format, '='));
3032
urlParts.push(urlBuilder('client', client, '='));

typings/index.d.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ declare namespace ReactStaticGoogleMap {
8686

8787
style?: string;
8888

89+
mapId?: string;
90+
8991
/**
9092
* Paths to show on the map
9193
*
@@ -146,7 +148,7 @@ declare namespace ReactStaticGoogleMap {
146148
* @memberof GoogleMapImageProps
147149
*/
148150
onCacheUpdate?: (cache: cacheType) => void;
149-
151+
150152
/**
151153
* The root url in which all params will be serialized and appended to.
152154
*

0 commit comments

Comments
 (0)