forked from Snck3rs/contao-leaflet-maps
Compare commits
48 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
90c4621918 | ||
|
|
e5263a6315 | ||
|
|
515a191a66 | ||
|
|
f2f7e87fd3 | ||
|
|
4198b2b6cd | ||
|
|
fbd1ef81b0 | ||
|
|
92a376a307 | ||
|
|
bf6a1f9db0 | ||
|
|
c523aed70d | ||
|
|
4795767a8b | ||
|
|
c0efdb058e | ||
|
|
a4547ffb17 | ||
|
|
a63c836535 | ||
|
|
711b06c6d3 | ||
|
|
70b7d0ab9c | ||
|
|
ea59841d6e | ||
|
|
64c332bc25 | ||
|
|
3db5aad6d3 | ||
|
|
cef9d7ff44 | ||
|
|
06dd3655c0 | ||
|
|
3b066dfeb7 | ||
|
|
697e8d2f5e | ||
|
|
a6c08ae8e5 | ||
|
|
bb8f9e42dc | ||
|
|
3be5da9176 | ||
|
|
55e4ed0702 | ||
|
|
d42e0e122f | ||
|
|
ac05d103f1 | ||
|
|
cc9990cf4d | ||
|
|
9643b2c196 | ||
|
|
4d55b012fd | ||
|
|
39a7207e23 | ||
|
|
c4feeb1b38 | ||
|
|
cb3e9bc8b4 | ||
|
|
6a88ed380b | ||
|
|
59e671f8ea | ||
|
|
b0df34b86e | ||
|
|
4ea2adbb85 | ||
|
|
dc5a0a081e | ||
|
|
79f6efd9f3 | ||
|
|
e7bede78b1 | ||
|
|
997e16891b | ||
|
|
d5407357d8 | ||
|
|
1ba19f63b1 | ||
|
|
878492c0b1 | ||
|
|
57ba63556a | ||
|
|
0e2b8dd3cd | ||
|
|
91d3786187 |
1
.github/FUNDING.yml
vendored
Normal file
1
.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
github: [dmolineus]
|
||||
20
.travis.yml
20
.travis.yml
@@ -1,8 +1,18 @@
|
||||
dist: xenial
|
||||
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- ant-optional
|
||||
|
||||
language: php
|
||||
|
||||
php:
|
||||
- "7.1"
|
||||
- "7.3"
|
||||
- "7.2"
|
||||
- "7.1"
|
||||
- "7.4snapshot"
|
||||
- "nightly"
|
||||
|
||||
env:
|
||||
- CONTAO_VERSION=contao/core-bundle ~4.4.0
|
||||
@@ -11,10 +21,12 @@ env:
|
||||
|
||||
matrix:
|
||||
exclude:
|
||||
allow_failures:
|
||||
- php: "nightly"
|
||||
- php: "7.4snapshot"
|
||||
|
||||
sudo: false
|
||||
|
||||
install:
|
||||
before_script:
|
||||
- echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
|
||||
- travis_retry composer self-update && composer --version
|
||||
- travis_retry composer require $CONTAO_VERSION --no-update
|
||||
- travis_retry composer update --prefer-dist --no-interaction
|
||||
|
||||
118
CHANGELOG.md
118
CHANGELOG.md
@@ -6,7 +6,80 @@ All notable changes to this project will be documented in this file.
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## 3.1.0 - 2018-01-11
|
||||
## [Unreleased]
|
||||
|
||||
## [3.1.7] - 2020-08-28
|
||||
|
||||
### Fixed
|
||||
|
||||
- Duplicate map layer relations ([#89](https://github.com/netzmacht/contao-leaflet-maps/issues/89))
|
||||
|
||||
## [3.1.6] - 2020-01-03
|
||||
|
||||
### Fixed
|
||||
|
||||
- Do not add options which value is `NULL`
|
||||
- Fix button labels ([#83](https://github.com/netzmacht/contao-leaflet-maps/issues/83))
|
||||
- Fix potential security issue of symfony/dependency-injection (https://github.com/advisories/GHSA-pgwj-prpq-jpc2)
|
||||
|
||||
### Changed
|
||||
|
||||
- Use relative path for backend icon ([#82](https://github.com/netzmacht/contao-leaflet-maps/issues/82))
|
||||
|
||||
|
||||
## [3.1.5] - 2019-08-26
|
||||
|
||||
### Fixed
|
||||
|
||||
- Use twig directly instead of templating component to restore Contao 4.8
|
||||
|
||||
## [3.1.4] - 2019-02-13
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix ordering changes in layer control element aren't recognized ([#72](https://github.com/netzmacht/contao-leaflet-maps/issues/72))
|
||||
- Fix markers with negative coordinates aren't displayed ([#74](https://github.com/netzmacht/contao-leaflet-maps/issues/74))
|
||||
- Fix image icon with non existing image throws exception ([#75](https://github.com/netzmacht/contao-leaflet-maps/issues/75))
|
||||
- Fix invalid alias then using multiple edit. Aliases aren't copied anymore. ([#71](https://github.com/netzmacht/contao-leaflet-maps/issues/71))
|
||||
|
||||
## [3.1.3] - 2019-01-10
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix broken api routes in Contao 4.6/Symfony 4 (#69)
|
||||
- Fix broken about.html.twig template. Error block was missing
|
||||
|
||||
## 3.1.2 - 2018-12-18
|
||||
|
||||
[Full Changelog](https://github.com/netzmacht/contao-leaflet-maps/compare/3.1.1...3.1.2)
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix broken MapBox integration: Access token is now required
|
||||
- Fix broken OpenWeatherMap integration: Api key is now required
|
||||
- Fix broken Thunderforest integration: Api key is now required
|
||||
|
||||
### Added
|
||||
|
||||
- Add missing OpenPtMap of leaflet-providers
|
||||
- Add missing OpenRailwayMap of leaflet-providers
|
||||
- Add missing OpenFireMap of leaflet-providers
|
||||
- Add missing SafeCast of leaflet-providers
|
||||
- Add missing map types `normalNightTransit`, `normalNightTransitMobile`, `reducedDay`, `reducedNight`,
|
||||
`hybridDayTransit` and `hybridDayGrey` of HERE provider
|
||||
- Add missing map types `Voyager`, `VoyagerNoLabels`, `VoyagerOnlyLabels` and `VoyagerLabelsUnder` of CartoDB provider
|
||||
- Add missing Wikimedia of leaflet-providers
|
||||
- Add missing GeoportailFrance of leaflet-providers
|
||||
- Add missing OneMapSG of leaflet-providers
|
||||
|
||||
## [3.1.1] - 2018-12-07
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix missing marker cluster icon.
|
||||
- Ignore markers without coordinates to prevent uncaught exception caused by invalid coordinates.
|
||||
|
||||
## 3.1.0 - 2018-11-01
|
||||
|
||||
[Full Changelog](https://github.com/netzmacht/contao-leaflet-maps/compare/3.0.4...3.1.0)
|
||||
|
||||
@@ -33,43 +106,31 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- Fix broken marker cluster layer (#60).
|
||||
|
||||
|
||||
## 3.0.4 - 2018-10-08
|
||||
|
||||
[Full Changelog](https://github.com/netzmacht/contao-leaflet-maps/compare/3.0.3...3.0.4)
|
||||
## [3.0.4] - 2018-10-08
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix broken content element attributes (Missing class and custom id).
|
||||
|
||||
## 3.0.3 - 2018-09-18
|
||||
|
||||
[Full Changelog](https://github.com/netzmacht/contao-leaflet-maps/compare/3.0.2...3.0.3)
|
||||
## [3.0.3] - 2018-09-18
|
||||
|
||||
### Fixed
|
||||
|
||||
- Make alias generator services public for Contao 4.6/Symfony 4.0 compatibility.
|
||||
|
||||
## 3.0.2 - 2018-08-23
|
||||
|
||||
[Full Changelog](https://github.com/netzmacht/contao-leaflet-maps/compare/3.0.1...3.0.2)
|
||||
## [3.0.2] - 2018-08-23
|
||||
|
||||
- Run composer require checker and solve issues.
|
||||
|
||||
## 3.0.1 - 2018-06-20
|
||||
|
||||
[Full Changelog](https://github.com/netzmacht/contao-leaflet-maps/compare/3.0.0...3.0.1)
|
||||
## [3.0.1] - 2018-06-20
|
||||
|
||||
- Fix broken dynamic bbox related data loading (#57)
|
||||
|
||||
## 3.0.0 - 2018-01-05
|
||||
|
||||
[Full Changelog](https://github.com/netzmacht/contao-leaflet-maps/compare/3.0.0-beta1...3.0.0)
|
||||
## [3.0.0] - 2018-01-05
|
||||
|
||||
- Make hook/dca listener services public
|
||||
|
||||
## 3.0.0-beta1 - 2017-11-15
|
||||
|
||||
[Full Changelog](https://github.com/netzmacht/contao-leaflet-maps/compare/3.0.0-alpha2...3.0.0-beta1)
|
||||
## [3.0.0-beta1] - 2017-11-15
|
||||
|
||||
Enhancements
|
||||
|
||||
@@ -80,9 +141,7 @@ Bugfixes
|
||||
- Broken service definitions
|
||||
- Broken file layer id
|
||||
|
||||
## 3.0.0-alpha1 - 2017-10-19
|
||||
|
||||
[Full Changelog](https://github.com/netzmacht/contao-leaflet-maps/compare/3.0.0-alpha1...3.0.0-alpha2)
|
||||
## [3.0.0-alpha2] - 2017-10-19
|
||||
|
||||
Implemented enhancements
|
||||
|
||||
@@ -91,3 +150,18 @@ Implemented enhancements
|
||||
- New file layer for gpx,kml,wkt,topojson,geojson files added
|
||||
- Bypass filesystem cache in debug mode
|
||||
- Changelog added
|
||||
|
||||
[Unreleased]: https://github.com/netzmacht/contao-leaflet-maps/compare/3.1.7...hotfix/3.1.8
|
||||
[3.1.7]: https://github.com/netzmacht/contao-leaflet-maps/compare/3.1.6...3.1.7
|
||||
[3.1.6]: https://github.com/netzmacht/contao-leaflet-maps/compare/3.1.5...3.1.6
|
||||
[3.1.5]: https://github.com/netzmacht/contao-leaflet-maps/compare/3.1.4...3.1.5
|
||||
[3.1.4]: https://github.com/netzmacht/contao-leaflet-maps/compare/3.1.3...3.1.4
|
||||
[3.1.3]: https://github.com/netzmacht/contao-leaflet-maps/compare/3.1.2...3.1.3
|
||||
[3.1.1]: https://github.com/netzmacht/contao-leaflet-maps/compare/3.1.0...3.1.1
|
||||
[3.0.4]: https://github.com/netzmacht/contao-leaflet-maps/compare/3.0.3...3.0.4
|
||||
[3.0.3]: https://github.com/netzmacht/contao-leaflet-maps/compare/3.0.2...3.0.3
|
||||
[3.0.2]: https://github.com/netzmacht/contao-leaflet-maps/compare/3.0.1...3.0.2
|
||||
[3.0.1]: https://github.com/netzmacht/contao-leaflet-maps/compare/3.0.0...3.0.1
|
||||
[3.0.0]: https://github.com/netzmacht/contao-leaflet-maps/compare/3.0.0-beta1...3.0.0
|
||||
[3.0.0-beta1]: https://github.com/netzmacht/contao-leaflet-maps/compare/3.0.0-alpha2...3.0.0-beta1
|
||||
[3.0-0-alpha2]: https://github.com/netzmacht/contao-leaflet-maps/compare/3.0.0-alpha1...3.0.0-alpha2
|
||||
|
||||
12
README.md
12
README.md
@@ -2,9 +2,9 @@ Leaflet integration into Contao CMS
|
||||
===================================
|
||||
|
||||
[](https://travis-ci.org/netzmacht/contao-leaflet-maps)
|
||||
[](http://packagist.com/packages/netzmacht/contao-leaflet-maps)
|
||||
[](http://packagist.com/packages/netzmacht/contao-leaflet-maps)
|
||||
[](http://packagist.com/packages/netzmacht/contao-leaflet-maps)
|
||||
[](http://packagist.org/packages/netzmacht/contao-leaflet-maps)
|
||||
[](http://packagist.org/packages/netzmacht/contao-leaflet-maps)
|
||||
[](http://packagist.org/packages/netzmacht/contao-leaflet-maps)
|
||||
[](https://github.com/contao-community-alliance/coding-standard)
|
||||
|
||||
This extension provides a backend gui for integrating [Leaflet](http://leafletjs.com/) into the Contao CMS.
|
||||
@@ -38,6 +38,12 @@ Features
|
||||
- Autoloading of required assets.
|
||||
- [Layer for MetaModels](https://github.com/netzmacht/contao-leaflet-metamodels)
|
||||
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
|
||||
A basic [user documentation](http://leaflet-maps-for-contao.readthedocs.org/) written in German is available.
|
||||
|
||||
Changelog
|
||||
---------
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "netzmacht/contao-leaflet-maps",
|
||||
"type": "contao-bundle",
|
||||
"description": "Contao Leaflet maps integration",
|
||||
"keywords": [
|
||||
"contao",
|
||||
"maps",
|
||||
"leaflet"
|
||||
],
|
||||
"type": "contao-bundle",
|
||||
"license": "LGPL-3.0-or-later",
|
||||
"authors": [
|
||||
{
|
||||
@@ -16,38 +16,49 @@
|
||||
"role": "Developer"
|
||||
}
|
||||
],
|
||||
"support": {
|
||||
"email": "mail@netzmacht.de",
|
||||
"issues": "https://github.com/netzmacht/contao-leaflet-maps/issues",
|
||||
"source": "https://github.com/netzmacht/contao-leaflet-maps"
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.1",
|
||||
"ext-json": "*",
|
||||
"ext-pdo": "*",
|
||||
"contao-community-alliance/meta-palettes": "^2.0 || ^1.11",
|
||||
"contao/core-bundle": "~4.4",
|
||||
"doctrine/cache": "^1.0",
|
||||
"doctrine/dbal": "^2.5",
|
||||
"menatwork/contao-multicolumnwizard": "^3.3",
|
||||
"netzmacht/contao-leaflet-geocode-widget": "^1.2",
|
||||
"netzmacht/contao-leaflet-libraries": "^1.3.4",
|
||||
"netzmacht/contao-page-context": "~1.0",
|
||||
"netzmacht/contao-toolkit": "~3.0",
|
||||
"netzmacht/php-javascript-builder": "^1.0",
|
||||
"netzmacht/php-leaflet": "^1.1.0",
|
||||
"symfony/config": "~3.3 || ~4.0",
|
||||
"symfony/dependency-injection": "^3.4.26 || ^4.1.12",
|
||||
"symfony/event-dispatcher": "~3.3 || ~4.0",
|
||||
"symfony/dependency-injection": "~3.3 || ~4.0",
|
||||
"symfony/filesystem": "~3.3 || ~4.0",
|
||||
"symfony/http-kernel": "~3.3 || ~4.0",
|
||||
"symfony/twig-bundle": "~3.3 || ~4.0",
|
||||
"symfony/translation": "~3.3 || ~4.0",
|
||||
"symfony/templating": "~3.3 || ~4.0",
|
||||
"netzmacht/contao-leaflet-libraries": "^1.0",
|
||||
"netzmacht/contao-leaflet-geocode-widget": "^1.2",
|
||||
"netzmacht/php-javascript-builder": "^1.0",
|
||||
"netzmacht/php-leaflet": "^1.0.2",
|
||||
"netzmacht/contao-toolkit": "~3.0",
|
||||
"netzmacht/contao-page-context": "~1.0",
|
||||
"contao-community-alliance/meta-palettes": "^2.0 || ^1.5",
|
||||
"menatwork/contao-multicolumnwizard": "^3.2",
|
||||
"doctrine/cache": "^1.0"
|
||||
"twig/twig": "^1.3.35 || ^2.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpcq/all-tasks": "^1.2",
|
||||
"contao/manager-plugin": "^2.1",
|
||||
"phpstan/phpstan": "^0.10.3"
|
||||
"phpcq/all-tasks": "^1.2"
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "3.1.x-dev",
|
||||
"dev-develop": "3.2.x-dev",
|
||||
"dev-support/2.x": "2.0.x-dev"
|
||||
},
|
||||
"contao": {
|
||||
"transifex": {
|
||||
"project": "contao-leaflet-maps",
|
||||
"prefix": "core-",
|
||||
"languages_cto": "src/Bundle/Resources/contao/languages",
|
||||
"languages_tx": ".tx"
|
||||
}
|
||||
},
|
||||
"contao-manager-plugin": "Netzmacht\\Contao\\Leaflet\\Bundle\\ContaoManager\\Plugin"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
@@ -59,20 +70,10 @@
|
||||
"vendor/phpcq/autoload-validation/hacks/contao-hack.php"
|
||||
]
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "3.1.x-dev",
|
||||
"dev-develop": "3.2.x-dev",
|
||||
"dev-support/2.x": "2.0.x-dev"
|
||||
},
|
||||
"contao-manager-plugin": "Netzmacht\\Contao\\Leaflet\\Bundle\\ContaoManager\\Plugin",
|
||||
"contao": {
|
||||
"transifex": {
|
||||
"project": "contao-leaflet-maps",
|
||||
"prefix": "core-",
|
||||
"languages_cto": "src/Bundle/Resources/contao/languages",
|
||||
"languages_tx": ".tx"
|
||||
}
|
||||
}
|
||||
"support": {
|
||||
"email": "mail@netzmacht.de",
|
||||
"issues": "https://github.com/netzmacht/contao-leaflet-maps/issues",
|
||||
"source": "https://github.com/netzmacht/contao-leaflet-maps",
|
||||
"docs": "http://leaflet-maps-for-contao.readthedocs.org/"
|
||||
}
|
||||
}
|
||||
|
||||
1314
package-lock.json
generated
1314
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -4,10 +4,10 @@
|
||||
"description": "Leaflet maps for Contao",
|
||||
"main": "gulpfile.js",
|
||||
"dependencies": {
|
||||
"gulp": "^4.0.0",
|
||||
"gulp-cli": "^2.0.1",
|
||||
"gulp": "^4.0.2",
|
||||
"gulp-cli": "^2.2.0",
|
||||
"gulp-concat": "^2.6.1",
|
||||
"gulp-uglify": "^3.0.1",
|
||||
"gulp-uglify": "^3.0.2",
|
||||
"promised-del": "^1.0.2"
|
||||
},
|
||||
"devDependencies": {},
|
||||
|
||||
@@ -5,15 +5,15 @@
|
||||
*
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2014-2017 netzmacht David Molineus. All rights reserved.
|
||||
* @copyright 2014-2019 netzmacht David Molineus. All rights reserved.
|
||||
* @license LGPL-3.0 https://github.com/netzmacht/contao-leaflet-maps/blob/master/LICENSE
|
||||
* @filesource
|
||||
*/
|
||||
|
||||
namespace Netzmacht\Contao\Leaflet\Backend\Action;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Templating\EngineInterface as Engine;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Twig\Environment;
|
||||
|
||||
/**
|
||||
* Credits backend module.
|
||||
@@ -23,11 +23,11 @@ use Symfony\Component\HttpFoundation\Response;
|
||||
final class AboutAction
|
||||
{
|
||||
/**
|
||||
* Templating engine.
|
||||
* Twig environment.
|
||||
*
|
||||
* @var Engine
|
||||
* @var Environment
|
||||
*/
|
||||
private $engine;
|
||||
private $twig;
|
||||
|
||||
/**
|
||||
* Project directory.
|
||||
@@ -39,12 +39,12 @@ final class AboutAction
|
||||
/**
|
||||
* AboutAction constructor.
|
||||
*
|
||||
* @param Engine $engine Templating engine.
|
||||
* @param string $projectDir Project directory.
|
||||
* @param Environment $twig Twig environment.
|
||||
* @param string $projectDir Project directory.
|
||||
*/
|
||||
public function __construct(Engine $engine, string $projectDir)
|
||||
public function __construct(Environment $twig, string $projectDir)
|
||||
{
|
||||
$this->engine = $engine;
|
||||
$this->twig = $twig;
|
||||
$this->projectDir = $projectDir;
|
||||
}
|
||||
|
||||
@@ -62,7 +62,9 @@ final class AboutAction
|
||||
|
||||
[$data['version'], $data['dependencies']] = $this->extractFromComposer();
|
||||
|
||||
return $this->engine->renderResponse('@NetzmachtContaoLeaflet/backend/about.html.twig', $data);
|
||||
return new Response(
|
||||
$this->twig->render('@NetzmachtContaoLeaflet/backend/about.html.twig', $data)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -32,7 +32,7 @@ parameters:
|
||||
|
||||
markercluster:
|
||||
children: true
|
||||
icon: 'bundles/netzmachtcontaoleaflet/img/markercluster.png'
|
||||
icon: 'bundles/netzmachtcontaoleaflet/img/cluster.png'
|
||||
|
||||
tile:
|
||||
children: false
|
||||
|
||||
@@ -1,13 +1,22 @@
|
||||
parameters:
|
||||
netzmacht.contao_leaflet.providers:
|
||||
OpenStreetMap:
|
||||
variants: ['Mapnik', 'BlackAndWhite', 'DE', 'France', 'HOT', 'BZH']
|
||||
variants: ['Mapnik', 'BlackAndWhite', 'DE', 'CH', 'France', 'HOT', 'BZH']
|
||||
|
||||
OpenSeaMap: []
|
||||
|
||||
OpenTopoMap: []
|
||||
|
||||
OpenPtMap: []
|
||||
|
||||
OpenRailwayMap: []
|
||||
|
||||
OpenFireMap: []
|
||||
|
||||
SafeCast: []
|
||||
|
||||
Thunderforest:
|
||||
class: 'Netzmacht\LeafletPHP\Plugins\LeafletProviders\ThunderforestProvider'
|
||||
variants:
|
||||
- 'OpenCycleMap'
|
||||
- 'Transport'
|
||||
@@ -16,6 +25,9 @@ parameters:
|
||||
- 'Landscape'
|
||||
- 'Outdoors'
|
||||
- 'Pioneer'
|
||||
options:
|
||||
apiKey: 'tile_provider_key'
|
||||
fields: ['tile_provider_key']
|
||||
|
||||
OpenMapSurfer:
|
||||
variants: ['Roads', 'AdminBounds', 'Grayscale']
|
||||
@@ -26,7 +38,8 @@ parameters:
|
||||
MapBox:
|
||||
class: 'Netzmacht\LeafletPHP\Plugins\LeafletProviders\MapBoxProvider'
|
||||
options:
|
||||
key: 'tile_provider_key'
|
||||
accessToken: 'tile_provider_key'
|
||||
fields: ['tile_provider_key']
|
||||
|
||||
Stamen:
|
||||
variants:
|
||||
@@ -56,6 +69,7 @@ parameters:
|
||||
- 'WorldGrayCanvas'
|
||||
|
||||
OpenWeatherMap:
|
||||
class: 'Netzmacht\LeafletPHP\Plugins\LeafletProviders\OpenWeatherMapProvider'
|
||||
variants:
|
||||
- 'Clouds'
|
||||
- 'CloudsClassic'
|
||||
@@ -68,6 +82,9 @@ parameters:
|
||||
- 'Wind'
|
||||
- 'Temperature'
|
||||
- 'Snow'
|
||||
options:
|
||||
apiKey: 'tile_provider_key'
|
||||
fields: ['tile_provider_key']
|
||||
|
||||
HERE:
|
||||
class: 'Netzmacht\LeafletPHP\Plugins\LeafletProviders\HereProvider'
|
||||
@@ -83,12 +100,18 @@ parameters:
|
||||
- 'normalNightMobile'
|
||||
- 'normalNightGrey'
|
||||
- 'normalNightGreyMobile'
|
||||
- 'normalNightTransit'
|
||||
- 'normalNightTransitMobile'
|
||||
- 'reducedDay'
|
||||
- 'reducedNight'
|
||||
- 'basicMap'
|
||||
- 'mapLabels'
|
||||
- 'trafficFlow'
|
||||
- 'carnavDayGrey'
|
||||
- 'hybridDay'
|
||||
- 'hybridDayMobile'
|
||||
- 'hybridDayTransit'
|
||||
- 'hybridDayGrey'
|
||||
- 'pedestrianDay'
|
||||
- 'pedestrianNight'
|
||||
- 'satelliteDay'
|
||||
@@ -123,6 +146,10 @@ parameters:
|
||||
- 'DarkMatter'
|
||||
- 'DarkMatterNoLabels'
|
||||
- 'DarkMatterOnlyLabels'
|
||||
- 'Voyager'
|
||||
- 'VoyagerNoLabels'
|
||||
- 'VoyagerOnlyLabels'
|
||||
- 'VoyagerLabelsUnder'
|
||||
|
||||
HikeBike:
|
||||
variants:
|
||||
@@ -155,3 +182,20 @@ parameters:
|
||||
- 'ModisTerraChlorophyll'
|
||||
|
||||
NLS: []
|
||||
|
||||
Wikimedia: []
|
||||
|
||||
GeoportailFrance:
|
||||
variants:
|
||||
- 'parcels'
|
||||
- 'ignMaps'
|
||||
- 'maps'
|
||||
- 'orthos'
|
||||
|
||||
OneMapSG:
|
||||
variants:
|
||||
- 'Default'
|
||||
- 'Night'
|
||||
- 'Original'
|
||||
- 'Grey'
|
||||
- 'LandLot'
|
||||
|
||||
@@ -128,11 +128,13 @@ services:
|
||||
- { name: Netzmacht\Contao\PageContext\Request\PageIdDeterminator }
|
||||
|
||||
Netzmacht\Contao\Leaflet\Frontend\Action\LayerDataAction:
|
||||
public: true
|
||||
arguments:
|
||||
- '@netzmacht.contao_leaflet.map.provider'
|
||||
- '@netzmacht.contao_leaflet.filter_factory'
|
||||
|
||||
Netzmacht\Contao\Leaflet\Backend\Action\AboutAction:
|
||||
public: true
|
||||
arguments:
|
||||
- '@templating'
|
||||
- '@twig'
|
||||
- '%kernel.project_dir%'
|
||||
|
||||
@@ -44,7 +44,7 @@ array_insert(
|
||||
]
|
||||
);
|
||||
|
||||
if (TL_MODE === 'BE') {
|
||||
if (defined('TL_MODE') && TL_MODE === 'BE') {
|
||||
$GLOBALS['TL_CSS'][] = 'bundles/netzmachtcontaoleaflet/css/backend_global.css';
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
*
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @author Fritz Michael Gschwantner <fmg@inspiredminds.at>
|
||||
* @copyright 2014-2017 netzmacht David Molineus. All rights reserved.
|
||||
* @license LGPL-3.0 https://github.com/netzmacht/contao-leaflet-maps/blob/master/LICENSE
|
||||
* @filesource
|
||||
@@ -13,7 +14,7 @@
|
||||
$GLOBALS['TL_DCA']['tl_content']['metapalettes']['leaflet'] = [
|
||||
'type' => ['type', 'headline'],
|
||||
'leaflet' => ['leaflet_map', 'leaflet_mapId', 'leaflet_width', 'leaflet_height'],
|
||||
'templates' => [':hide', 'customTpl', 'leaflet_template'],
|
||||
'template' => [':hide', 'customTpl', 'leaflet_template'],
|
||||
'protected' => [':hide', 'protected'],
|
||||
'expert' => [':hide', 'guests', 'cssID', 'space'],
|
||||
'invisible' => [':hide', 'invisible', 'start', 'start'],
|
||||
|
||||
@@ -164,6 +164,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_control'] = [
|
||||
'maxlength' => 255,
|
||||
'tl_class' => 'w50',
|
||||
'nullIfEmpty' => true,
|
||||
'doNotCopy' => true,
|
||||
],
|
||||
'toolkit' => [
|
||||
'alias_generator' => [
|
||||
|
||||
@@ -179,7 +179,14 @@ $GLOBALS['TL_DCA']['tl_leaflet_icon'] = [
|
||||
['netzmacht.contao_toolkit.dca.listeners.alias_generator', 'handleSaveCallback'],
|
||||
['netzmacht.contao_leaflet.listeners.dca.validator', 'validateAlias'],
|
||||
],
|
||||
'eval' => ['mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true],
|
||||
'eval' => [
|
||||
'mandatory' => false,
|
||||
'maxlength' => 255,
|
||||
'tl_class' => 'w50',
|
||||
'unique' => true,
|
||||
'doNotCopy' => true,
|
||||
'nullIfEmpty' => true,
|
||||
],
|
||||
'toolkit' => [
|
||||
'alias_generator' => [
|
||||
'factory' => 'netzmacht.contao_leaflet.definition.alias_generator.factory_default',
|
||||
|
||||
@@ -232,12 +232,14 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = [
|
||||
'provider' => ['tile_provider', 'tile_provider_variant'],
|
||||
],
|
||||
'tile_provider' => [
|
||||
'MapBox' => ['tile_provider_key'],
|
||||
'HERE' => ['tile_provider_key', 'tile_provider_code'],
|
||||
'MapBox' => ['tile_provider_key'],
|
||||
'HERE' => ['tile_provider_key', 'tile_provider_code'],
|
||||
'OpenWeatherMap' => ['tile_provider_key'],
|
||||
'Thunderforest' => ['tile_provider_key'],
|
||||
],
|
||||
'fileFormat' => [
|
||||
'!' => ['file'],
|
||||
],
|
||||
'fileFormat' => [
|
||||
'!' => ['file']
|
||||
]
|
||||
],
|
||||
|
||||
'metasubpalettes' => [
|
||||
@@ -276,7 +278,14 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = [
|
||||
['netzmacht.contao_toolkit.dca.listeners.alias_generator', 'handleSaveCallback'],
|
||||
['netzmacht.contao_leaflet.listeners.dca.validator', 'validateAlias'],
|
||||
],
|
||||
'eval' => ['mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true],
|
||||
'eval' => [
|
||||
'mandatory' => false,
|
||||
'maxlength' => 255,
|
||||
'tl_class' => 'w50',
|
||||
'unique' => true,
|
||||
'nullIfEmpty' => true,
|
||||
'doNotCopy' => true,
|
||||
],
|
||||
'toolkit' => [
|
||||
'alias_generator' => [
|
||||
'factory' => 'netzmacht.contao_leaflet.definition.alias_generator.factory_default',
|
||||
@@ -864,7 +873,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = [
|
||||
],
|
||||
'sql' => 'mediumtext NULL',
|
||||
],
|
||||
'fileFormat' => [
|
||||
'fileFormat' => [
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['fileFormat'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'select',
|
||||
@@ -882,19 +891,19 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = [
|
||||
'sql' => "varchar(32) NOT NULL default ''",
|
||||
],
|
||||
'file' => [
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['file'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'fileTree',
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['file'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'fileTree',
|
||||
'load_callback' => [
|
||||
['netzmacht.contao_leaflet.listeners.dca.layer', 'prepareFileWidget'],
|
||||
],
|
||||
'eval' => [
|
||||
'filesOnly' => true,
|
||||
'fieldType' => 'radio',
|
||||
'mandatory' => true,
|
||||
'tl_class' => 'clr',
|
||||
'eval' => [
|
||||
'filesOnly' => true,
|
||||
'fieldType' => 'radio',
|
||||
'mandatory' => true,
|
||||
'tl_class' => 'clr',
|
||||
],
|
||||
'sql' => 'binary(16) NULL',
|
||||
'sql' => 'binary(16) NULL',
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
@@ -28,6 +28,9 @@ $GLOBALS['TL_DCA']['tl_leaflet_map'] = [
|
||||
'onsubmit_callback' => [
|
||||
['netzmacht.contao_leaflet.listeners.dca.leaflet', 'clearCache'],
|
||||
],
|
||||
'oncopy_callback' => [
|
||||
['netzmacht.contao_leaflet.listeners.dca.map', 'copyLayerRelations'],
|
||||
],
|
||||
],
|
||||
|
||||
'list' => [
|
||||
@@ -157,7 +160,14 @@ $GLOBALS['TL_DCA']['tl_leaflet_map'] = [
|
||||
['netzmacht.contao_toolkit.dca.listeners.alias_generator', 'handleSaveCallback'],
|
||||
['netzmacht.contao_leaflet.listeners.dca.validator', 'validateAlias'],
|
||||
],
|
||||
'eval' => ['mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true],
|
||||
'eval' => [
|
||||
'mandatory' => false,
|
||||
'maxlength' => 255,
|
||||
'tl_class' => 'w50',
|
||||
'unique' => true,
|
||||
'doNotCopy' => true,
|
||||
'nullIfEmpty' => true,
|
||||
],
|
||||
'toolkit' => [
|
||||
'alias_generator' => [
|
||||
'factory' => 'netzmacht.contao_leaflet.definition.alias_generator.factory_default',
|
||||
|
||||
@@ -160,7 +160,14 @@ $GLOBALS['TL_DCA']['tl_leaflet_marker'] = [
|
||||
['netzmacht.contao_toolkit.dca.listeners.alias_generator', 'handleSaveCallback'],
|
||||
['netzmacht.contao_leaflet.listeners.dca.validator', 'validateAlias'],
|
||||
],
|
||||
'eval' => ['mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true],
|
||||
'eval' => [
|
||||
'mandatory' => false,
|
||||
'maxlength' => 255,
|
||||
'tl_class' => 'w50',
|
||||
'unique' => true,
|
||||
'doNotCopy' => true,
|
||||
'nullIfEmpty' => true,
|
||||
],
|
||||
'toolkit' => [
|
||||
'alias_generator' => [
|
||||
'factory' => 'netzmacht.contao_leaflet.definition.alias_generator.factory_default',
|
||||
|
||||
@@ -151,7 +151,14 @@ $GLOBALS['TL_DCA']['tl_leaflet_popup'] = [
|
||||
['netzmacht.contao_toolkit.dca.listeners.alias_generator', 'handleSaveCallback'],
|
||||
['netzmacht.contao_leaflet.listeners.dca.validator', 'validateAlias'],
|
||||
],
|
||||
'eval' => ['mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true],
|
||||
'eval' => [
|
||||
'mandatory' => false,
|
||||
'maxlength' => 255,
|
||||
'tl_class' => 'w50',
|
||||
'unique' => true,
|
||||
'doNotCopy' => true,
|
||||
'nullIfEmpty' => true,
|
||||
],
|
||||
'toolkit' => [
|
||||
'alias_generator' => [
|
||||
'factory' => 'netzmacht.contao_leaflet.definition.alias_generator.factory_default',
|
||||
|
||||
@@ -145,7 +145,14 @@ $GLOBALS['TL_DCA']['tl_leaflet_style'] = [
|
||||
['netzmacht.contao_toolkit.dca.listeners.alias_generator', 'handleSaveCallback'],
|
||||
['netzmacht.contao_leaflet.listeners.dca.validator', 'validateAlias'],
|
||||
],
|
||||
'eval' => ['mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true],
|
||||
'eval' => [
|
||||
'mandatory' => false,
|
||||
'maxlength' => 255,
|
||||
'tl_class' => 'w50',
|
||||
'unique' => true,
|
||||
'doNotCopy' => true,
|
||||
'nullIfEmpty' => true,
|
||||
],
|
||||
'toolkit' => [
|
||||
'alias_generator' => [
|
||||
'factory' => 'netzmacht.contao_leaflet.definition.alias_generator.factory_default',
|
||||
|
||||
@@ -185,7 +185,14 @@ $GLOBALS['TL_DCA']['tl_leaflet_vector'] = [
|
||||
['netzmacht.contao_toolkit.dca.listeners.alias_generator', 'handleSaveCallback'],
|
||||
['netzmacht.contao_leaflet.listeners.dca.validator', 'validateAlias'],
|
||||
],
|
||||
'eval' => ['mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true],
|
||||
'eval' => [
|
||||
'mandatory' => false,
|
||||
'maxlength' => 255,
|
||||
'tl_class' => 'w50',
|
||||
'unique' => true,
|
||||
'doNotCopy' => true,
|
||||
'nullIfEmpty' => true,
|
||||
],
|
||||
'toolkit' => [
|
||||
'alias_generator' => [
|
||||
'factory' => 'netzmacht.contao_leaflet.definition.alias_generator.factory_default',
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
*
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @author Fritz Michael Gschwantner <fmg@inspiredminds.at>
|
||||
* @copyright 2014-2017 netzmacht David Molineus. All rights reserved.
|
||||
* @license LGPL-3.0 https://github.com/netzmacht/contao-leaflet-maps/blob/master/LICENSE
|
||||
* @filesource
|
||||
@@ -13,7 +14,7 @@
|
||||
$GLOBALS['TL_DCA']['tl_module']['metapalettes']['leaflet'] = [
|
||||
'type' => ['name', 'type', 'headline'],
|
||||
'leaflet' => ['leaflet_map', 'leaflet_mapId', 'leaflet_width', 'leaflet_height', 'leaflet_template'],
|
||||
'templates' => [':hide', 'customTpl'],
|
||||
'template' => [':hide', 'customTpl'],
|
||||
'protected' => [':hide', 'protected'],
|
||||
'expert' => [':hide', 'guests', 'cssID', 'space'],
|
||||
'invisible' => [':hide', 'invisible', 'start', 'start'],
|
||||
|
||||
@@ -58,7 +58,7 @@ $GLOBALS['TL_LANG']['tl_leaflet_layer']['groupTypes']['layer']['1'] = 'Ba
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['iconCreateFunction']['0'] = 'Cluster-Icon-Funktion erstellen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['iconCreateFunction']['1'] = 'Diese Funktion wird zum Erstellen des Cluster-Icons benutzt.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['icons']['0'] = 'Icons verwalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['icons']['1'] = 'Stile verwalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['icons']['1'] = 'Icon-Stile verwalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['map']['0'] = 'Karten verwalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['map']['1'] = 'Leaflet-Karten verwalten.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['markerCluster']['0'] = 'Marker-Cluster';
|
||||
@@ -83,7 +83,7 @@ $GLOBALS['TL_LANG']['tl_leaflet_layer']['pasteafter']['1'] = 'Na
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['pasteinto']['1'] = 'In Layer %s einfügen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['polygonOptions']['0'] = 'Polygon-Optionen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['popups']['0'] = 'Popups verwalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['popups']['1'] = 'Popup-Icons verwalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['popups']['1'] = 'Marker Popups verwalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['reference']['0'] = 'Referenz';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['reference']['1'] = 'Wählen Sie den Referenzlayer aus. Ansonsten wird dasselbe JavaScript-Objekt benutzt.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['removeOutsideVisibleBounds']['0'] = 'Entfernen, wenn außerhalb der sichtbaren Begrenzung';
|
||||
|
||||
@@ -35,8 +35,8 @@ $GLOBALS['TL_LANG']['tl_leaflet_popup']['delete']['0'] = 'Popup löschen
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['delete']['1'] = 'Popup ID %s löschen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['edit']['0'] = 'Popup bearbeiten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['edit']['1'] = 'Popup ID %s bearbeiten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['icons']['0'] = 'Popups verwalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['icons']['1'] = 'Marker-Popups verwalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['icons']['0'] = 'Icons verwalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['icons']['1'] = 'Marker-Icons verwalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['keepInView']['0'] = 'Im Sichtfeld behalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['keepInView']['1'] = 'Aktivieren Sie diese Einstellung um ein herausschieben des Popups aus dem sichbaren Bereich zu verhindern.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['layersBtn']['0'] = 'Layer verwalten';
|
||||
|
||||
@@ -44,7 +44,7 @@ $GLOBALS['TL_LANG']['tl_leaflet_style']['new']['1'] = 'Neuen Stil erstel
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_style']['opacity']['0'] = 'Linientransparenz';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_style']['opacity']['1'] = 'Die Transparenz des Striches kann einen Wert zwischen 0 und 1 annehmen.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_style']['popups']['0'] = 'Popups verwalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_style']['popups']['1'] = 'Popup-Icons verwalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_style']['popups']['1'] = 'Popup-Stile verwalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_style']['show']['0'] = 'Details anzeigen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_style']['show']['1'] = 'Details des Stils ID %s anzeigen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_style']['stroke']['0'] = 'Linie ziehen';
|
||||
|
||||
@@ -21,7 +21,7 @@ $GLOBALS['TL_LANG']['tl_leaflet_layer']['map'][1] = 'Manage leaflet maps';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['icons'][0] = 'Manage icons';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['icons'][1] = 'Manage marker icons';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['popups'][0] = 'Manage popups';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['popups'][1] = 'Manage popups icons';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['popups'][1] = 'Manage popups styles';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['styles'][0] = 'Manage styles';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['styles'][1] = 'Manage vector styles';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['new'][0] = 'Create layer';
|
||||
@@ -149,6 +149,10 @@ $GLOBALS['TL_LANG']['tl_leaflet_layer']['fileFormat'][0] = 'File
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['fileFormat'][1] = 'Choose which file format is used.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['file'][0] = 'File';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['file'][1] = 'Choose a file containing geodata. Supported formats are: %s.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['tile_provider_key'][0] = 'API key / Access token';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['tile_provider_key'][1] = 'Please define the API key / access token which is required for this tile provider.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['tile_provider_code'][0] = 'App code';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['tile_provider_code'][1] = 'Please define the required app code for this tile provider.';
|
||||
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['groupTypes']['layer'][0] = 'Layer group';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['groupTypes']['layer'][1] = 'Basic layer group. <br> See <a href="http://leafletjs.com/reference.html#layergroup" target="_blank">http://leafletjs.com/reference.html#layergroup</a>';
|
||||
|
||||
@@ -19,8 +19,8 @@ $GLOBALS['TL_LANG']['tl_leaflet_popup']['layersBtn'][0] = 'Manage layers';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['layersBtn'][1] = 'Manage leaflet layers';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['styles'][0] = 'Manage styles';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['styles'][1] = 'Manage vector styles';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['icons'][0] = 'Manage popups';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['icons'][1] = 'Manage marker popups';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['icons'][0] = 'Manage icons';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['icons'][1] = 'Manage marker icons';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['new'][0] = 'Create popup';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['new'][1] = 'Create new popup';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['edit'][0] = 'Edit popup';
|
||||
|
||||
@@ -19,7 +19,7 @@ $GLOBALS['TL_LANG']['tl_leaflet_style']['layersBtn'][1] = 'Manage leaflet layers
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_style']['icons'][0] = 'Manage icons';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_style']['icons'][1] = 'Manage marker icons';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_style']['popups'][0] = 'Manage popups';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_style']['popups'][1] = 'Manage popups icons';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_style']['popups'][1] = 'Manage popups styles';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_style']['new'][0] = 'Create style';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_style']['new'][1] = 'Create new style';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_style']['edit'][0] = 'Edit style';
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
<IfModule !mod_authz_core.c>
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
</IfModule>
|
||||
<IfModule mod_authz_core.c>
|
||||
Require all granted
|
||||
</IfModule>
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
#tl_navigation .tl_level_1_group .group-leaflet {
|
||||
background: url(/bundles/netzmachtcontaoleaflet/img/leaflet.svg) 3px 2px no-repeat;
|
||||
background: url(../img/leaflet.svg) 3px 2px no-repeat;
|
||||
}
|
||||
|
||||
.tl_help_table a {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -2,6 +2,8 @@
|
||||
|
||||
{% block headline %}{{ "MOD.leaflet_about.1"|trans({}, 'contao_modules') }}{% endblock %}
|
||||
|
||||
{% block error %}{% endblock %}
|
||||
|
||||
{% block main %}
|
||||
<div class="netzmacht-leaflet-credits">
|
||||
<div class="header">
|
||||
|
||||
@@ -122,6 +122,7 @@ class LeafletDcaListener
|
||||
$data['marker'] = json_encode($latLng);
|
||||
} catch (\Exception $e) {
|
||||
// LatLng throws an exception of value could not be created. Just let the value empty when.
|
||||
$data['marker'] = null;
|
||||
}
|
||||
|
||||
return $this->templateEngine->render('toolkit:be:be_leaflet_geocode.html5', $data);
|
||||
|
||||
@@ -25,10 +25,8 @@ use Netzmacht\Contao\Toolkit\Dca\Listener\AbstractListener;
|
||||
use Netzmacht\Contao\Toolkit\Dca\Manager;
|
||||
use Netzmacht\Contao\Toolkit\Dca\Options\OptionsBuilder;
|
||||
use PDO;
|
||||
use function strlen;
|
||||
use Symfony\Component\HttpFoundation\Session\Session;
|
||||
use Symfony\Component\Translation\TranslatorInterface as Translator;
|
||||
use function var_dump;
|
||||
|
||||
/**
|
||||
* Class Map is the helper class for the tl_leaflet_map dca.
|
||||
@@ -228,4 +226,26 @@ class MapDcaListener extends AbstractListener
|
||||
->asTree()
|
||||
->getOptions();
|
||||
}
|
||||
|
||||
/**
|
||||
* Copy layer relations if a map is duplicated.
|
||||
*
|
||||
* @param string|int $insertId Insert id of the new map.
|
||||
* @param DataContainer $dataContainer Data container driver.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function copyLayerRelations($insertId, DataContainer $dataContainer): void
|
||||
{
|
||||
$statement = $this->connection->prepare('SELECT * FROM tl_leaflet_map_layer WHERE mid=:mid order BY sorting');
|
||||
$statement->bindValue('mid', $dataContainer->id);
|
||||
$statement->execute();
|
||||
|
||||
while ($row = $statement->fetch(PDO::FETCH_ASSOC)) {
|
||||
unset($row['id']);
|
||||
$row['tstamp'] = time();
|
||||
$row['mid'] = $insertId;
|
||||
$this->connection->insert('tl_leaflet_map_layer', $row);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -210,6 +210,10 @@ class OptionsBuilder
|
||||
foreach ($options as $option => $mapping) {
|
||||
$default = static::getDefaultOption($option, $definition);
|
||||
|
||||
if ($model->$mapping === null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($model->$mapping === '1' || $model->$mapping === '') {
|
||||
if (((bool) $model->$mapping) !== $default) {
|
||||
static::applyOption($option, $model->$mapping, $definition);
|
||||
|
||||
@@ -71,16 +71,10 @@ class ImageIconMapper extends AbstractIconMapper
|
||||
Request $request = null,
|
||||
$elementId = null
|
||||
) {
|
||||
$arguments = parent::buildConstructArguments($model, $mapper, $request, $elementId);
|
||||
|
||||
if ($model->iconImage) {
|
||||
$repository = $this->repositoryManager->getRepository(FilesModel::class);
|
||||
$file = $repository->findByUuid($model->iconImage);
|
||||
|
||||
if ($file) {
|
||||
$arguments[] = $file->path;
|
||||
}
|
||||
}
|
||||
$arguments = parent::buildConstructArguments($model, $mapper, $request, $elementId);
|
||||
$repository = $this->repositoryManager->getRepository(FilesModel::class);
|
||||
$file = $repository->findByUuid($model->iconImage);
|
||||
$arguments[] = $file ? $file->path : '';
|
||||
|
||||
return $arguments;
|
||||
}
|
||||
@@ -117,8 +111,6 @@ class ImageIconMapper extends AbstractIconMapper
|
||||
$file = $repository->findByUuid($model->iconImage);
|
||||
|
||||
if ($file) {
|
||||
$definition->setIconUrl($file->path);
|
||||
|
||||
$file = new File($file->path);
|
||||
$definition->setIconSize([$file->width, $file->height]);
|
||||
|
||||
|
||||
@@ -41,6 +41,7 @@ SELECT l.*, c.mode as controlMode
|
||||
FROM tl_leaflet_layer l
|
||||
LEFT JOIN tl_leaflet_control_layer c ON l.id = c.lid
|
||||
WHERE c.cid=?
|
||||
ORDER BY c.sorting
|
||||
SQL;
|
||||
|
||||
$result = Database::getInstance()
|
||||
@@ -67,6 +68,7 @@ FROM tl_leaflet_layer l
|
||||
LEFT JOIN tl_leaflet_control_layer
|
||||
c ON l.id = c.lid
|
||||
WHERE c.cid=? AND l.active=1
|
||||
ORDER BY c.sorting
|
||||
SQL;
|
||||
|
||||
$result = Database::getInstance()
|
||||
|
||||
@@ -17,7 +17,6 @@ use Netzmacht\Contao\Leaflet\Filter\BboxFilter;
|
||||
use Netzmacht\Contao\Leaflet\Filter\DistanceFilter;
|
||||
use Netzmacht\Contao\Leaflet\Filter\Filter;
|
||||
use Netzmacht\LeafletPHP\Value\LatLngBounds;
|
||||
use function var_dump;
|
||||
|
||||
/**
|
||||
* Class MarkerModel for the tl_leaflet_marker table.
|
||||
@@ -44,7 +43,18 @@ class MarkerModel extends AbstractActiveModel
|
||||
public static function findByFilter($pid, ?Filter $filter = null)
|
||||
{
|
||||
if (!$filter) {
|
||||
return static::findActiveBy('pid', $pid, ['order' => 'sorting']);
|
||||
$table = static::getTable();
|
||||
|
||||
return static::findBy(
|
||||
[
|
||||
$table . '.active=1',
|
||||
$table . '.pid=?',
|
||||
$table . '.latitude IS NOT NULL',
|
||||
$table . '.longitude IS NOT NULL',
|
||||
],
|
||||
[$pid],
|
||||
['order' => 'sorting']
|
||||
);
|
||||
}
|
||||
|
||||
switch (true) {
|
||||
|
||||
Reference in New Issue
Block a user