繁体   English   中英

react-map-gl - 印度地理位置显示不正确

[英]react-map-gl - India geoLocation is showing Incorrect

我正在使用 react-map-gl 的标记组件在 map 上渲染印度城市,显示 ex。 孟买“lat”:“19.0760”,“long”:react-map-gl 上的“72.8777”,但它在 map 上以不正确的 position 显示。

查找图片链接 - https://i.stack.imgur.com/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>
        ))}]

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM