mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +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:
parent
e157eb1dd1
commit
2addedb15e
2
react-leaflet/index.d.ts
vendored
2
react-leaflet/index.d.ts
vendored
@ -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 = {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user