mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 21:10:23 +00:00
Added Leaflet.DivIcon for icon type (#14736)
* Added Leaflet.DivIcon for icon type * Changed icon to BaseIcon type, as per @danzel suggestion
This commit is contained in:
Vendored
+1
-1
@@ -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;
|
||||
}
|
||||
|
||||
@@ -179,6 +179,18 @@ export class CustomComponent extends Component<any, any> {
|
||||
}
|
||||
}
|
||||
|
||||
export class MarkerWithDivIconExample extends Component<any, any> {
|
||||
render() {
|
||||
return (
|
||||
<Map>
|
||||
<Marker position={[0, 0]} icon={
|
||||
new Leaflet.DivIcon({})
|
||||
}/>
|
||||
</Map>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
// draggable-marker.js
|
||||
export class DraggableExample extends Component<any, any> {
|
||||
state = {
|
||||
|
||||
Reference in New Issue
Block a user