Uncaught ReferenceError: ol undefined

Environment: Plone 5.0.6, OpenLayers 3.11.0

I want to use example codes in https://github.com/GaborFarkas/mastering_openlayers3/archive/v1.1.zip to work on my Plone instance. You can see the custom package code at https://github.com/l34marr/my.map/tree/world-capitals , which is trying to read the GeoJSON file and display the functions on VectorLayer.

First I encounter the following errors:

Unprepared ReferenceError: ol undefined

Unused error: inconsistent anonymous define () method: function () {...

JS errors when starting browser view

Guessing it, the workaround seems to fix the above problem: changing the order of the two lines in main_template.pt as follows:

<metal:javascriptslot define-slot="javascript_head_slot" />
<div tal:replace="structure provider:plone.scripts" />

, , . . .

Seems to work

: ? ?

+4

Source: https://habr.com/ru/post/1658399/


All Articles