Skip to content

Commit 43c54b3

Browse files
authored
🤖 Merge PR DefinitelyTyped#73728 [leaflet.gridlayer.googlemutant] Add mapId parameter to GoogleMutantOptions. by @elsbree
1 parent 7f5903e commit 43c54b3

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

‎types/leaflet.gridlayer.googlemutant/index.d.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ declare module "leaflet" {
8787
* Google's map styles.
8888
*/
8989
styles?: GoogleMutantStyle[] | undefined;
90+
91+
mapId?: string | undefined;
9092
}
9193

9294
function googleMutant(options?: GoogleMutantOptions): GoogleMutant;

‎types/leaflet.gridlayer.googlemutant/leaflet.gridlayer.googlemutant-tests.ts‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,10 @@ const styled = L.gridLayer
2222
styled.addGoogleLayer("TrafficLayer").then(nativeTrafficLayer => {
2323
styled.removeGoogleLayer("TrafficLayer");
2424
});
25+
26+
const withMapId = L.gridLayer
27+
.googleMutant({
28+
type: "roadmap",
29+
mapId: "mapId",
30+
})
31+
.addTo(map);

0 commit comments

Comments
 (0)