为 Bing 地图创建热图银光应用程序

发布于 2024-09-07 06:51:55 字数 133 浏览 0 评论 0原文

尽可能多地寻找资源。我有一个漂亮、简单的基于 Silverlight 的 Bing 地图应用程序,可以将图钉放入地图中。现在我有很多图钉,我想即时创建热图。我正在尝试寻找解释如何进行此操作的资源,但找不到任何内容。

那么,有什么想法吗?

Looking for resources as much as anything. I have a nice, simple Silverlight-based Bing Maps application that puts pins into the map. Now I have a lot of pins, I'd like to instead create heat maps on-the-fly. I'm trying to look for resources that explain how to go about this, but can't find anything.

So, any ideas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

云淡风轻 2024-09-14 06:51:55

你可能没有太多事可做。

生成热图的一种快速方法是将图钉重新设计为一个填充有透明度渐变背景的圆圈,边缘完全透明,另一边中等透明度。随着圆圈的堆积,颜色会更加浓郁。

编辑

http://www.microsoft .com/maps/isdk/silverlight/#MapControlInteractiveSdk.Tutorials.TutorialCustomPushpin

并将 替换为

<Ellipse Width="40" Height="40" m:MapLayer.Position="48.8,2.1" m:MapLayer.PositionOrigin="Center">
  <Ellipse.Fill>
    <RadialGradientBrush>
      <GradientStop Color="#7FFF0000" Offset="0"/>
      <GradientStop Offset="1"/>
    </RadialGradientBrush>
      </Ellipse.Fill>
    </Ellipse>

You probably won't have much to do.

A quick way to generate the heat map would be to reskin the pushpin as a circle filled with a background with a transparency gradient, fully transparent on the edge and medium transparency at the other. As the circles stacks up, the color will be more intense.

EDIT

http://www.microsoft.com/maps/isdk/silverlight/#MapControlInteractiveSdk.Tutorials.TutorialCustomPushpin

And replacing the <m:Pushpin ... /> by

<Ellipse Width="40" Height="40" m:MapLayer.Position="48.8,2.1" m:MapLayer.PositionOrigin="Center">
  <Ellipse.Fill>
    <RadialGradientBrush>
      <GradientStop Color="#7FFF0000" Offset="0"/>
      <GradientStop Offset="1"/>
    </RadialGradientBrush>
      </Ellipse.Fill>
    </Ellipse>
人间☆小暴躁 2024-09-14 06:51:55

这是一个好主意,对于单色热图非常有用。正如约翰所说,颜色强度随着圆圈重叠而增加。我从代码中添加我的。这是我使用的代码...

Ellipse e = new Ellipse() { MaxWidth = 40, MaxHeight = 40 };
        e.Width = 40;
        e.Height = 40;
        e.Fill = new RadialGradientBrush(Color.FromArgb(128, 255, 0, 0), Color.FromArgb(0, 0, 0, 0));

...我对如何将其扩展到从“冷”颜色到“热”颜色的多色热图非常感兴趣。目前我不知道该怎么做。本文(http://mapsys .info/44010/heat-mapping-crime-data-with-bing-maps-and-html5-canvas/)有一个在 HTML5 兼容浏览器中使用 javascript 的想法。我不知道如何将其转换为 Silverlight。

This is a good idea and it works great for a monochrome heat map. As Johan said the color intensity adds as the circles overlap. I'm adding mine from code. Here is the code I used...

Ellipse e = new Ellipse() { MaxWidth = 40, MaxHeight = 40 };
        e.Width = 40;
        e.Height = 40;
        e.Fill = new RadialGradientBrush(Color.FromArgb(128, 255, 0, 0), Color.FromArgb(0, 0, 0, 0));

...I'm very interested in how to extend this to a multi-color heat map that goes from 'cool' colors to 'hot' colors. At the moment I do not see how to do that. This article (http://mapsys.info/44010/heat-mapping-crime-data-with-bing-maps-and-html5-canvas/) has an idea for javascript in an HTML5 compliant browser. I don't know how to translate that to Silverlight.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文