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 () {...

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" />
, , . . .

: ? ?