我尝试使用 URL 将 TopoJson 地图添加到我的标签中:https ://raw.githubusercontent.com/soncomqiq/front-end-forensic/master/gadm36_THA_1.json不起作用
但是如果我添加网址:https : //gist.githubusercontent.com/GordyD/49654901b07cb764c34f/raw/27eff6687f677c984a11f25977adaa4b9332a2a9/countries-and-states.json 就可以了。
我不知道为什么我的地图没有被渲染。
我的 gadm36_THA_1.json 是通过以下步骤生成的(在第 6 步中)https://medium.com/@augustgiles8/rendering-the-us-with-react-simple-maps-2e31fe7d49d
<ZoomableGroup center={[-8.3, -46.8]} disablePanning>
<Geographies geography="https://raw.githubusercontent.com/soncomqiq/front-end-forensic/master/gadm36_THA_1.json">
{(geographies, projection) =>
geographies.map((geography, i) =>
<Geography...
终于,我知道为什么我的地图没有渲染了。实际上,我的地图确实渲染了,但我配置了中心和比例错误。它渲染了但它超出了框架。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句