Skip to content

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

@ivoryxiong

Description

@ivoryxiong

在调用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)
           }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions