我正在寻找一种从 ENC 层获取所有功能列表的方法,在查看编码示例时我遇到了 this .
在此示例代码中,我们有 MapView.IdentifyLayersAsync 和 MapView.IdentifyLayerAsync 方法,这两个方法分别返回 Task> 和 Task,然后我们可以从 GeoElements 中获取要素,但这两个方法都需要 Point 作为输入参数,我们如何才能在不提供要点的情况下执行此操作,即获取 ENC 层的所有功能,是否可以在 MapView 中切换它们的可见性(特别是在 java 100.7.0 中)?提前致谢
最佳答案
我一直在使用相同版本的 Java 运行时 SDK v100.7.0,并遇到了同样的问题。在查看了他们的文档之后 Display electronic navigational charts - ArcGIS Runtime SDK for Java在“设置 ENC 环境设置”下,提到:
ENC layers are displayed in accordance with the IHO S-52 standard. You can define the display properties of your ENC layers by using the static
EncEnvironmentSettings
class. These settings apply to all ENC layers in all maps. Settings fall under three categories: mariner settings, text group visibility settings, and viewing group settings. Text group settings control the display of labels for features, mariner settings control the symbolization and presentation of ENC features, and viewing group settings allow for quickly applying settings to logical groups of feature types. Example:
// Enables display of seabed information for all ENC layers
EncEnvironmentSettings.getDisplaySettings().getTextGroupVisibilitySettings().setIsNatureOfSeabed(true);
因此,要更改每种功能类型的可见性,您可以从 EncEnvironmentSettings.getDisplaySettings()
调用特定类别,然后使用 boolean 值设置该类别下特定功能的可见性.
此 ArcGIS 类文档会有所帮助 EncEnvironmentSettings.DisplaySettings Class
关于java - 有没有什么方法可以获取 ENC 图层的所有功能并在 java 或 .net ArcGIS SDK 中切换它们的可见性?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60015176/