错误:GoogleMapsAPI没有为node-googlemaps定义

我正在使用node-googlemaps从Node js查询Google Maps API 。 我已经创build了我的服务器API密钥作为开发人员。 根据这个文档,我必须使用我的API密钥和某些其他参数来创build一个publicConfigvariables。 我的publicConfigvariables如下所示:

  var gm = require('googlemaps'); var publicConfig = { key: 'myKey', stagger_time:1000, // for elevationPath encode_polylines:false, secure:true // use https }; var gmAPI = new GoogleMapsAPI(publicConfig); 

当我运行代码时,出现以下错误

  ReferenceError: GoogleMapsAPI is not defined 

有人可以帮我解决这个问题吗?

要解决这个问题,我已经包含了下面这行代码

 var GoogleMapsAPI = require('googlemaps');