Webstorm doesn't see API

2019-08-04 23:05发布

I am using JetBrain's WebStorm to do my JavaScript coding. Honestly, I have tried other programs and truly think this may be the best coding environment for JavaScript.

Unfortunately, for some reason it does not see the OpenLayers 3 class structure whatsoever. Usually, the IntelliSense in WebStorm doesn't have any trouble, but everything in this case is labelled error red because it cannot find the structure. This structure is located at: http://ol3js.org/en/master/build/ol.js.

I have copied the file locally and created the appropriate reference locally in the project. WebStorm had no problems with OpenLayers 2 API located at: https://github.com/openlayers/openlayers, but for some reason now it cannot see OpenLayers 3 object. It has nothing to do with it not being able to locate the namespace, because it finds the ol class and has no reference issues finding the file in the source directory.

I have also added the ol.js API library as an external JS library to the project in WebStorm, which does not solve the problem.

0条回答
登录 后发表回答