i am rendering indian cities on map using marker component of react-map-gl , showing ex. Mumbai "lat": "19.0760", "long": "72.8777" on react-map-gl but it is showing in incorrect position on map .
find Img link - https://i.sstatic.net/vlhqg.png
{
"cities": [
{
"name": "Mumbai",
"state": "Maharashtra",
"lat": "19.0760",
"lon": "72.8777"
}
]
}
// compoment
[{cityList.cities.map(city => (
<Marker
key={city.name}
latitude={parseInt(city.lat)}
longitude={parseInt(city.lon)}
offsetLeft={-20} offsetTop={-10}
>
<button
className="marker-btn"
onClick={e => {
e.preventDefault();
console.log(city.name);
}}
>
{city.name}
</button>
</Marker>
))}]
the problem was with parseInt