react-tmap icon indicating copy to clipboard operation
react-tmap copied to clipboard

无法使用“点标记”多个组件

Open ivoryxiong opened this issue 1 year ago • 3 comments

在调用setMap的时候报错“所传入参数并非TMap.Map的实例”, 从gljs看应该是做了类型检查, 而react-tmap调用types的包替换了TMap导致类型检查不过.

{
           key: "setMap",
           value: function(t) {
               return null === t || t instanceof window.TMap.Map ? t === this.map ? this : (t ? this.map ? (this.setMap(null),
               this.setMap(t)) : this.id && t.getLayer(this.id) ? console.error("Map中已存在id为" + this.id + "的图层,无法重复添加") : (this.map = t,
               this._bindBubbleHandler(),
               this._createLayer()) : this.hasEnterLeaveAnimation ? this._enterLeaveAnimation(!1, null, this._removeLayerAction) : this._removeLayerAction(),
               this) : (console.error("所传入参数并非TMap.Map的实例!"),
               this)
           }

ivoryxiong avatar Sep 20 '23 10:09 ivoryxiong

https://didi.github.io/react-tmap/#/~demos/InfoWindow-demo

Demo也有这个问题.

ivoryxiong avatar Sep 20 '23 10:09 ivoryxiong

https://didi.github.io/react-tmap/#/~demos/InfoWindow-demo

Demo也有这个问题.

同问

evanqhu avatar Mar 29 '24 12:03 evanqhu

同问

ok1054689 avatar Apr 12 '24 07:04 ok1054689