149 Posts
MtnPavlas
1 year ago
2
Topic

Hello,  this issue is back on Seblod v4.1.0 (functioned well on v4.0.3).

The culprit is that the Google Maps API call (e.g., <script src="https://maps.googleapis.com/maps/api/js?key=[api_key]&language=en"></script>) gets placed below the map script generated by the Seblod map template whereas when displaying the map in a component, it gets placed above it.

The work-around mentioned in the above link does not work here, sadly. One could place the API call script directly into the template, but a) then it gets called twice, throwing an error, and b) it's a butch approach because the API gets called on every page vs. only where we need it.

Thank you for any ideas : )

Get a VIP membership
149 Posts
MtnPavlas
1 year ago
0
Level 1

Well, found a fix, though not sure it won't cause any issues (so far so good in our implementation) - works well when the map template is used as a component or a module.

Adjust the /templates/seb_map/index.php file as follows - around line 265 replace this:

	if ( method_exists( 'JCckDev', 'addScript' ) ) {
	  JCckDev::addScript( $lib );
	} else { 
	  $doc->addScript( $lib );
	}

with this:

	$doc->addScript( $lib );
26 Posts
MicroChief
1 year ago
0
Level 1

Does the map work for Joomla 4 and Seblod 4.1?

There is no information on the website that it is compatible.

I wonder which other plugins for seblod 3 work in seblod 4.

Get a VIP membership