mirror of
https://github.com/netzmacht/contao-leaflet-maps.git
synced 2025-11-29 11:33:46 +01:00
Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dc5a0a081e | ||
|
|
79f6efd9f3 | ||
|
|
e7bede78b1 | ||
|
|
997e16891b | ||
|
|
d5407357d8 | ||
|
|
1ba19f63b1 | ||
|
|
878492c0b1 | ||
|
|
57ba63556a | ||
|
|
0e2b8dd3cd | ||
|
|
91d3786187 |
34
CHANGELOG.md
34
CHANGELOG.md
@@ -6,7 +6,39 @@ 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/),
|
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).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
## 3.1.0 - 2018-01-11
|
## 3.1.2 - TBD
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/netzmacht/contao-leaflet-maps/compare/3.1.1...hotfix/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
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/netzmacht/contao-leaflet-maps/compare/3.1.0...3.1.1)
|
||||||
|
|
||||||
|
### 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)
|
[Full Changelog](https://github.com/netzmacht/contao-leaflet-maps/compare/3.0.4...3.1.0)
|
||||||
|
|
||||||
|
|||||||
@@ -34,10 +34,10 @@
|
|||||||
"symfony/http-kernel": "~3.3 || ~4.0",
|
"symfony/http-kernel": "~3.3 || ~4.0",
|
||||||
"symfony/translation": "~3.3 || ~4.0",
|
"symfony/translation": "~3.3 || ~4.0",
|
||||||
"symfony/templating": "~3.3 || ~4.0",
|
"symfony/templating": "~3.3 || ~4.0",
|
||||||
"netzmacht/contao-leaflet-libraries": "^1.0",
|
"netzmacht/contao-leaflet-libraries": "^1.3.4",
|
||||||
"netzmacht/contao-leaflet-geocode-widget": "^1.2",
|
"netzmacht/contao-leaflet-geocode-widget": "^1.2",
|
||||||
"netzmacht/php-javascript-builder": "^1.0",
|
"netzmacht/php-javascript-builder": "^1.0",
|
||||||
"netzmacht/php-leaflet": "^1.0.2",
|
"netzmacht/php-leaflet": "^1.1.0",
|
||||||
"netzmacht/contao-toolkit": "~3.0",
|
"netzmacht/contao-toolkit": "~3.0",
|
||||||
"netzmacht/contao-page-context": "~1.0",
|
"netzmacht/contao-page-context": "~1.0",
|
||||||
"contao-community-alliance/meta-palettes": "^2.0 || ^1.5",
|
"contao-community-alliance/meta-palettes": "^2.0 || ^1.5",
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ parameters:
|
|||||||
|
|
||||||
markercluster:
|
markercluster:
|
||||||
children: true
|
children: true
|
||||||
icon: 'bundles/netzmachtcontaoleaflet/img/markercluster.png'
|
icon: 'bundles/netzmachtcontaoleaflet/img/cluster.png'
|
||||||
|
|
||||||
tile:
|
tile:
|
||||||
children: false
|
children: false
|
||||||
|
|||||||
@@ -1,13 +1,22 @@
|
|||||||
parameters:
|
parameters:
|
||||||
netzmacht.contao_leaflet.providers:
|
netzmacht.contao_leaflet.providers:
|
||||||
OpenStreetMap:
|
OpenStreetMap:
|
||||||
variants: ['Mapnik', 'BlackAndWhite', 'DE', 'France', 'HOT', 'BZH']
|
variants: ['Mapnik', 'BlackAndWhite', 'DE', 'CH', 'France', 'HOT', 'BZH']
|
||||||
|
|
||||||
OpenSeaMap: []
|
OpenSeaMap: []
|
||||||
|
|
||||||
OpenTopoMap: []
|
OpenTopoMap: []
|
||||||
|
|
||||||
|
OpenPtMap: []
|
||||||
|
|
||||||
|
OpenRailwayMap: []
|
||||||
|
|
||||||
|
OpenFireMap: []
|
||||||
|
|
||||||
|
SafeCast: []
|
||||||
|
|
||||||
Thunderforest:
|
Thunderforest:
|
||||||
|
class: 'Netzmacht\LeafletPHP\Plugins\LeafletProviders\ThunderforestProvider'
|
||||||
variants:
|
variants:
|
||||||
- 'OpenCycleMap'
|
- 'OpenCycleMap'
|
||||||
- 'Transport'
|
- 'Transport'
|
||||||
@@ -16,6 +25,9 @@ parameters:
|
|||||||
- 'Landscape'
|
- 'Landscape'
|
||||||
- 'Outdoors'
|
- 'Outdoors'
|
||||||
- 'Pioneer'
|
- 'Pioneer'
|
||||||
|
options:
|
||||||
|
apiKey: 'tile_provider_key'
|
||||||
|
fields: ['tile_provider_key']
|
||||||
|
|
||||||
OpenMapSurfer:
|
OpenMapSurfer:
|
||||||
variants: ['Roads', 'AdminBounds', 'Grayscale']
|
variants: ['Roads', 'AdminBounds', 'Grayscale']
|
||||||
@@ -26,7 +38,8 @@ parameters:
|
|||||||
MapBox:
|
MapBox:
|
||||||
class: 'Netzmacht\LeafletPHP\Plugins\LeafletProviders\MapBoxProvider'
|
class: 'Netzmacht\LeafletPHP\Plugins\LeafletProviders\MapBoxProvider'
|
||||||
options:
|
options:
|
||||||
key: 'tile_provider_key'
|
accessToken: 'tile_provider_key'
|
||||||
|
fields: ['tile_provider_key']
|
||||||
|
|
||||||
Stamen:
|
Stamen:
|
||||||
variants:
|
variants:
|
||||||
@@ -56,6 +69,7 @@ parameters:
|
|||||||
- 'WorldGrayCanvas'
|
- 'WorldGrayCanvas'
|
||||||
|
|
||||||
OpenWeatherMap:
|
OpenWeatherMap:
|
||||||
|
class: 'Netzmacht\LeafletPHP\Plugins\LeafletProviders\OpenWeatherMapProvider'
|
||||||
variants:
|
variants:
|
||||||
- 'Clouds'
|
- 'Clouds'
|
||||||
- 'CloudsClassic'
|
- 'CloudsClassic'
|
||||||
@@ -68,6 +82,9 @@ parameters:
|
|||||||
- 'Wind'
|
- 'Wind'
|
||||||
- 'Temperature'
|
- 'Temperature'
|
||||||
- 'Snow'
|
- 'Snow'
|
||||||
|
options:
|
||||||
|
apiKey: 'tile_provider_key'
|
||||||
|
fields: ['tile_provider_key']
|
||||||
|
|
||||||
HERE:
|
HERE:
|
||||||
class: 'Netzmacht\LeafletPHP\Plugins\LeafletProviders\HereProvider'
|
class: 'Netzmacht\LeafletPHP\Plugins\LeafletProviders\HereProvider'
|
||||||
@@ -83,12 +100,18 @@ parameters:
|
|||||||
- 'normalNightMobile'
|
- 'normalNightMobile'
|
||||||
- 'normalNightGrey'
|
- 'normalNightGrey'
|
||||||
- 'normalNightGreyMobile'
|
- 'normalNightGreyMobile'
|
||||||
|
- 'normalNightTransit'
|
||||||
|
- 'normalNightTransitMobile'
|
||||||
|
- 'reducedDay'
|
||||||
|
- 'reducedNight'
|
||||||
- 'basicMap'
|
- 'basicMap'
|
||||||
- 'mapLabels'
|
- 'mapLabels'
|
||||||
- 'trafficFlow'
|
- 'trafficFlow'
|
||||||
- 'carnavDayGrey'
|
- 'carnavDayGrey'
|
||||||
- 'hybridDay'
|
- 'hybridDay'
|
||||||
- 'hybridDayMobile'
|
- 'hybridDayMobile'
|
||||||
|
- 'hybridDayTransit'
|
||||||
|
- 'hybridDayGrey'
|
||||||
- 'pedestrianDay'
|
- 'pedestrianDay'
|
||||||
- 'pedestrianNight'
|
- 'pedestrianNight'
|
||||||
- 'satelliteDay'
|
- 'satelliteDay'
|
||||||
@@ -123,6 +146,10 @@ parameters:
|
|||||||
- 'DarkMatter'
|
- 'DarkMatter'
|
||||||
- 'DarkMatterNoLabels'
|
- 'DarkMatterNoLabels'
|
||||||
- 'DarkMatterOnlyLabels'
|
- 'DarkMatterOnlyLabels'
|
||||||
|
- 'Voyager'
|
||||||
|
- 'VoyagerNoLabels'
|
||||||
|
- 'VoyagerOnlyLabels'
|
||||||
|
- 'VoyagerLabelsUnder'
|
||||||
|
|
||||||
HikeBike:
|
HikeBike:
|
||||||
variants:
|
variants:
|
||||||
@@ -155,3 +182,20 @@ parameters:
|
|||||||
- 'ModisTerraChlorophyll'
|
- 'ModisTerraChlorophyll'
|
||||||
|
|
||||||
NLS: []
|
NLS: []
|
||||||
|
|
||||||
|
Wikimedia: []
|
||||||
|
|
||||||
|
GeoportailFrance:
|
||||||
|
variants:
|
||||||
|
- 'parcels'
|
||||||
|
- 'ignMaps'
|
||||||
|
- 'maps'
|
||||||
|
- 'orthos'
|
||||||
|
|
||||||
|
OneMapSG:
|
||||||
|
variants:
|
||||||
|
- 'Default'
|
||||||
|
- 'Night'
|
||||||
|
- 'Original'
|
||||||
|
- 'Grey'
|
||||||
|
- 'LandLot'
|
||||||
|
|||||||
@@ -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';
|
$GLOBALS['TL_CSS'][] = 'bundles/netzmachtcontaoleaflet/css/backend_global.css';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -232,12 +232,14 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = [
|
|||||||
'provider' => ['tile_provider', 'tile_provider_variant'],
|
'provider' => ['tile_provider', 'tile_provider_variant'],
|
||||||
],
|
],
|
||||||
'tile_provider' => [
|
'tile_provider' => [
|
||||||
'MapBox' => ['tile_provider_key'],
|
'MapBox' => ['tile_provider_key'],
|
||||||
'HERE' => ['tile_provider_key', 'tile_provider_code'],
|
'HERE' => ['tile_provider_key', 'tile_provider_code'],
|
||||||
|
'OpenWeatherMap' => ['tile_provider_key'],
|
||||||
|
'Thunderforest' => ['tile_provider_key'],
|
||||||
|
],
|
||||||
|
'fileFormat' => [
|
||||||
|
'!' => ['file'],
|
||||||
],
|
],
|
||||||
'fileFormat' => [
|
|
||||||
'!' => ['file']
|
|
||||||
]
|
|
||||||
],
|
],
|
||||||
|
|
||||||
'metasubpalettes' => [
|
'metasubpalettes' => [
|
||||||
@@ -864,7 +866,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = [
|
|||||||
],
|
],
|
||||||
'sql' => 'mediumtext NULL',
|
'sql' => 'mediumtext NULL',
|
||||||
],
|
],
|
||||||
'fileFormat' => [
|
'fileFormat' => [
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['fileFormat'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['fileFormat'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'select',
|
'inputType' => 'select',
|
||||||
@@ -882,19 +884,19 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = [
|
|||||||
'sql' => "varchar(32) NOT NULL default ''",
|
'sql' => "varchar(32) NOT NULL default ''",
|
||||||
],
|
],
|
||||||
'file' => [
|
'file' => [
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['file'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['file'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'fileTree',
|
'inputType' => 'fileTree',
|
||||||
'load_callback' => [
|
'load_callback' => [
|
||||||
['netzmacht.contao_leaflet.listeners.dca.layer', 'prepareFileWidget'],
|
['netzmacht.contao_leaflet.listeners.dca.layer', 'prepareFileWidget'],
|
||||||
],
|
],
|
||||||
'eval' => [
|
'eval' => [
|
||||||
'filesOnly' => true,
|
'filesOnly' => true,
|
||||||
'fieldType' => 'radio',
|
'fieldType' => 'radio',
|
||||||
'mandatory' => true,
|
'mandatory' => true,
|
||||||
'tl_class' => 'clr',
|
'tl_class' => 'clr',
|
||||||
],
|
],
|
||||||
'sql' => 'binary(16) NULL',
|
'sql' => 'binary(16) NULL',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -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']['fileFormat'][1] = 'Choose which file format is used.';
|
||||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['file'][0] = 'File';
|
$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']['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'][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>';
|
$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>';
|
||||||
|
|||||||
@@ -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>
|
|
||||||
@@ -122,6 +122,7 @@ class LeafletDcaListener
|
|||||||
$data['marker'] = json_encode($latLng);
|
$data['marker'] = json_encode($latLng);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
// LatLng throws an exception of value could not be created. Just let the value empty when.
|
// 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);
|
return $this->templateEngine->render('toolkit:be:be_leaflet_geocode.html5', $data);
|
||||||
|
|||||||
@@ -44,7 +44,18 @@ class MarkerModel extends AbstractActiveModel
|
|||||||
public static function findByFilter($pid, ?Filter $filter = null)
|
public static function findByFilter($pid, ?Filter $filter = null)
|
||||||
{
|
{
|
||||||
if (!$filter) {
|
if (!$filter) {
|
||||||
return static::findActiveBy('pid', $pid, ['order' => 'sorting']);
|
$table = static::getTable();
|
||||||
|
|
||||||
|
return static::findBy(
|
||||||
|
[
|
||||||
|
$table . '.active=1',
|
||||||
|
$table . '.pid=?',
|
||||||
|
$table . '.latitude>0',
|
||||||
|
$table . '.longitude>0',
|
||||||
|
],
|
||||||
|
[$pid],
|
||||||
|
['order' => 'sorting']
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (true) {
|
switch (true) {
|
||||||
|
|||||||
Reference in New Issue
Block a user