具有可绑定数量的 MapItemsControl 的 Silverlight Bing Map
是否可以将类似 ItemsSource 的内容添加到 Bing Map 控件以将 MapItemsControls 绑定到 ObservableCollection?实际上我想轻松地在地图上放置不同的图钉样式。
Is it possible to add something like ItemsSource to the Bing Map control to bind the MapItemsControls to a ObservableCollection? Actually I want to put different pushpin-styles on a map easily.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果我理解您的问题,您希望将 MapItemControls 集合添加到地图中 - 并且该集合必须是可绑定的 - 动态创建?
我之前也遇到过类似的问题。我的解决方案是创建一个新的 MapLayer 并将项目的二维集合公开为 DependencyProperty。
这是建议的方法:
我写了一篇 简短的帖子关于它。您可以检查它以获取一些详细信息。
洪扎
If I understand your question, you would like to have a collection of MapItemControls added to a map - and this collection has to be bind-able - created dynamically?
I had a similar issue before. The solution for me was to create a new MapLayer and expose two-dimensional collection of items as DependencyProperty.
Here is a suggested approach:
I wrote a short post about it. You can check it to get some details.
Honza
是的,您可以通过图层做到这一点以及几乎任何您想要的东西。
官方网站上有各种示例:
http://www.microsoft.com/maps/isdk/silverlight/
Yes, you can do that and pretty much anything you want with layers.
There is all kind of examples available on official site:
http://www.microsoft.com/maps/isdk/silverlight/