Hello Nicola,
Thank you for the access. I found the cause and fixed it on your site.
Your "position-tracking-test" View had a Distance query filter (500 km from the visitor). Since the last Maps updates, Maps doesn't run such a View until the location is known. It shows the "location needed" message instead. So the View never returned "N", and nothing asked the browser for the location on page load. The only trigger was the "Share my location" button, which your CSS hides.
What I changed:
1. I deleted the Distance filter from the View. It isn't needed: the Content Template already calculates the distance, and the View shows one item.
2. I updated your "trim-view-output" snippet in Toolset > Settings > Custom Code:
add_shortcode( 'trim_view', function ( $atts ) {
$content = render_view( array( 'name' => $atts['name'] ) );
if ( false !== strpos( $content, 'toolset-maps-location-required' ) ) {
return 'N';
}
return trim( $content );
} );
It returns "N" instead of the message. Without the message on the page, Maps asks the browser for the location on page load.
I tested both cases on your homepage:
- Without a location: "N", your consent banner shows, the map is hidden.
- With a location: "Y", the map shows, the banner is hidden.
Notes:
- The first [trim_view] on the homepage now prints a visible "N" or "Y". You can hide it with <span style="display:none">...</span>.
- You can remove the HTML/CSS block that hides the Maps message.
Please test in a private window, or after resetting the site's location permission in your browser. I can not test that one.
The custom code suggested above is not part of our official support policy. We will not be able to maintain or guarantee that it will work. It is an attempt to help you understand what should be done for scenarios where the built-in Toolset features are not there to handle your request.