From 9f6d8d7b72da5e52490f0717cee63c738c6166bd Mon Sep 17 00:00:00 2001 From: David Schneider Date: Thu, 13 Apr 2017 16:08:15 -0700 Subject: [PATCH] Update ImageOverlay, ImageOverlayProps. --- types/react-leaflet/index.d.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/types/react-leaflet/index.d.ts b/types/react-leaflet/index.d.ts index d5e14a5e3c..96ff25a6fe 100644 --- a/types/react-leaflet/index.d.ts +++ b/types/react-leaflet/index.d.ts @@ -201,11 +201,16 @@ export interface TileLayerProps extends GridLayerProps, Leaflet.TileLayerOptions } export class TileLayer

extends GridLayer { } -interface ImageOverlayProps extends LayerProps, LeafletInteractionEvents { +export interface ImageOverlayProps extends MapLayerProps, Leaflet.ImageOverlayOptions { + bounds: Leaflet.LatLngBoundsExpression; url: string; - opacity?: string; + // Type of property `crossOrigin` is incompatible in React.HTMLAttributes and + // Leaflet.ImageOverlayOptions, so we hack it here to allow any type. + crossOrigin?: any; +} +export class ImageOverlay

extends MapLayer { + getChildContext(): { popupContainer: E }; } -export const ImageOverlay: React.ComponentClass; interface WMSTileLayerProps extends TileLayerProps { url: string;