I don't know if this is the right place to discuss this. Let me know if there is a better place.
OpenLayers is an awesome library that I've enjoyed since I was introduced to it at FOSS4G Lausanne. The examples were a great on-ramp for new users. But the current version examples don't work right out of the box so they pose a barrier to entry.
It seems like there are three ways to make the examples work:
- The "old way": add a <script src=build/ol.js> element to the example and add an "ol." prefix to each "new" constructor
- The "bundle way": copy the example's <script> element into a new .js file and run it thur a bundler
- The "modules way": change the examples <script> element to type=module and edit rbush.js and its dependencies to be es6 module compatible
It's great to have these options. It speaks to the remarkable quality of the openlayers code and its developers. But the current examples need one of the three above modifications to work unless I'm totally missing something. Is this a concern to the developers? If so, what would be the best way to make the examples frendier?
I'm interested in working on it if there is value in it.
--