【发布时间】:2021-09-01 00:04:56
【问题描述】:
当我想显示墨西哥地图时,我遇到了这个问题 如您所见,没有完全显示,我不想放大,我只想让地图居中显示并完整
这是我目前的代码。
const geoUrl = 'https://gist.githubusercontent.com/diegovalle/5129746/raw/c1c35e439b1d5e688bca20b79f0e53a1fc12bf9e/mx_tj.json'
//const geoUrl = mapa2 ;
return (
<div>
<h1>Bienvenido a Blog!</h1>
<ComposableMap style={{backgroundColor:'gray'}} projection={'geoAlbers'}>
<Geographies style={{backgroundColor:'green', bottom:100}} geography={geoUrl}>
{({ geographies }) =>
geographies.map(geo => (
<Geography key={geo.rsmKey} geography={geo} />
))
}
</Geographies>
</ComposableMap>
【问题讨论】:
-
请不要使用不相关的标签(在本例中为google-maps)标记您的问题。
标签: reactjs frontend react-simple-maps