Added declarations for 'leaflet.gridlayer.googlemutant'.

fixed namespace name and linting
This commit is contained in:
Ernest Rhinozeros 2017-01-25 16:27:09 +01:00
parent f44f406cfb
commit 2b027af83c
2 changed files with 6 additions and 6 deletions

View File

@ -5,7 +5,7 @@
/// <reference types="leaflet" />
declare namespace L.GridLayer {
declare namespace L.gridLayer {
export interface GoogleMutant extends L.GridLayer {
setElementSize(e: HTMLElement, size: L.Point): void ;
}
@ -51,7 +51,7 @@ declare namespace L.GridLayer {
maxZoom?: number;
maxNativeZoom?: number;
tileSize?: number | Point;
subdomains?: string | Array<string>;
subdomains?: string | string[];
errorTileUrl?: string;
/**
@ -60,7 +60,7 @@ declare namespace L.GridLayer {
attribution?: string;
opacity?: number;
continuousWorld?: boolean,
continuousWorld?: boolean;
noWrap?: boolean;
/**
@ -71,7 +71,7 @@ declare namespace L.GridLayer {
/**
* Google's map styles.
*/
styles?: GoogleMutantStyle[]
styles?: GoogleMutantStyle[];
}
export function googleMutant(options?: GoogleMutantOptions): GoogleMutant;

View File

@ -1,10 +1,10 @@
let map = L.map('foo');
let roads = L.GridLayer.googleMutant({
let roads = L.gridLayer.googleMutant({
type: 'roadmap'
}).addTo(map);
let styled = L.GridLayer.googleMutant({
let styled = L.gridLayer.googleMutant({
type: 'satellite',
styles: [
{ elementType: 'labels', stylers: [ { visibility: 'off' } ] },