Skip to content

'BMap' is not defined #3

@alivelee

Description

@alivelee

I wraped my components like this

componentDidMount(){
    this.map = new BMap.Map(this.id);
    this.map.centerAndZoom(new BMap.Point(121.406316,31.009703), 22);
    this.map.addControl(new BMap.MapTypeControl());   
    this.map.setCurrentCity("上海");   
    this.map.enableScrollWheelZoom(true);    
  }

and i use create-react-app as a boilerplate,it can not compiled

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions