【问题标题】:Is it possible to include variables in TileSource.uriFormat?是否可以在 TileSource.uriFormat 中包含变量?
【发布时间】:2015-06-25 15:02:08
【问题描述】:

我有一个 MapTileLayer,我正在为其指定一个 TileSource

TileSource mytileSource = new TileSource();

对于这个 tilesource,我需要指定一个 uri 格式。我想在这个字符串中包含一个变量,因为我有动态创建的文件夹,并且我希望这个 UriFormat 指向正确的文件夹。

那么如何使用参数/变量创建正确的 .uriFormat?

mytileSource.UriFormat = ?????

【问题讨论】:

  • 您可以创建一个派生的 TileSource 并覆盖 GetUri 方法。

标签: c# wpf maps bing-maps bing


【解决方案1】:

我不相信 UriFormat 支持本地文件夹。但是,可以从 WPF 控件中的本地文件夹加载磁贴,如本博文所述:https://blogs.bing.com/maps/2015/08/24/local-tile-layers-in-bing-maps-wpf/

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-08-24
    • 1970-01-01
    • 2021-07-18
    • 2011-12-31
    • 1970-01-01
    • 1970-01-01
    • 2016-09-02
    • 2018-07-01
    相关资源
    最近更新 更多