wandergis / arcgis-echarts3

A plugin for ArcGIS JS API to load echarts3 map and Make big data visualization easier.
http://wandergis.github.io/arcgis-echarts3/examples/
MIT License
358 stars 148 forks source link

我现在已经修改了对arcgis for js 4.8的支持 迁徙图和散点图已经实现 但是热力图引入main.js报错 #16

Open SCLGIS opened 6 years ago

SCLGIS commented 6 years ago

我现在已经修改了对arcgis for js 4.8的支持 迁徙图和散点图已经实现 但是热力图引入main.js报错 博主能否开源一份main.js给大家学习学习 或者是请教下博主提供的main.js是否支持对热力图的实现?

happyMeow commented 6 years ago

你好,4.8版本的可以分享一下吗?

SCLGIS commented 6 years ago

define(["dojo/_base/declare", "dojo/_base/lang", "esri/geometry/Point", "esri/geometry/ScreenPoint"], function (e, t, n, i) { return e("Echarts3Layer", null, { name: "Echarts3Layer", _map: null, _ec: null, _geoCoord: [], _option: null, _mapOffset: [0, 0], constructor: function (e, t) { this._map = e; var n = this._echartsContainer = document.createElement("div"); n.style.position = "absolute", n.id = "echarts_for_esri_maps", n.style.height = e.height + "px", n.style.width = e.width + "px", n.style.top = 0, n.style.left = 0, e.container.querySelector('.esri-view-root').querySelector('.esri-view-surface').appendChild(n), this._init(e, t) }, _init: function (e, t) { var o = this; o._map = e, o._ec = t, o.getEchartsContainer = function () { return o._echartsContainer }, o.getMap = function () { return o._map }, o.geoCoord2Pixel = function (e) { var t = new n(e[0], e[1]), i = o._map.toScreen(t); return [i.x, i.y] }, o.pixel2GeoCoord = function (e) { var t = o._map.toMap(new i(e[0], e[1])); return [t.lng, t.lat] }, o.initECharts = function () { return o._ec = t.init.apply(o, arguments), o._ec.Geo.prototype.dataToPoint = function (e) { var t = new n(e[0], e[1]), i = o._map.toScreen(t); return [i.x, i.y] }, o._bindEvent(), o._ec }, o.getECharts = function () { return o._ec }, o.setOption = function (e, t) { o._option = e, o._ec.setOption(e, t) }, o._bindEvent = function () { o._map.watch('animation', function (e) { if (e && e.state === "running") { o._echartsContainer.style.visibility = "hidden" } else { o._ec.resize(), o._echartsContainer.style.visibility = "visible" } }), o._map.watch("zoom", function (e) { o._ec.resize() }) o._map.on('drag', function (e) { if (e.action === "start") { o._echartsContainer.style.visibility = "hidden" } else if (e.action === "end") { o._ec.resize(), o._echartsContainer.style.visibility = "visible" } }), o._map.on("resize", function () { var e = o._echartsContainer.parentNode.parentNode; o._mapOffset = [-parseInt(e.style.left) || 0, -parseInt(e.style.top) || 0], o._echartsContainer.style.left = o._mapOffset[0] + "px", o._echartsContainer.style.top = o._mapOffset[1] + "px", setTimeout(function () { o._ec.resize() }, 200), o._echartsContainer.style.visibility = "visible" }), o._ec.getZr().on("dragstart", function (e) { }), o._ec.getZr().on("dragend", function (e) { }), o._ec.getZr().on("mousewheel", function (e) { o._lastMousePos = o._map.toMap(new i(e.event.x, e.event.y)); var t = e.wheelDelta, n = o._map, a = n.zoom; t = t > 0 ? Math.ceil(t) : Math.floor(t), t = Math.max(Math.min(t, 4), -4), t = Math.max(n.constraints.effectiveMinZoom, Math.min(n.constraints.effectiveMaxZoom, a + t)) - a, o._delta = 0, o._startTime = null, t && (n.zoom = a + t) }) } } }) });

SCLGIS commented 6 years ago

<!DOCTYPE html>

迁徙图ArcGIS FOR JS
SCLGIS commented 6 years ago

希望大家可以能够修改支持 arcgis for js 4.8和echarts 3 版本的heatmap

seamusic commented 4 years ago

你应该fork个版本出来,把你的代码迁入,这样才方便大家修改啊。