From 2addedb15e5c2daf52c7addc6c5fbb213cda8ed6 Mon Sep 17 00:00:00 2001 From: pegel03 Date: Sat, 11 Mar 2017 01:04:05 +0100 Subject: [PATCH] Added Leaflet.DivIcon for icon type (#14736) * Added Leaflet.DivIcon for icon type * Changed icon to BaseIcon type, as per @danzel suggestion --- react-leaflet/index.d.ts | 2 +- react-leaflet/react-leaflet-tests.tsx | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/react-leaflet/index.d.ts b/react-leaflet/index.d.ts index 2399947c7d..eff286623a 100644 --- a/react-leaflet/index.d.ts +++ b/react-leaflet/index.d.ts @@ -111,7 +111,7 @@ interface LayerProps extends LeafletInteractionEvents { interface MarkerProps extends LayerProps, LeafletDraggingEvents { position: Leaflet.LatLngExpression; draggable?: boolean; - icon?: Leaflet.Icon; + icon?: Leaflet.BaseIcon; zIndexOffset?: number; opacity?: number; } diff --git a/react-leaflet/react-leaflet-tests.tsx b/react-leaflet/react-leaflet-tests.tsx index bb78ac7264..763e719de1 100644 --- a/react-leaflet/react-leaflet-tests.tsx +++ b/react-leaflet/react-leaflet-tests.tsx @@ -179,6 +179,18 @@ export class CustomComponent extends Component { } } +export class MarkerWithDivIconExample extends Component { + render() { + return ( + + + + ) + } +} + // draggable-marker.js export class DraggableExample extends Component { state = {