Closed A6Hz closed 4 years ago
project node_modules/leaflet/dist/leaflet-src.js:1540
1537 | project: function project(latlng) { 1538 | var d = Math.PI / 180, 1539 | max = this.MAX_LATITUDE, 1540 | lat = Math.max(Math.min(max, latlng.lat), -max), // <-- ERROR 1541 | sin = Math.sin(lat d); 1542 | return new Point(this.R latlng.lng d, this.R Math.log((1 + sin) / (1 - sin)) / 2); 1543 | },`
....
here my code:
import Marker from "react-leaflet-animated-marker"; const position = { lat: 24.37, lng: -238 }; `
import Marker from "react-leaflet-animated-marker";
const position = { lat: 24.37, lng: -238 };
</Marker>`
You provide position2 to prop position but your const is called position, not position2. it should be: <Marker position={position} ...
position2
position
<Marker position={position} ...
project node_modules/leaflet/dist/leaflet-src.js:1540
....
here my code:
import Marker from "react-leaflet-animated-marker";
const position = { lat: 24.37, lng: -238 };
`Easily customizable.