BreezeMap: updated for OL4


Permalink 03:22:04 pm, by mholmes, 233 words, 38 views   English (CA)
Categories: Activity log; Mins. worked: 120

BreezeMap: updated for OL4

The BreezeMap code was not functioning with OL4, so it was pinned to OL3. I've now remedied that:

  • Created a tag for the last version compatible with OL3, so that's available for anyone who needs it.
  • There were two instances of using ol.animate, now removed; these were simple pan functions which were called in Map.beforeRender (also now removed). The replacement is simply to add a duration to the options provided to the function.
  • There were two instances in my own code of style functions which made use of "this" to refer to the feature they belong to; I don't know why this actually worked in OL3, but it correctly broke in OL4. The fix was to replace "this" with "feature", which is the first parameter to the function.
  • no longer needs a map.getSize() parameter; I've commented that out.
  • The build target which downloads the latest OL version was hard-coded to version 3; rewrote that. The biggest issue turned out to be the change on my desktop to Java 8, which brings the Nashorn JS engine. Where Rhino uses importClass() to pull in Java classes, this isn't supported in Nashorn. There's a Moz compatibility shim which you can use. This gives me a clue about a similar error on Windows with the Diagnostics code.

Also updated our Campus Map site and the TEI 2017 map to use OL4.


No Pingbacks for this post yet...


This blog is for work done for academic departments which does not fall under other categories.


XML Feeds