Skip to content

Commit

Permalink
Add leaflet v1.4.0 js/css for backwards compatibility; Delete unneces…
Browse files Browse the repository at this point in the history
…sary sourcemap path from leaflet 1.9.4 css; Rename leaflet 1.9.4 js/css files and images path; Enable map wizard under TYPO3 13
  • Loading branch information
mediaessenz committed Jul 30, 2024
1 parent f35046d commit d11781d
Show file tree
Hide file tree
Showing 12 changed files with 649 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Classes/FormEngine/FieldControl/LocationMapWizard.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function render(): array
$resultArray['linkAttributes']['data-namelat-active'] = htmlspecialchars($nameLatitudeActive);
$resultArray['linkAttributes']['data-tiles'] = htmlspecialchars('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png');
$resultArray['linkAttributes']['data-copy'] = '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors';
$resultArray['stylesheetFiles'][] = 'EXT:tt_address/Resources/Public/Contrib/leaflet-core-1.9.4.css';
$resultArray['stylesheetFiles'][] = 'EXT:tt_address/Resources/Public/Contrib/leaflet-1.9.4.css';
$resultArray['stylesheetFiles'][] = 'EXT:tt_address/Resources/Public/Backend/LocationMapWizard/leafletBackend.css';

$pageRenderer = GeneralUtility::makeInstance('TYPO3\CMS\Core\Page\PageRenderer');
Expand Down
4 changes: 2 additions & 2 deletions Configuration/TCA/tt_address.php
Original file line number Diff line number Diff line change
Expand Up @@ -575,9 +575,9 @@
'eval' => \FriendsOfTYPO3\TtAddress\Evaluation\LongitudeEvaluation::class,
'default' => null,
'fieldControl' => [
'locationMap' => ((new \TYPO3\CMS\Core\Information\Typo3Version())->getMajorVersion() < 13) ? [
'locationMap' => [
'renderType' => 'locationMapWizard',
] : [],
],
],
'behaviour' => [
'allowLanguageSynchronization' => true,
Expand Down
4 changes: 2 additions & 2 deletions Resources/Private/Partials/Maps.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

<f:render section="rendering" arguments="{_all}"/>

<f:asset.css identifier="ttaddress-leaflet" href="EXT:tt_address/Resources/Public/Contrib/leaflet-core-1.9.4.css" />
<f:asset.css identifier="ttaddress-leaflet" href="EXT:tt_address/Resources/Public/Contrib/leaflet-1.9.4.css" />
<f:asset.css identifier="ttaddress" href="EXT:tt_address/Resources/Public/Styles/basic.css" />
<f:asset.script identifier="ttaddress-leaflet-core" src="EXT:tt_address/Resources/Public/JavaScript/leaflet-core-1.9.4.js" />
<f:asset.script identifier="ttaddress-leaflet-core" src="EXT:tt_address/Resources/Public/JavaScript/leaflet-1.9.4.min.js" />
<f:asset.script identifier="ttaddress-leaflet" src="EXT:tt_address/Resources/Public/JavaScript/Frontend/Leaflet.js" />
</f:section>

Expand Down
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
height: 1px;
}
.lvml {
behavior: url(image/#default#VML);
behavior: url(images/#default#VML);
display: inline-block;
position: absolute;
}
Expand Down Expand Up @@ -356,12 +356,12 @@ svg.leaflet-image-layer.leaflet-interactive path {
border-radius: 5px;
}
.leaflet-control-layers-toggle {
background-image: url(image/layers.png);
background-image: url(images/layers.png);
width: 36px;
height: 36px;
}
.leaflet-retina .leaflet-control-layers-toggle {
background-image: url(image/layers-2x.png);
background-image: url(images/layers-2x.png);
background-size: 26px 26px;
}
.leaflet-touch .leaflet-control-layers-toggle {
Expand Down Expand Up @@ -404,7 +404,7 @@ svg.leaflet-image-layer.leaflet-interactive path {

/* Default icon URLs */
.leaflet-default-icon-path { /* used only in path-guessing heuristic, see L.Icon.Default */
background-image: url(image/marker-icon.png);
background-image: url(images/marker-icon.png);
}


Expand Down
Loading

0 comments on commit d11781d

Please sign in to comment.