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;