heatMap相关

 最近研究heatMap,发现一个西安建筑科技大学的牛人,在2009年就最的很好了,针对ESRI的 Arcgis Flex API 做的heatMap extention,据说ESRI不大喜欢,卖给了美国另外一家公司,但是这家公司不大喜欢开源,所以,看看效果吧,

http://www.umapper.com/maps/view/id/29118/

还有他本人做的关于猪流感的heatmap

http://www.geoinformatics.cn/lab/swineflu/

经过一段时间的资料搜寻,发现用过heatmap技术的有:

一.基于Flex技术

1.基于ArcGIS Flex API的heatMap图层

2.扩展UIComponent,实现heatMap层

3.扩展Sprite实现heatMap层(用于在GoogleMap flex API上通过叠加层实现

实现:

//初始化

public  var hm:HeatMap = new HeatMap(600, 600);

//根据服务器返回结果,设置hm的数据参数并指定容器

 var dataX:Array = ev.result.dataX;
      var dataY:Array = ev.result.dataY;
   
   //Now process the HeatMap
      var re:Rectangle = new Rectangle(0,0,360,360);
      hm.setQuality(2,1);
      hm.setPenProperties(4,0.08);
      hm.alpha = 0.75;

   hm.setData(dataX,dataY,re); 

//叠加到google地图上(google的地图的map需要初始化哦)

 //For some reason if the groundOverlay is set from longitude -180 to 180 it does not work. You just need to get closer.
   var go:GroundOverlay = new GroundOverlay(hm,new LatLngBounds(new LatLng(-85,-179.78), new LatLng(85,179.78)),
    new GroundOverlayOptions(
                   {name: "HeatMapGroundOverlay",
                    description: "HeatMap ground overlay" }));          
   map.addOverlay(go);

//地图所在的容器

<mx:Canvas width="100%" height="100%" id="canvas1">
      <mx:UIComponent id="mapContainer"
          initialize="startMap(event);"
          width="100%" height="100%"/>
    </mx:Canvas>

简单点来说就是,Sprite需要放到UIComponent才能显示在界面上:

var comp:UIComponent = new UIComponent();
    var hm:HeatMap=new HeatMap(900,900);
    hm.setData(GradientDictionary.THERMAL,GradientDictionary.THERMAL,new Rectangle(111,100,500,500));
    comp.addChild(hm);
    this.addElement(comp);

二.基于javascript技术

1.google有一个gheat(  http://code.google.com/p/gheat/),通过扩展,实现一个heatmap的tile 服务器,并通过GoogleMap的API实现heatmap加载

Google Maps gives you API for adding additional map layers. This software implements a map tile server for a heatmap layer.

 

google 的heatmap API(http://www.heatmapapi.com/),需要免费的或付费的key,可以在Google Map api中加载,也可以在其他GIS系统中使用.

免费的heatmap api 的key的限制条件:

  • You are limited to a total of 500 hits per day(不超过500次/天的访问量)
  • You can only submit a total of 100 data points (or less depending on the method of deployment) per call(不超过100个数据点,或)
  • Our logo will appear on the heat map(显示google的logo)

效果:移动地图时候,heatmap不会跟着移动,只有鼠标抬起才会heatmap才能移动到指定位置


 2.arcgis api for javascript,包含heatmaplayer

三.基于html5的canvas绘图板标签

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

liyan_gis

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值