Need help defining correct types from react-leaflet for typescript
I have a 'first' project trying to use react-scripts-ts and react-leaflet. I am trying to create the following class which seems like ti should be straight forward: import {map, TileLayer, Popup, Marker } from 'react-leaflet'; class LeafletMap extends React.Component { constructor () { super(); this.state = { lat: 51.505, lng: -.09, zoom: 13 }; } render() { const position = [ this.state.lat, this.state.lng]; return ( <Map center={position} zoom={this.state.zoom}> <TileLayer url="http://{s}.tile.osm.org/{z}/{x}/{y}.png" attribution="© <a href='http://osm.org/copyright'>OpenStreetMap</a> co
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.