mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-31 03:02:04 +08:00
Merge pull request #25955 from bolatovumar/master
[@types/googlemaps] Fix #25954
This commit is contained in:
@@ -40,6 +40,26 @@ let map: google.maps.Map = new google.maps.Map(
|
||||
mapOptions
|
||||
);
|
||||
|
||||
/***** Fitting map to bounds *****/
|
||||
map.fitBounds({
|
||||
north: 10,
|
||||
east: 10,
|
||||
west: 10,
|
||||
south: 10
|
||||
}, 50);
|
||||
|
||||
map.fitBounds({
|
||||
east: 10,
|
||||
north: 10,
|
||||
south: 10,
|
||||
west: 10
|
||||
}, {
|
||||
bottom: 100,
|
||||
left: 150,
|
||||
right: 150,
|
||||
top: 50
|
||||
});
|
||||
|
||||
|
||||
/***** Data *****/
|
||||
|
||||
|
||||
19
types/googlemaps/index.d.ts
vendored
19
types/googlemaps/index.d.ts
vendored
@@ -1,6 +1,14 @@
|
||||
// Type definitions for Google Maps JavaScript API 3.30
|
||||
// Project: https://developers.google.com/maps/
|
||||
// Definitions by: Folia A/S <http://www.folia.dk>, Chris Wrench <https://github.com/cgwrench>, Kiarash Ghiaseddin <https://github.com/Silver-Connection/DefinitelyTyped>, Grant Hutchins <https://github.com/nertzy>, Denis Atyasov <https://github.com/xaolas>, Michael McMullin <https://github.com/mrmcnerd>, Martin Costello <https://github.com/martincostello>, Sven Kreiss <https://github.com/svenkreiss>
|
||||
// Definitions by: Folia A/S <http://www.folia.dk>,
|
||||
// Chris Wrench <https://github.com/cgwrench>,
|
||||
// Kiarash Ghiaseddin <https://github.com/Silver-Connection/DefinitelyTyped>,
|
||||
// Grant Hutchins <https://github.com/nertzy>,
|
||||
// Denis Atyasov <https://github.com/xaolas>,
|
||||
// Michael McMullin <https://github.com/mrmcnerd>,
|
||||
// Martin Costello <https://github.com/martincostello>,
|
||||
// Sven Kreiss <https://github.com/svenkreiss>
|
||||
// Umar Bolatov <https://github.com/bolatovumar>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/*
|
||||
@@ -31,7 +39,7 @@ declare namespace google.maps {
|
||||
/***** Map *****/
|
||||
export class Map extends MVCObject {
|
||||
constructor(mapDiv: Element|null, opts?: MapOptions);
|
||||
fitBounds(bounds: LatLngBounds|LatLngBoundsLiteral, padding?: number): void;
|
||||
fitBounds(bounds: LatLngBounds|LatLngBoundsLiteral, padding?: number|Padding): void;
|
||||
getBounds(): LatLngBounds|null|undefined;
|
||||
getCenter(): LatLng;
|
||||
getDiv(): Element;
|
||||
@@ -58,6 +66,13 @@ declare namespace google.maps {
|
||||
setClickableIcons(clickable: boolean): void;
|
||||
}
|
||||
|
||||
export interface Padding {
|
||||
bottom: number;
|
||||
left: number;
|
||||
right: number;
|
||||
top: number;
|
||||
}
|
||||
|
||||
export interface MapOptions {
|
||||
/**
|
||||
* Color used for the background of the Map div. This color will be visible when
|
||||
|
||||
Reference in New Issue
Block a user