增加radiusInMeters参数,传入了radiusInMeters每次绘制都把 500 米换算成当前缩放下的像素半径,这样就不会随着地图缩放热力结果不一样;增加返回上图渲染的结果,复用热力图渲染前已经计算出来的屏幕格网数据,找出高热力格子组成的聚集区,再把聚集区的加权中心从屏幕坐标反算回地图经纬度#60
Open
HGX-DJK wants to merge 1 commit into
Conversation
…地图缩放,是的热力结果不一样;增加返回上图渲染的结果复用热力图渲染前已经计算出来的屏幕格网数据,找出高热力格子组成的聚集区,再把聚集区的加权中心从屏幕坐标反算回地图经纬度
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
1、增加radiusInMeters参数,传入了radiusInMeters每次绘制都把 500 米换算成当前缩放下的像素半径,这样就不会随着地图缩放热力结果不一样;
2、增加返回上图渲染的结果,复用热力图渲染前已经计算出来的屏幕格网数据,找出高热力格子组成的聚集区,再把聚集区的加权中心从屏幕坐标反算回地图经纬度;
目前获取有两种:
I、通过 const stats = heatlayer.getHeatStats({
threshold: 0.6,
limit: 5
});
2、通过订阅的方式 heatlayer.on('heatstats', function (e) {
console.log(e.stats);
});