Skip to content

Commit

Permalink
Merge pull request #452 from InfoAmazonia/develop
Browse files Browse the repository at this point in the history
Release 2.12.0
  • Loading branch information
leopiccionia authored Oct 3, 2024
2 parents 9367973 + 79b5bec commit bc93a06
Show file tree
Hide file tree
Showing 9 changed files with 44 additions and 24 deletions.
10 changes: 7 additions & 3 deletions src/README.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
=== JEO ===
Contributors: earthjournalism
Tested up to: 6.6.2
Stable tag: 2.11.2
Stable tag: 2.12.0
Requires PHP: 7.2
Requires at least: 6.2
License: GPL-2.0+
License URI: http://www.gnu.org/licenses/gpl-2.0.txt
Version: 2.11.2
Version: 2.12.0

The JEO plugin acts as a geojournalism platform that allows news organizations, bloggers and NGOs to publish news stories as layers of information on digital maps.

Expand Down Expand Up @@ -49,8 +49,12 @@ After activating the plugin, a new item will appear on the WordPress dashboard:

== Changelog ==

= 2.12.0 =
* Consume MapboxGL from CDN
* bugfix: Fix max zoom for cluster layer

= 2.11.2 =
*bugfix: Fix regression in interactions loading
* bugfix: Fix regression on interactions loading

= 2.11.1 =
* Improve rendering of maps and storymaps
Expand Down
32 changes: 23 additions & 9 deletions src/includes/class-jeo.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,21 +150,23 @@ public function register_assets() {

wp_register_style(
'mapboxgl',
JEO_BASEURL . '/js/build/mapboxglLoader.css',
'https://api.mapbox.com/mapbox-gl-js/v3.7.0/mapbox-gl.css',
array(),
JEO_VERSION
false,
);

wp_register_script(
'mapboxgl-loader',
JEO_BASEURL . '/js/build/mapboxglLoader.js'
'mapboxgl',
'https://api.mapbox.com/mapbox-gl-js/v3.7.0/mapbox-gl.js',
array(),
false,
);

wp_register_script(
'mapboxgl-spiderifier',
JEO_BASEURL . '/js/src/mapboxgl-spiderifier/index.js',
array( 'mapboxgl-loader' ),
'mapboxgl-loader',
JEO_BASEURL . '/js/build/mapboxglLoader.js',
array( 'mapboxgl' ),
JEO_VERSION,
false
);

wp_localize_script(
Expand All @@ -187,9 +189,21 @@ public function register_assets() {
)
);

wp_register_script(
'mapboxgl-spiderifier',
JEO_BASEURL . '/js/src/mapboxgl-spiderifier/index.js',
array( 'mapboxgl-loader' ),
JEO_VERSION,
false
);

$map_blocks_assets = include JEO_BASEPATH . '/js/build/mapBlocks.asset.php';

wp_register_style( 'jeo-map-blocks', JEO_BASEURL . '/js/build/mapBlocks.css' );
wp_register_style(
'jeo-map-blocks',
JEO_BASEURL . '/js/build/mapBlocks.css',
array( 'mapboxgl' )
);
wp_register_script(
'jeo-map-blocks',
JEO_BASEURL . '/js/build/mapBlocks.js',
Expand Down
4 changes: 2 additions & 2 deletions src/jeo.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @wordpress-plugin
* Plugin Name: JEO WP
* Description: Interactive Map blocks for Wordpress Gutenberg
* Version: 2.11.2
* Version: 2.12.0
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
* Text Domain: jeo
Expand All @@ -22,7 +22,7 @@
* Start at version 1.0.0 and use SemVer - https://semver.org
* Rename this for your plugin and update it as you release new versions.
*/
define( 'JEO_VERSION', '2.11.2' );
define( 'JEO_VERSION', '2.12.0' );

define( 'JEO_BASEPATH', plugin_dir_path( __FILE__ ) );
define( 'JEO_BASEURL', plugins_url('', __FILE__) );
Expand Down
2 changes: 1 addition & 1 deletion src/js/src/discovery/blocks/stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class Stories extends Component {
type: 'geojson',
data: sourceData,
cluster: true,
clusterMaxZoom: 40,
clusterMaxZoom: 30,
clusterRadius: 40,
} );

Expand Down
2 changes: 1 addition & 1 deletion src/js/src/jeo-map/class-jeo-map.js
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ export default class JeoMap {
type: 'geojson',
data: sourceData,
cluster: true,
clusterMaxZoom: 40,
clusterMaxZoom: 30,
clusterRadius: 40,
} );
map.loadImage(
Expand Down
2 changes: 0 additions & 2 deletions src/js/src/map-blocks/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import { forwardRef } from '@wordpress/element';
import mapboxgl from 'mapbox-gl'
import MapGL, { FullscreenControl, NavigationControl } from 'react-map-gl';

import 'mapbox-gl/dist/mapbox-gl.css';

export const MapboxAPIKey = window.jeo_settings.mapbox_key;

/**
Expand Down
3 changes: 0 additions & 3 deletions src/js/src/mapboxgl-loader.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import mapboxgl from 'mapbox-gl';

import 'mapbox-gl/dist/mapbox-gl.css';

mapboxgl.accessToken = jeo_settings.mapbox_key;

window.mapboxgl = mapboxgl;
export default mapboxgl;
10 changes: 7 additions & 3 deletions trunk/readme.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
=== JEO ===
Contributors: earthjournalism
Tested up to: 6.6.2
Stable tag: 2.11.2
Stable tag: 2.12.0
Requires PHP: 7.2
Requires at least: 6.2
License: GPL-2.0+
License URI: http://www.gnu.org/licenses/gpl-2.0.txt
Version: 2.11.2
Version: 2.12.0

The JEO plugin acts as a geojournalism platform that allows news organizations, bloggers and NGOs to publish news stories as layers of information on digital maps.

Expand Down Expand Up @@ -49,8 +49,12 @@ After activating the plugin, a new item will appear on the WordPress dashboard:

== Changelog ==

= 2.12.0 =
* Consume MapboxGL from CDN
* bugfix: Fix max zoom for cluster layer

= 2.11.2 =
*bugfix: Fix regression in interactions loading
* bugfix: Fix regression on interactions loading

= 2.11.1 =
* Improve rendering of maps and storymaps
Expand Down
3 changes: 3 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ module.exports = {
},
postsSidebar: './src/js/src/posts-sidebar/index.js',
},
externals: {
'mapbox-gl': 'mapboxgl',
},
output: {
path: path.resolve( __dirname, './src/js/build/' ),
publicPath: './src/js/build/',
Expand Down

0 comments on commit bc93a06

Please sign in to comment.