Skip to content

'BMap' is not defined #3

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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