Hey has anybody managed to change the X/Y axis start points in react leaflet? I need my co-ordinates to work from the middle of the map rather than the bottom left using CRS. Below is what I have so far, any point in the right direction would be great!
componentDidMount() {
if ( __CLIENT__ ) {
Leaflet = require('leaflet');
LeafletCRS = Leaflet.CRS.Simple;
this.setState({
leafletLoaded: true
});
}
}
render() {
const bounds = [[0, 0], [600, 600]];
return (
<div className="columns small-12 medium-6">
<Map
style={ { width:'600px',height: '600px' } }
minZoom={ 1 }
center= { [0, 0] }
maxZoom={ 2 }
bounds={ bounds }
crs={ LeafletCRS }
>
<ImageOverlay
url="IMG HERE"
bounds={ bounds }
/>
<Circle center= { [0, 0] } radius={5} fillColor="blue" />
</Map>
</div>
)