FAQ
DB compatibility
In most cases EXT:maps2 uses the QueryBuilder to query data, but in case of
Plugin maps2_ we need to execute a native MySQL query
without QueryBuilder to find the related POIs. In that special case
MySQL/MariaDB is mandatory.
Consent Tools
If you want to use external consent tools you should deactivate both options
explicit and
explicit in extension manager.
Klaro
Overwrite Templates path with help of TypoScript and copy
Templates/ into your SitePackage extension. Add
data- attribute to existing div-tag.
<div id="maps2-{data.uid}"
     class="maps2"
     data-name="maps2"
     data-environment="{environment -> maps2:convertToJson()}"
     data-pois="{poiCollections -> maps2:convertToJson()}"></div>In this example the data- is maps2, so we have to create a service with
name maps2:
{
    name: 'maps2',
    default: false,
    title: 'Google Maps/Open Street Map',
    // contextualConsentOnly: true,
    optOut: false,
    required: false,
    purposes: ['analytics'],
},In some cases it may happen, that the map will be displayed partly. To prevent
that problem a reload after accepting the consent may help. Create a new JS
file which will be loaded AFTER klaro.. Keep the name of data-,
in this case maps2 here, too:
let manager = klaro.getManager();
manager.watch({
    update: function(manager, eventType, data) {
        if (
            eventType === 'saveConsents'
            && data.consents.maps2 === true
        ) {
            window.location.reload();
        }
    }
});mindshape_cookie_consent
- 
    Add cookie record Edit cookie consent record on your root page, add/edit cookie-category and add new Cookie record. - Set identifiertogoogle_maps 
- Set Cookie nametomapProvider Requests Allowed For Maps2 
- Set Cookie lifetimeto86400
- Fill the other values to your needs.
 
- Set 
- 
    Copy Show.html to SitePackage Copy file EXT:to a directory in your SitePackage extension. For example:maps2/ Resources/ Private/ Extensions/ maps2/ Templates/ Poi Collection/ Show. html typo3conf/ext/ site_ package/ Resources/ Private/ Extensions/ maps2/ Templates/ Poi Collection/ Show. html 
- 
    Update Show.html Add ViewHelpers of EXT:mindshape_cookie_consent in Show.html <html lang="en" xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" xmlns:maps2="http://typo3.org/ns/JWeiland/Maps2/ViewHelpers" xmlns:ms="http://typo3.org/ns/Mindshape/MindshapeCookieConsent/ViewHelpers" data-namespace-typo3-fluid="true">Copied!Add JavaScript files with help of mindshape ViewHelper below the <div> tag in Show.html: <ms:consent identifier="google_maps" scripts="{ 0: '//maps.googleapis.com/maps/api/js?key={settings.googleMapsJavaScriptApiKey}&libraries=places', 1: '{f:uri.resource(path:\'EXT:/maps2/Resources/Public/JavaScript/GoogleMaps2.js\')', 2: '{f:uri.resource(path:\'EXT:site_package/Resources/Public/JavaScript/GoogleMaps.js\')}' }"> </ms:consent>Copied!
- 
    Initialize Google Maps Create a new file in your site_package: /typo3conf/ext/ site_ package/ Resources/ Public/ Java Script/ Google Maps. js add just one line to that file: initMap (); If you choose another file path, please update it in Show.html at position 2 of the ViewHelper of step 3. 
- 
    Set template path to SitePackage Update TypoScript constant of maps2 templateas following:Root Path plugin.tx_ maps2. view. template Root Path = EXT: site_ package/ Resources/ Private/ Extensions/ maps2/ Templates/ 
- 
    Make API key available for Fluid Add following to TypoScript setup plugin.tx_maps2 { settings { googleMapsJavaScriptApiKey = {$plugin.tx_maps2.view.googleMapsJavaScriptApiKey} } }Copied!
- 
    Deactivate existing JavaScript page.includeJSFooterlibs.maps2 > page.includeJSFooterlibs.googleMapsForMaps2 >Copied!
- You're done