Skip to content

Commit

Permalink
Update OpenLayers version
Browse files Browse the repository at this point in the history
fixes #900
The CDN for OpenLayers 6.3.1 started throwing this error:
The resource from “https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@master/en/v6.3.1/build/ol.js?ver=6.3.1” was blocked due to MIME type (“text/plain”) mismatch (X-Content-Type-Options: nosniff).

A user suggested using version 6.5.0, and that seems to work.
https://wordpress.org/support/topic/openlayers-js-library-not-loaded/#post-15994563

It does seem like openlayers has a build process now that might be better in the long run, made #901 for that.
  • Loading branch information
cyberhobo committed Sep 10, 2022
1 parent 7d7c9d5 commit eac1f8b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions render-map.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,9 @@ private static function enqueue_scripts( $map_data ) {
if ( 'openlayers' === $map_data['map_api'] ) {
wp_register_script(
'openlayers',
'https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@master/en/v6.3.1/build/ol.js',
'https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@master/en/v6.5.0/build/ol.js',
null,
'6.3.1',
'6.5.0',
true );

GeoMashup::register_style(
Expand Down

0 comments on commit eac1f8b

Please sign in to comment.