我已经在我的react项目上安装了react-leaflet,并且地图组件加载成功,我需要获取最新的latlng,并在单击地图时在弹出窗口中显示它,但我不知道如何:(import React from 'react'
import { Map as LeafletMap, TileLayer, Marker, Popup } from 'react-leaflet
我想为我的项目渲染地图。为此,我使用代码npm i react-leaflet安装了npm i react-leaflet,在终端中也安装了npm i leaflet,并输入了一些反应传单的代码。守则如下:import { Map as LeafletMap, TileLayer } from "react-leaflet";
importOpenStreetMap</a> contributors