简体   繁体   English

d3 geo-地图投影

[英]d3 geo - Map projection

With d3.geo, i want to draw a map with a projection that i do not want to find by try&error, but with a visual tool to help me along. 使用d3.geo,我想绘制一个投影,该投影我不想通过try&error找到,但是要使用一个视觉工具来帮助我。

There is a tool out there: The Visual Map Configurator for Kartograph.js. 那里有一个工具:Kartograph.js的Visual Map Configurator Is there any tool i can use to generate a projection for d3.geo? 我可以使用任何工具为d3.geo生成投影吗?

How do you find the projection you want, without try&error? 您如何找到想要的投影,而不会出现尝试与错误? I can get the origin parameters from any map but for scale and translate? 我可以从任何地图上获取原点参数,但要进行缩放和平移?

While not as polished as Kartograph's configurator, if you clone the D3 git repository , you'll find three examples with sliders to control the projection settings: 虽然不如Kartograph的配置器那么精致,但是如果您克隆D3 git存储库 ,则会发现三个带有滑块的示例,这些滑块可控制投影设置:

If you're using an azmithal projection, you can also try dragging this interactive globe and then use the JavaScript Console to extract the origin ( projection.origin() ). 如果您使用的是方位投影,也可以尝试拖动此交互式地球仪 ,然后使用JavaScript控制台提取原点( projection.origin() )。

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

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