I was trying to get meta-box-geolocation to autofill component fields from OSM today and I ran into a couple issues.
First geolocation.js is enqueued like this by geolocation.php(30):
$is_google_map = $this->check_type_google_map( $meta_box->meta_box );
if ( true === $is_google_map ) {
$this->register_google_maps_scripts( $meta_box->geo );
}
list( , $url ) = RWMB_Loader::get_path( __DIR__ );
wp_enqueue_script( 'mb-geolocation', $url . 'geolocation.js', ['google-maps', 'jquery', 'underscore'], filemtime( __DIR__ . '/geolocation.js' ), true );
As a result of google-maps being a dependency in wp_enqueue_script
, geolocation.js never loads when only using OSM. I know this is something you've been working on so my apologies if it has already been addressed.
Next on line 7 of geolocation.js:
this.addressFields = container.querySelectorAll( '.rwmb-text[name^="address"], .rwmb-text[name*="[address"]' );
I believe there is a typo in the brackets of the second query statement's attribute selector.
I think this should read .rwmb-text[name*="address"]
, otherwise no fields beyond lat,lng ever populate.