Vue introduced openlayers2.js configuration file

https://blog.csdn.net/hsany330/article/details/81001603

With my colleagues to engage in a long time, behind only to find that indeed export default

Openlayers2 thought originally packaged official website, can be used directly get vue, only later to understand, in the introduction of external vue js file into a single page, it is necessary after the packaged file with js follows:
Here Insert Picture Description
After, reintroduction in the file
Here Insert Picture Description
can be printed out to see if correct:
console.log (OpenLayers);
print is an object with the following results:
Here Insert Picture Description
Congratulations on your success! Awesome! !

Of course openlayers3 usage with this not the same, it is said to have detailed case the official website oh, use openlayers3 small partners can go to the official website to see openlayers Now, to continue refueling Oh! !

Published 98 original articles · won praise 4 · views 20000 +

Guess you like

Origin blog.csdn.net/weixin_42416812/article/details/100536873