forked from Snck3rs/contao-leaflet-maps
Compare commits
84 Commits
1.0.0-beta
...
2.0.0-beta
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5b7c7d01d8 | ||
|
|
722e17b29c | ||
|
|
8920be6649 | ||
|
|
4651f2b885 | ||
|
|
a8c4e03ab1 | ||
|
|
4c1df8eaaf | ||
|
|
da3b7ba994 | ||
|
|
9f950b0f31 | ||
|
|
324e65e217 | ||
|
|
5cf75b76b7 | ||
|
|
d95f45d35a | ||
|
|
3f05bd8783 | ||
|
|
cb370f6723 | ||
|
|
f462a11c1d | ||
|
|
c61e2d9cc9 | ||
|
|
130848c1f3 | ||
|
|
74f500513a | ||
|
|
8947efc351 | ||
|
|
37065f2183 | ||
|
|
422433bc52 | ||
|
|
cba8939843 | ||
|
|
2705ff2676 | ||
|
|
28490a9ee6 | ||
|
|
17e7bc5e1c | ||
|
|
b27c706fe3 | ||
|
|
f22906b8b6 | ||
|
|
1eba70b5b4 | ||
|
|
d394d36aff | ||
|
|
9e0723a67a | ||
|
|
8c24f5e735 | ||
|
|
2e5139a756 | ||
|
|
92b7080217 | ||
|
|
340cd5d9f6 | ||
|
|
fa67267473 | ||
|
|
33a097ebe7 | ||
|
|
45cee3bfb8 | ||
|
|
caa137e566 | ||
|
|
48a6a3a360 | ||
|
|
016d0f1435 | ||
|
|
d7d76913b1 | ||
|
|
a6ffe76134 | ||
|
|
ca4e4e0d2d | ||
|
|
025ce1ba81 | ||
|
|
ee4c157e9c | ||
|
|
daf902b989 | ||
|
|
a375a73668 | ||
|
|
b1cfbb3b04 | ||
|
|
2c9dd0ad48 | ||
|
|
4e4380270b | ||
|
|
4068f62df1 | ||
|
|
ea359e8b79 | ||
|
|
bbd97ae47d | ||
|
|
3e84260e79 | ||
|
|
971f905ad2 | ||
|
|
436cf88901 | ||
|
|
7ef6aff458 | ||
|
|
7d817850cc | ||
|
|
395f3503fa | ||
|
|
c7cf1524a7 | ||
|
|
8e89cc3616 | ||
|
|
5a41b2b5d8 | ||
|
|
59b0218f15 | ||
|
|
047bde7b15 | ||
|
|
abcc4f5d88 | ||
|
|
c8ea8d4fab | ||
|
|
e574aa36a0 | ||
|
|
91000979eb | ||
|
|
7d3c053bd1 | ||
|
|
1bb9fb4d7a | ||
|
|
749b8f3068 | ||
|
|
5da4c047b0 | ||
|
|
98ef670e4a | ||
|
|
b043b134a8 | ||
|
|
ddcec3f1e3 | ||
|
|
e75b325ec6 | ||
|
|
11bc76fea6 | ||
|
|
13253873fa | ||
|
|
5b648427c1 | ||
|
|
f4a54cdec3 | ||
|
|
0e10a3d7c4 | ||
|
|
7207d9e0e6 | ||
|
|
f8e28f3299 | ||
|
|
69e3ea8898 | ||
|
|
5d8028eda5 |
24
.travis.yml
24
.travis.yml
@@ -1,21 +1,14 @@
|
||||
language: php
|
||||
|
||||
php:
|
||||
- 5.4
|
||||
- 5.5
|
||||
- 5.6
|
||||
- "5.4"
|
||||
- "5.5"
|
||||
- "5.6"
|
||||
- "7.0"
|
||||
- "nightly"
|
||||
|
||||
env:
|
||||
- CONTAO_VERSION=~3.2.0
|
||||
- CONTAO_VERSION=~3.3.0
|
||||
- CONTAO_VERSION=~3.4.0
|
||||
- CONTAO_VERSION=~3.5.0
|
||||
|
||||
# Exclude impossible Contao Version combinations.
|
||||
matrix:
|
||||
exclude:
|
||||
- php: 5.3
|
||||
env: CONTAO_VERSION=~3.5.0
|
||||
- CONTAO_VERSION=~3.5.1
|
||||
|
||||
sudo: false
|
||||
|
||||
@@ -26,6 +19,11 @@ install:
|
||||
|
||||
script: ant -keep-going
|
||||
|
||||
matrix:
|
||||
allow_failures:
|
||||
- php: "7.0"
|
||||
- php: "nightly"
|
||||
|
||||
# Hack to make things work again - we can not use a shallow repository.
|
||||
git:
|
||||
depth: 2147483647
|
||||
|
||||
16
README.md
16
README.md
@@ -17,15 +17,15 @@ Features
|
||||
|
||||
- Define Leaflet maps with multiple layers.
|
||||
- Manage map controls
|
||||
- [Layers control](http://leafletjs.com/reference.html#control-layers)
|
||||
- [Zoom control](http://leafletjs.com/reference.html#control-zoom)
|
||||
- [Scale control]((http://leafletjs.com/reference.html#control-scale))
|
||||
- [Attribution control](http://leafletjs.com/reference.html#control-attribution)
|
||||
- [Layers control](http://leafletjs.com/reference-1.0.0.html#control-layers)
|
||||
- [Zoom control](http://leafletjs.com/reference-1.0.0.html#control-zoom)
|
||||
- [Scale control]((http://leafletjs.com/reference-1.0.0.html#control-scale))
|
||||
- [Attribution control](http://leafletjs.com/reference-1.0.0.html#control-attribution)
|
||||
- [Loading control](https://github.com/ebrelsford/Leaflet.loading)
|
||||
- Manage layers
|
||||
- [Tile provider](https://github.com/leaflet-extras/leaflet-providers)
|
||||
- Markers - A set of [markers](http://leafletjs.com/reference.html#marker)
|
||||
- Vectors - A set of [vectors](http://leafletjs.com/reference.html)
|
||||
- Markers - A set of [markers](http://leafletjs.com/reference-1.0.0.html#marker)
|
||||
- Vectors - A set of [vectors](http://leafletjs.com/reference-1.0.0.html)
|
||||
- Groups - A group of layers
|
||||
- Reference - A link to another layer
|
||||
- Manage marker icons
|
||||
@@ -40,7 +40,7 @@ Install
|
||||
-------
|
||||
|
||||
```
|
||||
$ php composer.phar require netzmacht/contao-leaflet-maps:~1.0
|
||||
$ php composer.phar require netzmacht/contao-leaflet-maps:~2.0
|
||||
```
|
||||
|
||||
Credits
|
||||
@@ -53,5 +53,5 @@ The about icon is part of the [Web Blog Icons by SEM Labs](http://semlabs.co.uk/
|
||||
[CC BY 4.0](http://creativecommons.org/licenses/by/4.0/).
|
||||
|
||||
English translations when possible where copied from the used libraries. Mainly the
|
||||
[leaflet documentation](leafletjs.com/reference.html) is used.
|
||||
[leaflet documentation](http://leafletjs.com/reference-1.0.0.html) is used.
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -12,7 +12,7 @@ L.Contao = L.Class.extend({
|
||||
*
|
||||
* You are not allowed to remove or change it. Contact me if you want to buy an removal license.
|
||||
*/
|
||||
ATTRIBUTION: ' | <a href="http://contao-leaflet.netzmacht.de/" title="Leaflet extension for Contao CMS">netzmacht <em>creative</em></a>'
|
||||
ATTRIBUTION: ' | <a href="https://netzmacht.de/contao-leaflet" title="Powered by Leaflet extension for Contao CMS developed by netzmacht David Molineus">netzmacht</a>'
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -29,7 +29,7 @@ L.Contao = L.Class.extend({
|
||||
* Initialize Contao leaflet integration.
|
||||
*/
|
||||
initialize: function () {
|
||||
L.Icon.Default.imagePath = 'assets/leaflet/libs/leaflet/images';
|
||||
L.Icon.Default.imagePath = 'assets/leaflet/libs/leaflet/images/';
|
||||
|
||||
this.setGeoJsonListeners(L.GeoJSON);
|
||||
},
|
||||
@@ -89,7 +89,14 @@ L.Contao = L.Class.extend({
|
||||
*/
|
||||
loadIcons: function (icons) {
|
||||
for (var i = 0; i < icons.length; i++) {
|
||||
var icon = L[icons[i].type](icons[i].options);
|
||||
var icon;
|
||||
|
||||
if (icons[i].type === 'extraMarkers.icon') {
|
||||
icon = L.ExtraMarkers.icon(icons[i].options);
|
||||
} else {
|
||||
icon = L[icons[i].type](icons[i].options);
|
||||
}
|
||||
|
||||
this.addIcon(icons[i].id, icon);
|
||||
}
|
||||
},
|
||||
@@ -110,7 +117,7 @@ L.Contao = L.Class.extend({
|
||||
},
|
||||
|
||||
/**
|
||||
* Layer a url into a layer using omnivore.
|
||||
* Load data from an url into a layer using omnivore.
|
||||
*
|
||||
* @param hash The leaflet url hash.
|
||||
* @param type The response content format.
|
||||
@@ -126,7 +133,7 @@ L.Contao = L.Class.extend({
|
||||
// Required because Control.Loading tries to get _leafet_id which is created here.
|
||||
L.stamp(layer);
|
||||
|
||||
// Add listender for map bounds changes.
|
||||
// Add listener for map bounds changes.
|
||||
if (map.options.dynamicLoad && layer.options.boundsMode == 'fit') {
|
||||
layer.options.requestHash = hash;
|
||||
map.on('moveend', layer.refreshData, layer);
|
||||
|
||||
@@ -30,10 +30,31 @@ L.Map.include({
|
||||
}
|
||||
|
||||
if (this._dynamicBounds) {
|
||||
this.fitBounds(this._dynamicBounds);
|
||||
this.fitBounds(this._dynamicBounds, this.getBoundsOptions());
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Get the bounds optons
|
||||
* @returns {{}}
|
||||
*/
|
||||
getBoundsOptions: function () {
|
||||
options = {};
|
||||
|
||||
if (this.options.boundsPadding) {
|
||||
options.padding = this.options.boundsPadding;
|
||||
} else {
|
||||
if (this.options.boundsPaddingTopLeft) {
|
||||
options.paddingTopLeft = this.options.boundsPaddingTopLeft;
|
||||
}
|
||||
if (this.options.boundsPaddingBottomRight) {
|
||||
options.paddingBottomRight = this.options.boundsPaddingBottomRight;
|
||||
}
|
||||
}
|
||||
|
||||
return options;
|
||||
},
|
||||
|
||||
/**
|
||||
* Scan recursively for bounds in a layer and extend _dynamicBounds if any found.
|
||||
*
|
||||
|
||||
231
assets/maps/src/OverpassLayer.js
Normal file
231
assets/maps/src/OverpassLayer.js
Normal file
@@ -0,0 +1,231 @@
|
||||
/**
|
||||
* Get the bounds as overpass bbox string.
|
||||
*
|
||||
* @returns {string}
|
||||
*/
|
||||
L.LatLngBounds.prototype.toOverpassBBoxString = function () {
|
||||
var a = this._southWest,
|
||||
b = this._northEast;
|
||||
|
||||
return [a.lat, a.lng, b.lat, b.lng].join(",");
|
||||
};
|
||||
|
||||
/**
|
||||
* Implementation of the overpass layer. Heavily inspired by
|
||||
* https://github.com/kartenkarsten/leaflet-layer-overpass.
|
||||
*/
|
||||
L.OverPassLayer = L.FeatureGroup.extend({
|
||||
options: {
|
||||
minZoom: 0,
|
||||
endpoint: '//overpass-api.de/api/',
|
||||
query: '(node(BBOX)[organic];node(BBOX)[second_hand];);out qt;',
|
||||
amenityIcons: {}
|
||||
},
|
||||
/**
|
||||
* Initialize the layer.
|
||||
*
|
||||
* @param options
|
||||
*/
|
||||
initialize: function (options) {
|
||||
if (!options.pointToLayer) {
|
||||
options.pointToLayer = this.pointToLayer;
|
||||
}
|
||||
if (!options.onEachFeature) {
|
||||
options.onEachFeature = this.onEachFeature;
|
||||
}
|
||||
|
||||
L.Util.setOptions(this, options);
|
||||
this.options.dynamicLoad = this.options.query.match(/BBOX/g) ? true : false;
|
||||
|
||||
this._layer = L.geoJson();
|
||||
this._layers = {};
|
||||
|
||||
this.addLayer(this._layer);
|
||||
},
|
||||
/**
|
||||
* Refresh the data of the layer.
|
||||
*
|
||||
* TODO: Implement some caching.
|
||||
*/
|
||||
refreshData: function () {
|
||||
if (this._map.getZoom() < this.options.minZoom) {
|
||||
return;
|
||||
}
|
||||
|
||||
var bounds = this._map.getBounds().toOverpassBBoxString();
|
||||
var query = this.options.query.replace(/(BBOX)/g, bounds);
|
||||
var url = this.options.endpoint + "interpreter?data=[out:json];" + query;
|
||||
|
||||
this._map.fire('dataloading', {layer: this});
|
||||
|
||||
this.request(url, function (error, response) {
|
||||
var data = JSON.parse(response.response);
|
||||
var features = osmtogeojson(data);
|
||||
var layer = L.geoJson(features, {
|
||||
pointToLayer: this.options.pointToLayer.bind(this),
|
||||
onEachFeature: this.options.onEachFeature.bind(this)
|
||||
});
|
||||
|
||||
this.addLayer(layer);
|
||||
this.removeLayer(this._layer);
|
||||
this._layer = layer;
|
||||
|
||||
if (this.options.boundsMode === 'extend' && layer.getBounds().isValid()) {
|
||||
var bounds = this._map.getBounds();
|
||||
bounds = bounds.extend(layer.getBounds());
|
||||
|
||||
this._map.fitBounds(bounds, this._map.getBoundsOptions());
|
||||
}
|
||||
|
||||
this._map.fire('dataload', {layer: this});
|
||||
}.bind(this));
|
||||
},
|
||||
/**
|
||||
* @param map
|
||||
*/
|
||||
onAdd: function (map) {
|
||||
if (this.options.boundsMode === 'fit' && this.options.dynamicLoad) {
|
||||
map.on('moveend', this.refreshData, this);
|
||||
}
|
||||
|
||||
this.refreshData();
|
||||
},
|
||||
pointToLayer: function (feature, latlng) {
|
||||
var type = 'marker';
|
||||
var icon = null;
|
||||
var marker = L.marker(latlng, feature.properties.options);
|
||||
|
||||
if (feature.properties) {
|
||||
if (feature.properties.radius) {
|
||||
marker.setRadius(feature.properties.radius);
|
||||
}
|
||||
|
||||
if (feature.properties.icon) {
|
||||
icon = this._map.getIcon(feature.properties.icon);
|
||||
|
||||
} else if (feature.properties.tags
|
||||
&& feature.properties.tags.amenity
|
||||
&& this.options.amenityIcons[feature.properties.tags.amenity]
|
||||
) {
|
||||
icon = L.contao.getIcon(this.options.amenityIcons[feature.properties.tags.amenity]);
|
||||
}
|
||||
|
||||
if (icon) {
|
||||
marker.setIcon(icon);
|
||||
}
|
||||
}
|
||||
|
||||
if (this.options.overpassPopup) {
|
||||
marker.bindPopup(this.options.overpassPopup(feature, marker));
|
||||
}
|
||||
|
||||
this._map.fire('point:added', {marker: marker, feature: feature, latlng: latlng, type: type});
|
||||
|
||||
return marker;
|
||||
},
|
||||
onEachFeature: function (feature, layer) {
|
||||
if (feature.properties) {
|
||||
L.Util.setOptions(layer, feature.properties.options);
|
||||
|
||||
if (this.options.overpassPopup) {
|
||||
layer.bindPopup(this.options.overpassPopup(feature, layer));
|
||||
}
|
||||
|
||||
this._map.fire('feature:added', {feature: feature, layer: layer});
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Make an ajax request. Clone of corslite from MapQuest.
|
||||
*/
|
||||
request: function (url, callback, cors) {
|
||||
var sent = false;
|
||||
|
||||
if (typeof window.XMLHttpRequest === 'undefined') {
|
||||
return callback(Error('Browser not supported'));
|
||||
}
|
||||
|
||||
if (typeof cors === 'undefined') {
|
||||
var m = url.match(/^\s*https?:\/\/[^\/]*/);
|
||||
cors = m && (m[0] !== location.protocol + '//' + location.hostname +
|
||||
(location.port ? ':' + location.port : ''));
|
||||
}
|
||||
|
||||
var x = new window.XMLHttpRequest();
|
||||
|
||||
function isSuccessful(status) {
|
||||
return status >= 200 && status < 300 || status === 304;
|
||||
}
|
||||
|
||||
if (cors && !('withCredentials' in x)) {
|
||||
// IE8-9
|
||||
x = new window.XDomainRequest();
|
||||
|
||||
// Ensure callback is never called synchronously, i.e., before
|
||||
// x.send() returns (this has been observed in the wild).
|
||||
// See https://github.com/mapbox/mapbox.js/issues/472
|
||||
var original = callback;
|
||||
callback = function() {
|
||||
if (sent) {
|
||||
original.apply(this, arguments);
|
||||
} else {
|
||||
var that = this, args = arguments;
|
||||
setTimeout(function() {
|
||||
original.apply(that, args);
|
||||
}, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function loaded() {
|
||||
if (
|
||||
// XDomainRequest
|
||||
x.status === undefined ||
|
||||
// modern browsers
|
||||
isSuccessful(x.status)) callback.call(x, null, x);
|
||||
else callback.call(x, x, null);
|
||||
}
|
||||
|
||||
// Both `onreadystatechange` and `onload` can fire. `onreadystatechange`
|
||||
// has [been supported for longer](http://stackoverflow.com/a/9181508/229001).
|
||||
if ('onload' in x) {
|
||||
x.onload = loaded;
|
||||
} else {
|
||||
x.onreadystatechange = function readystate() {
|
||||
if (x.readyState === 4) {
|
||||
loaded();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// Call the callback with the XMLHttpRequest object as an error and prevent
|
||||
// it from ever being called again by reassigning it to `noop`
|
||||
x.onerror = function error(evt) {
|
||||
// XDomainRequest provides no evt parameter
|
||||
callback.call(this, evt || true, null);
|
||||
callback = function() { };
|
||||
};
|
||||
|
||||
// IE9 must have onprogress be set to a unique function.
|
||||
x.onprogress = function() { };
|
||||
|
||||
x.ontimeout = function(evt) {
|
||||
callback.call(this, evt, null);
|
||||
callback = function() { };
|
||||
};
|
||||
|
||||
x.onabort = function(evt) {
|
||||
callback.call(this, evt, null);
|
||||
callback = function() { };
|
||||
};
|
||||
|
||||
// GET is the only supported HTTP Verb by XDomainRequest and is the
|
||||
// only one supported here.
|
||||
x.open('GET', url, true);
|
||||
|
||||
// Send the request. Sending data is not supported.
|
||||
x.send(null);
|
||||
sent = true;
|
||||
|
||||
return x;
|
||||
}
|
||||
});
|
||||
@@ -19,23 +19,23 @@
|
||||
},
|
||||
"require":{
|
||||
"php":">=5.4",
|
||||
"contao/core":">=3.2,<3.6-dev",
|
||||
"contao-community-alliance/dependency-container":"~1.0",
|
||||
"contao-community-alliance/event-dispatcher":"~1.0",
|
||||
"netzmacht/contao-leaflet-libraries": "~0.7",
|
||||
"netzmacht/php-javascript-builder": "~1.0",
|
||||
"netzmacht/php-leaflet": "~0.7",
|
||||
"netzmacht/contao-toolkit":"~1.0",
|
||||
"contao-community-alliance/meta-palettes": "~1.5",
|
||||
"menatwork/contao-multicolumnwizard": "~3.2",
|
||||
"doctrine/cache": "~1.0"
|
||||
"contao/core":"^3.5",
|
||||
"contao-community-alliance/dependency-container":"^1.0",
|
||||
"contao-community-alliance/event-dispatcher":"^1.0",
|
||||
"netzmacht/contao-leaflet-libraries": "^1.0",
|
||||
"netzmacht/php-javascript-builder": "^1.0",
|
||||
"netzmacht/php-leaflet": "^1.0",
|
||||
"netzmacht/contao-toolkit":"^2.0",
|
||||
"contao-community-alliance/meta-palettes": "^1.5",
|
||||
"menatwork/contao-multicolumnwizard": "^3.2",
|
||||
"doctrine/cache": "^1.0"
|
||||
},
|
||||
"require-dev":{
|
||||
"netzmacht/contao-build-tools": "~1.1"
|
||||
"netzmacht/contao-build-tools": "^1.1"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"Netzmacht\\Contao\\Leaflet": "src/"
|
||||
"Netzmacht\\Contao\\Leaflet\\": "src/"
|
||||
}
|
||||
},
|
||||
"config": {
|
||||
@@ -45,7 +45,9 @@
|
||||
"minimum-stability": "dev",
|
||||
"extra":{
|
||||
"branch-alias": {
|
||||
"dev-master": "1.0.x-dev"
|
||||
"dev-master": "2.0.x-dev",
|
||||
"dev-develop": "2.1.x-dev",
|
||||
"dev-support/0.7.x": "0.7.x-dev"
|
||||
},
|
||||
"contao": {
|
||||
"sources":{
|
||||
|
||||
@@ -9,8 +9,8 @@ var paths = {
|
||||
dest: 'assets/maps'
|
||||
};
|
||||
|
||||
gulp.task('clear', function(cb) {
|
||||
del([paths.dest + '/' + paths.minified], cb);
|
||||
gulp.task('clear', function() {
|
||||
del([paths.dest + '/' + paths.minified]);
|
||||
});
|
||||
|
||||
gulp.task('scripts', ['clear'], function() {
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 3.1 KiB |
BIN
module/assets/img/overpass.png
Normal file
BIN
module/assets/img/overpass.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 780 B |
1
module/config/autoload.ini
Normal file
1
module/config/autoload.ini
Normal file
@@ -0,0 +1 @@
|
||||
requires[] = 'toolkit'
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2014 netzmacht creative David Molineus
|
||||
* @copyright 2014-2016 netzmacht David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2014 netzmacht creative David Molineus
|
||||
* @copyright 2014-2016 netzmacht David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
@@ -56,13 +56,13 @@ array_insert(
|
||||
/*
|
||||
* Content elements.
|
||||
*/
|
||||
$GLOBALS['TL_CTE']['includes']['leaflet'] = 'Netzmacht\Contao\Leaflet\Frontend\MapElement';
|
||||
$GLOBALS['TL_CTE']['includes']['leaflet'] = 'Netzmacht\Contao\Toolkit\Component\ContentElement\ContentElementDecorator';
|
||||
|
||||
|
||||
/*
|
||||
* Frontend modules
|
||||
*/
|
||||
$GLOBALS['FE_MOD']['includes']['leaflet'] = 'Netzmacht\Contao\Leaflet\Frontend\MapModule';
|
||||
$GLOBALS['FE_MOD']['includes']['leaflet'] = 'Netzmacht\Contao\Toolkit\Component\Module\ModuleDecorator';
|
||||
|
||||
|
||||
/*
|
||||
@@ -88,12 +88,22 @@ $GLOBALS['LEAFLET_MAPPERS'][] = 'Netzmacht\Contao\Leaflet\Mapper\MapMapper';
|
||||
|
||||
// Layer mappers.
|
||||
$GLOBALS['LEAFLET_MAPPERS'][] = 'Netzmacht\Contao\Leaflet\Mapper\Layer\TileLayerMapper';
|
||||
$GLOBALS['LEAFLET_MAPPERS'][] = 'Netzmacht\Contao\Leaflet\Mapper\Layer\ProviderLayerMapper';
|
||||
$GLOBALS['LEAFLET_MAPPERS'][] = function () {
|
||||
return new \Netzmacht\Contao\Leaflet\Mapper\Layer\ProviderLayerMapper(
|
||||
$GLOBALS['LEAFLET_TILE_PROVIDERS']
|
||||
);
|
||||
};
|
||||
|
||||
$GLOBALS['LEAFLET_MAPPERS'][] = 'Netzmacht\Contao\Leaflet\Mapper\Layer\MarkersLayerMapper';
|
||||
$GLOBALS['LEAFLET_MAPPERS'][] = 'Netzmacht\Contao\Leaflet\Mapper\Layer\GroupLayerMapper';
|
||||
$GLOBALS['LEAFLET_MAPPERS'][] = 'Netzmacht\Contao\Leaflet\Mapper\Layer\VectorsLayerMapper';
|
||||
$GLOBALS['LEAFLET_MAPPERS'][] = 'Netzmacht\Contao\Leaflet\Mapper\Layer\ReferenceLayerMapper';
|
||||
$GLOBALS['LEAFLET_MAPPERS'][] = 'Netzmacht\Contao\Leaflet\Mapper\Layer\MarkerClusterLayerMapper';
|
||||
$GLOBALS['LEAFLET_MAPPERS'][] = 'Netzmacht\Contao\Leaflet\Mapper\Layer\OverpassLayerMapper';
|
||||
$GLOBALS['LEAFLET_MAPPERS'][] = function () {
|
||||
return new \Netzmacht\Contao\Leaflet\Mapper\Layer\MarkerClusterLayerMapper(
|
||||
$GLOBALS['container'][\Netzmacht\Contao\Leaflet\DependencyInjection\LeafletServices::MAP_ASSETS]
|
||||
);
|
||||
};
|
||||
|
||||
// Control mappers.
|
||||
$GLOBALS['LEAFLET_MAPPERS'][] = 'Netzmacht\Contao\Leaflet\Mapper\Control\ZoomControlMapper';
|
||||
@@ -104,35 +114,52 @@ $GLOBALS['LEAFLET_MAPPERS'][] = 'Netzmacht\Contao\Leaflet\Mapper\Control\Loading
|
||||
$GLOBALS['LEAFLET_MAPPERS'][] = 'Netzmacht\Contao\Leaflet\Mapper\Control\FullscreenControlMapper';
|
||||
|
||||
// Vector mappers.
|
||||
$GLOBALS['LEAFLET_MAPPERS'][] = function (\Netzmacht\Contao\Leaflet\ServiceContainer $container) {
|
||||
return new Netzmacht\Contao\Leaflet\Mapper\Vector\PolylineMapper($container->getFrontendValueFilter());
|
||||
$GLOBALS['LEAFLET_MAPPERS'][] = function () {
|
||||
return new Netzmacht\Contao\Leaflet\Mapper\Vector\PolylineMapper(
|
||||
$GLOBALS['container'][\Netzmacht\Contao\Leaflet\DependencyInjection\LeafletServices::FRONTEND_VALUE_FILTER]
|
||||
);
|
||||
};
|
||||
$GLOBALS['LEAFLET_MAPPERS'][] = function (\Netzmacht\Contao\Leaflet\ServiceContainer $container) {
|
||||
return new Netzmacht\Contao\Leaflet\Mapper\Vector\MultiPolylineMapper($container->getFrontendValueFilter());
|
||||
$GLOBALS['LEAFLET_MAPPERS'][] = function () {
|
||||
return new Netzmacht\Contao\Leaflet\Mapper\Vector\MultiPolylineMapper(
|
||||
$GLOBALS['container'][\Netzmacht\Contao\Leaflet\DependencyInjection\LeafletServices::FRONTEND_VALUE_FILTER]
|
||||
);
|
||||
};
|
||||
$GLOBALS['LEAFLET_MAPPERS'][] = function (\Netzmacht\Contao\Leaflet\ServiceContainer $container) {
|
||||
return new Netzmacht\Contao\Leaflet\Mapper\Vector\PolygonMapper($container->getFrontendValueFilter());
|
||||
$GLOBALS['LEAFLET_MAPPERS'][] = function () {
|
||||
return new Netzmacht\Contao\Leaflet\Mapper\Vector\PolygonMapper(
|
||||
$GLOBALS['container'][\Netzmacht\Contao\Leaflet\DependencyInjection\LeafletServices::FRONTEND_VALUE_FILTER]
|
||||
);
|
||||
};
|
||||
$GLOBALS['LEAFLET_MAPPERS'][] = function (\Netzmacht\Contao\Leaflet\ServiceContainer $container) {
|
||||
return new Netzmacht\Contao\Leaflet\Mapper\Vector\MultiPolygonMapper($container->getFrontendValueFilter());
|
||||
$GLOBALS['LEAFLET_MAPPERS'][] = function () {
|
||||
return new Netzmacht\Contao\Leaflet\Mapper\Vector\MultiPolygonMapper(
|
||||
$GLOBALS['container'][\Netzmacht\Contao\Leaflet\DependencyInjection\LeafletServices::FRONTEND_VALUE_FILTER]
|
||||
);
|
||||
};
|
||||
$GLOBALS['LEAFLET_MAPPERS'][] = function (\Netzmacht\Contao\Leaflet\ServiceContainer $container) {
|
||||
return new Netzmacht\Contao\Leaflet\Mapper\Vector\CircleMapper($container->getFrontendValueFilter());
|
||||
$GLOBALS['LEAFLET_MAPPERS'][] = function () {
|
||||
return new Netzmacht\Contao\Leaflet\Mapper\Vector\CircleMapper(
|
||||
$GLOBALS['container'][\Netzmacht\Contao\Leaflet\DependencyInjection\LeafletServices::FRONTEND_VALUE_FILTER]
|
||||
);
|
||||
};
|
||||
$GLOBALS['LEAFLET_MAPPERS'][] = function (\Netzmacht\Contao\Leaflet\ServiceContainer $container) {
|
||||
return new Netzmacht\Contao\Leaflet\Mapper\Vector\CircleMarkerMapper($container->getFrontendValueFilter());
|
||||
$GLOBALS['LEAFLET_MAPPERS'][] = function () {
|
||||
return new Netzmacht\Contao\Leaflet\Mapper\Vector\CircleMarkerMapper(
|
||||
$GLOBALS['container'][\Netzmacht\Contao\Leaflet\DependencyInjection\LeafletServices::FRONTEND_VALUE_FILTER]
|
||||
);
|
||||
};
|
||||
$GLOBALS['LEAFLET_MAPPERS'][] = function (\Netzmacht\Contao\Leaflet\ServiceContainer $container) {
|
||||
return new Netzmacht\Contao\Leaflet\Mapper\Vector\RectangleMapper($container->getFrontendValueFilter());
|
||||
$GLOBALS['LEAFLET_MAPPERS'][] = function () {
|
||||
return new Netzmacht\Contao\Leaflet\Mapper\Vector\RectangleMapper(
|
||||
$GLOBALS['container'][\Netzmacht\Contao\Leaflet\DependencyInjection\LeafletServices::FRONTEND_VALUE_FILTER]
|
||||
);
|
||||
};
|
||||
|
||||
// Miscellaneous mappers.
|
||||
$GLOBALS['LEAFLET_MAPPERS'][] = 'Netzmacht\Contao\Leaflet\Mapper\UI\PopupMapper';
|
||||
$GLOBALS['LEAFLET_MAPPERS'][] = 'Netzmacht\Contao\Leaflet\Mapper\Type\ImageIconMapper';
|
||||
$GLOBALS['LEAFLET_MAPPERS'][] = 'Netzmacht\Contao\Leaflet\Mapper\Type\DivIconMapper';
|
||||
$GLOBALS['LEAFLET_MAPPERS'][] = 'Netzmacht\Contao\Leaflet\Mapper\Type\ExtraMarkersIconMapper';
|
||||
$GLOBALS['LEAFLET_MAPPERS'][] = 'Netzmacht\Contao\Leaflet\Mapper\Style\FixedStyleMapper';
|
||||
$GLOBALS['LEAFLET_MAPPERS'][] = function (\Netzmacht\Contao\Leaflet\ServiceContainer $container) {
|
||||
return new \Netzmacht\Contao\Leaflet\Mapper\UI\MarkerMapper($container->getFrontendValueFilter());
|
||||
$GLOBALS['LEAFLET_MAPPERS'][] = function () {
|
||||
return new \Netzmacht\Contao\Leaflet\Mapper\UI\MarkerMapper(
|
||||
$GLOBALS['container'][\Netzmacht\Contao\Leaflet\DependencyInjection\LeafletServices::FRONTEND_VALUE_FILTER]
|
||||
);
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -245,6 +272,21 @@ $GLOBALS['LEAFLET_LAYERS'] = array
|
||||
'children' => false,
|
||||
'icon' => 'system/modules/leaflet/assets/img/tile.png',
|
||||
),
|
||||
'overpass' => array(
|
||||
'children' => false,
|
||||
'icon' => 'system/modules/leaflet/assets/img/overpass.png',
|
||||
'label' => function ($row, $label) {
|
||||
if ($row['overpassQuery']) {
|
||||
$label .= '<span class="tl_gray"> ' . \StringUtil::substr($row['overpassQuery'], 50) . '</span>';
|
||||
}
|
||||
|
||||
return $label;
|
||||
},
|
||||
'boundsMode' => array(
|
||||
'extend' => true,
|
||||
'fit' => true,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
/*
|
||||
@@ -260,7 +302,7 @@ $GLOBALS['LEAFLET_CONTROLS'] = array('zoom', 'layers', 'scale', 'attribution',
|
||||
*
|
||||
* Supported leaflet icon types. Register you type for the database driven definition here.
|
||||
*/
|
||||
$GLOBALS['LEAFLET_ICONS'] = array('image', 'div');
|
||||
$GLOBALS['LEAFLET_ICONS'] = array('image', 'div', 'extra');
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2014 netzmacht creative David Molineus
|
||||
* @copyright 2014-2016 netzmacht David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
*/
|
||||
return array(
|
||||
'Netzmacht\Contao\Leaflet\Subscriber\BootSubscriber',
|
||||
$GLOBALS['container']['leaflet.boot.subscriber'],
|
||||
'Netzmacht\Contao\Leaflet\Subscriber\HashSubscriber',
|
||||
'Netzmacht\Contao\Leaflet\Subscriber\GeoJsonSubscriber',
|
||||
$GLOBALS['container']['leaflet.subscriber.geo-json'],
|
||||
);
|
||||
|
||||
213
module/config/leaflet_amenities.php
Normal file
213
module/config/leaflet_amenities.php
Normal file
@@ -0,0 +1,213 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2014-2016 netzmacht David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
*/
|
||||
|
||||
return [
|
||||
'administration',
|
||||
'advertising',
|
||||
'alm',
|
||||
'animal_boarding',
|
||||
'animal_breeding',
|
||||
'animal_shelter',
|
||||
'architect_office',
|
||||
'arts_centre',
|
||||
'artwork',
|
||||
'atm',
|
||||
'audiologist',
|
||||
'baby_hatch',
|
||||
'bank',
|
||||
'bar',
|
||||
'bbq',
|
||||
'bench',
|
||||
'bicycle_parking',
|
||||
'bicycle_rental',
|
||||
'bicycle_repair_station',
|
||||
'bicycle_trailer_sharing',
|
||||
'biergarten',
|
||||
'bikeshed',
|
||||
'boat_rental',
|
||||
'boat_sharing',
|
||||
'boat_storage',
|
||||
'brothel',
|
||||
'bts',
|
||||
'bureau_de_change',
|
||||
'bus_station',
|
||||
'cafe',
|
||||
'canoe_hire',
|
||||
'car_rental',
|
||||
'car_repair',
|
||||
'car_sharing',
|
||||
'car_wash',
|
||||
'casino',
|
||||
'charging_station',
|
||||
'childcare',
|
||||
'cinema',
|
||||
'citymap_post',
|
||||
'clinic',
|
||||
'clock',
|
||||
'club',
|
||||
'coast_guard',
|
||||
'coast_radar_station',
|
||||
'college',
|
||||
'community_center',
|
||||
'community_centre',
|
||||
'compressed_air',
|
||||
'concert_hall',
|
||||
'conference_centre',
|
||||
'courthouse',
|
||||
'coworking_space',
|
||||
'crematorium',
|
||||
'crucifix',
|
||||
'crypt',
|
||||
'customs',
|
||||
'dancing_school',
|
||||
'dead_pub',
|
||||
'dentist',
|
||||
'disused',
|
||||
'dive_centre',
|
||||
'doctors',
|
||||
'dog_bin',
|
||||
'dog_waste_bin',
|
||||
'dojo',
|
||||
'drinking_water',
|
||||
'_driving_school',
|
||||
'education',
|
||||
'embassy',
|
||||
'emergency_phone',
|
||||
'emergency_service',
|
||||
'events_venue',
|
||||
'ev_charging',
|
||||
'exhibition_centre',
|
||||
'fast_food',
|
||||
'ferry_terminal',
|
||||
'festival_grounds',
|
||||
'financial_advice',
|
||||
'fire_hydrant',
|
||||
'fire_station',
|
||||
'first_aid',
|
||||
'fish_spa',
|
||||
'food_court',
|
||||
'fountain',
|
||||
'fuel',
|
||||
'gambling',
|
||||
'game_feeding',
|
||||
'garages',
|
||||
'grave_yard',
|
||||
'grit_bin',
|
||||
'harbourmaster',
|
||||
'hospice',
|
||||
'hospital',
|
||||
'hotel',
|
||||
'hunting_stand',
|
||||
'ice_cream',
|
||||
'internet_cafe',
|
||||
'jobcentre',
|
||||
'kindergarten',
|
||||
'kiosk',
|
||||
'kitchen',
|
||||
'Kneippbecken',
|
||||
'kneipp_water_cure',
|
||||
'language_school',
|
||||
'lavoir',
|
||||
'library',
|
||||
'lifeboat_station',
|
||||
'life_ring',
|
||||
'loading_dock',
|
||||
'love_hotel',
|
||||
'marae',
|
||||
'marketplace',
|
||||
'milk_dispenser',
|
||||
'mobile_library',
|
||||
'monastery',
|
||||
'money_transfer',
|
||||
'mortuary',
|
||||
'motorcycle_parking',
|
||||
'motorcycle_rental',
|
||||
'music_school',
|
||||
'music_venue',
|
||||
'nameplate',
|
||||
'nightclub',
|
||||
'nursery',
|
||||
'nursing_home',
|
||||
'park',
|
||||
'parking',
|
||||
'parking_entrance',
|
||||
'parking_space',
|
||||
'pharmacy',
|
||||
'photo_booth',
|
||||
'place_of_worship',
|
||||
'planetarium',
|
||||
'police',
|
||||
'post_box',
|
||||
'post_office',
|
||||
'preschool',
|
||||
'printer',
|
||||
'prison',
|
||||
'prison_camp',
|
||||
'proposed',
|
||||
'pub',
|
||||
'public_bath',
|
||||
'public_bookcase',
|
||||
'public_building',
|
||||
'public_hall',
|
||||
'ranger_station',
|
||||
'recycling',
|
||||
'refugee_housing',
|
||||
'register_office',
|
||||
'rescue_box',
|
||||
'rescue_station',
|
||||
'research_institute',
|
||||
'restaurant',
|
||||
'retirement_home',
|
||||
'sanatorium',
|
||||
'sanitary_dump_station',
|
||||
'sauna',
|
||||
'school',
|
||||
'scout_hut',
|
||||
'shelter',
|
||||
'shop',
|
||||
'shower',
|
||||
'ski_school',
|
||||
'smoking_area',
|
||||
'social_centre',
|
||||
'social_facility',
|
||||
'spa',
|
||||
'stables',
|
||||
'stripclub',
|
||||
'studio',
|
||||
'swimming_pool',
|
||||
'swingerclub',
|
||||
'table',
|
||||
'taxi',
|
||||
'telephone',
|
||||
'theatre',
|
||||
'ticket_booth',
|
||||
'ticket_validator',
|
||||
'toilets',
|
||||
'townhall',
|
||||
'trolley_bay',
|
||||
'university',
|
||||
'vacuum_cleaner',
|
||||
'vehicle_inspection',
|
||||
'vending_machine',
|
||||
'veterinary',
|
||||
'vivarium',
|
||||
'wash_center',
|
||||
'waste_basket',
|
||||
'waste_disposal',
|
||||
'waste_transfer_station',
|
||||
'water',
|
||||
'watering_place',
|
||||
'water_point',
|
||||
'weighbridge',
|
||||
'winery',
|
||||
'yacht_club',
|
||||
'youth_centre',
|
||||
];
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2014 netzmacht creative David Molineus
|
||||
* @copyright 2014-2016 netzmacht David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
@@ -18,7 +18,7 @@ $GLOBALS['LEAFLET_TILE_PROVIDERS'] = array
|
||||
(
|
||||
'OpenStreetMap' => array
|
||||
(
|
||||
'variants' => array('Mapnik', 'BlackAndWhite', 'DE', 'France', 'HOT'),
|
||||
'variants' => array('Mapnik', 'BlackAndWhite', 'DE', 'France', 'HOT', 'BZH'),
|
||||
),
|
||||
'OpenSeaMap' => array(),
|
||||
'OpenTopoMap' => array(),
|
||||
@@ -123,6 +123,19 @@ $GLOBALS['LEAFLET_TILE_PROVIDERS'] = array
|
||||
'fields' => array('tile_provider_key', 'tile_provider_code'),
|
||||
'class' => 'Netzmacht\LeafletPHP\Plugins\LeafletProviders\HereProvider',
|
||||
),
|
||||
'JusticeMap' => array(
|
||||
'variants' => array(
|
||||
'income',
|
||||
'americanIndian',
|
||||
'asian',
|
||||
'black',
|
||||
'hispanic',
|
||||
'multi',
|
||||
'nonWhite',
|
||||
'white',
|
||||
'plurality'
|
||||
)
|
||||
),
|
||||
'FreeMapSK' => array(),
|
||||
'MtbMap' => array(),
|
||||
'CartoDB' => array(
|
||||
@@ -150,6 +163,9 @@ $GLOBALS['LEAFLET_TILE_PROVIDERS'] = array
|
||||
'orthofoto',
|
||||
)
|
||||
),
|
||||
'nlmaps' => array(
|
||||
'variants' => array('standaard', 'pastel', 'grijs', 'luchtfoto')
|
||||
),
|
||||
'NASAGIBS' => array(
|
||||
'variants' => array(
|
||||
'ModisTerraTrueColorCR',
|
||||
|
||||
@@ -1,23 +1,42 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2014 netzmacht creative David Molineus
|
||||
* @copyright 2014-2016 netzmacht David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
*/
|
||||
|
||||
use Doctrine\Common\Cache\ArrayCache;
|
||||
use Doctrine\Common\Cache\FilesystemCache;
|
||||
use Interop\Container\ContainerInterface;
|
||||
use Netzmacht\Contao\Leaflet\Alias\DefaultAliasFilter;
|
||||
use Netzmacht\Contao\Leaflet\Boot;
|
||||
use Netzmacht\Contao\Leaflet\ContaoAssets;
|
||||
use Netzmacht\Contao\Leaflet\Frontend\Helper\InsertTagReplacer;
|
||||
use Netzmacht\Contao\Leaflet\Dca\ControlCallbacks;
|
||||
use Netzmacht\Contao\Leaflet\Dca\FrontendIntegration;
|
||||
use Netzmacht\Contao\Leaflet\Dca\LayerCallbacks;
|
||||
use Netzmacht\Contao\Leaflet\Dca\LeafletCallbacks;
|
||||
use Netzmacht\Contao\Leaflet\Dca\MapCallbacks;
|
||||
use Netzmacht\Contao\Leaflet\Dca\Validator;
|
||||
use Netzmacht\Contao\Leaflet\Dca\VectorCallbacks;
|
||||
use Netzmacht\Contao\Leaflet\DependencyInjection\LeafletServices;
|
||||
use Netzmacht\Contao\Leaflet\Frontend\MapElement;
|
||||
use Netzmacht\Contao\Leaflet\Frontend\MapModule;
|
||||
use Netzmacht\Contao\Leaflet\Frontend\ValueFilter;
|
||||
use Netzmacht\Contao\Leaflet\Mapper\DefinitionMapper;
|
||||
use Netzmacht\Contao\Leaflet\MapService;
|
||||
use Netzmacht\Contao\Leaflet\ServiceContainer;
|
||||
use Netzmacht\Contao\Leaflet\MapProvider;
|
||||
use Netzmacht\Contao\Leaflet\Subscriber\BootSubscriber;
|
||||
use Netzmacht\Contao\Leaflet\Subscriber\GeoJsonSubscriber;
|
||||
use Netzmacht\Contao\Toolkit\Data\Alias\Filter\ExistingAliasFilter;
|
||||
use Netzmacht\Contao\Toolkit\Data\Alias\Filter\SlugifyFilter;
|
||||
use Netzmacht\Contao\Toolkit\Data\Alias\Filter\SuffixFilter;
|
||||
use Netzmacht\Contao\Toolkit\Data\Alias\FilterBasedAliasGenerator;
|
||||
use Netzmacht\Contao\Toolkit\Data\Alias\Validator\UniqueDatabaseValueValidator;
|
||||
use Netzmacht\Contao\Toolkit\DependencyInjection\Services;
|
||||
use Netzmacht\JavascriptBuilder\Builder;
|
||||
use Netzmacht\JavascriptBuilder\Encoder;
|
||||
use Netzmacht\JavascriptBuilder\Encoder\ChainEncoder;
|
||||
use Netzmacht\JavascriptBuilder\Encoder\JavascriptEncoder;
|
||||
use Netzmacht\JavascriptBuilder\Encoder\MultipleObjectsEncoder;
|
||||
@@ -31,40 +50,52 @@ use Symfony\Component\EventDispatcher\EventDispatcher;
|
||||
global $container;
|
||||
|
||||
/*
|
||||
* Leaflet map service is a simply api entry to to get the leaflet map from the database.
|
||||
* Leaflet map provider is a simply api entry to to get the leaflet map from the database.
|
||||
*/
|
||||
$container['leaflet.map.service'] = $container->share(function ($container) {
|
||||
return new MapService(
|
||||
$container['leaflet.definition.mapper'],
|
||||
$container['leaflet.definition.builder'],
|
||||
$container['event-dispatcher'],
|
||||
$container['input'],
|
||||
$container['leaflet.map.assets']
|
||||
$container[LeafletServices::MAP_PROVIDER] = $container->share(function ($container) {
|
||||
return new MapProvider(
|
||||
$container[LeafletServices::DEFINITION_MAPPER],
|
||||
$container[LeafletServices::DEFINITION_BUILDER],
|
||||
$container[Services::EVENT_DISPATCHER],
|
||||
$container[Services::INPUT],
|
||||
$container[LeafletServices::MAP_ASSETS],
|
||||
$container[LeafletServices::CACHE],
|
||||
$GLOBALS['LEAFLET_FILTERS'],
|
||||
\Config::get('debugMode') || \Config::get('displayErrors')
|
||||
);
|
||||
});
|
||||
|
||||
/*
|
||||
* Contao assets handler. Loads Leaflet assets as contao (static) assets.
|
||||
*/
|
||||
$container['leaflet.map.assets'] = $container->share(function () {
|
||||
return new ContaoAssets();
|
||||
$container[LeafletServices::MAP_ASSETS] = $container->share(function ($container) {
|
||||
return new ContaoAssets($container[Services::ASSETS_MANAGER]);
|
||||
});
|
||||
|
||||
/*
|
||||
* The leaflet boot.
|
||||
*/
|
||||
$container['leaflet.boot'] = $container->share(function ($container) {
|
||||
return new Boot($container['event-dispatcher']);
|
||||
$container[LeafletServices::BOOT] = $container->share(function ($container) {
|
||||
return new Boot($container[Services::EVENT_DISPATCHER]);
|
||||
});
|
||||
|
||||
$container['leaflet.boot.subscriber'] = $container->share(function ($container) {
|
||||
return new BootSubscriber(
|
||||
$container[LeafletServices::MAP_ASSETS],
|
||||
$GLOBALS['LEAFLET_MAPPERS'],
|
||||
$GLOBALS['LEAFLET_ENCODERS'],
|
||||
$GLOBALS['LEAFLET_LIBRARIES']
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
/*
|
||||
* The definition mapper.
|
||||
*/
|
||||
$container['leaflet.definition.mapper'] = $container->share(function ($container) {
|
||||
$container[LeafletServices::DEFINITION_MAPPER] = $container->share(function ($container) {
|
||||
/** @var Boot $boot */
|
||||
$boot = $container['leaflet.boot'];
|
||||
$mapper = new DefinitionMapper($container['event-dispatcher']);
|
||||
$boot = $container[LeafletServices::BOOT];
|
||||
$mapper = new DefinitionMapper($container[Services::EVENT_DISPATCHER]);
|
||||
|
||||
return $boot->initializeDefinitionMapper($mapper);
|
||||
});
|
||||
@@ -73,9 +104,9 @@ $container['leaflet.definition.mapper'] = $container->share(function ($container
|
||||
/*
|
||||
* The local event dispatcher is used for the leaflet javascript encoding system.
|
||||
*/
|
||||
$container['leaflet.definition.builder.event-dispatcher'] = $container->share(function ($container) {
|
||||
$container[LeafletServices::DEFINITION_BUILDER_EVENT_DISPATCHER] = $container->share(function ($container) {
|
||||
/** @var Boot $boot */
|
||||
$boot = $container['leaflet.boot'];
|
||||
$boot = $container[LeafletServices::BOOT];
|
||||
$dispatcher = new EventDispatcher();
|
||||
|
||||
return $boot->initializeEventDispatcher($dispatcher);
|
||||
@@ -84,8 +115,8 @@ $container['leaflet.definition.builder.event-dispatcher'] = $container->share(fu
|
||||
/*
|
||||
* The javascript encoder factory being used for building the map javascript.
|
||||
*/
|
||||
$container['leaflet.definition.builder.encoder-factory'] = function ($container) {
|
||||
$dispatcher = $container['leaflet.definition.builder.event-dispatcher'];
|
||||
$container[LeafletServices::DEFINITION_ENCODER_FACTORY] = function ($container) {
|
||||
$dispatcher = $container[LeafletServices::DEFINITION_BUILDER_EVENT_DISPATCHER];
|
||||
|
||||
return function (Output $output) use ($dispatcher) {
|
||||
$encoder = new ChainEncoder();
|
||||
@@ -101,11 +132,11 @@ $container['leaflet.definition.builder.encoder-factory'] = function ($container)
|
||||
/*
|
||||
* The leaflet builder transforms the definition to javascript.
|
||||
*/
|
||||
$container['leaflet.definition.builder'] = $container->share(function($container) {
|
||||
$container[LeafletServices::DEFINITION_BUILDER] = $container->share(function($container) {
|
||||
/** @var Boot $boot */
|
||||
$boot = $container['leaflet.boot'];
|
||||
$dispatcher = $container['leaflet.definition.builder.event-dispatcher'];
|
||||
$factory = $container['leaflet.definition.builder.encoder-factory'];
|
||||
$boot = $container[LeafletServices::BOOT];
|
||||
$dispatcher = $container[LeafletServices::DEFINITION_BUILDER_EVENT_DISPATCHER];
|
||||
$factory = $container[LeafletServices::DEFINITION_ENCODER_FACTORY];
|
||||
|
||||
$builder = new Builder($factory);
|
||||
$leaflet = new Leaflet($builder, $dispatcher, array(), JSON_UNESCAPED_SLASHES ^ Flags::BUILD_STACK);
|
||||
@@ -113,10 +144,218 @@ $container['leaflet.definition.builder'] = $container->share(function($container
|
||||
return $boot->initializeLeafletBuilder($leaflet);
|
||||
});
|
||||
|
||||
$container['leaflet.frontend.value-filter'] = $container->share(function($container) {
|
||||
return new ValueFilter($container['toolkit.insert-tag-replacer']);
|
||||
$container[LeafletServices::FRONTEND_VALUE_FILTER] = $container->share(function($container) {
|
||||
return new ValueFilter($container[Services::INSERT_TAG_REPLACER]);
|
||||
});
|
||||
|
||||
$container['leaflet.service-container'] = $container->share(function($container) {
|
||||
return new ServiceContainer($container);
|
||||
/**
|
||||
* Internal used leaflet cache.
|
||||
*
|
||||
* @var Cache
|
||||
*/
|
||||
$container[LeafletServices::CACHE] = $container->share(
|
||||
function ($container) {
|
||||
if ($container[Services::PRODUCTION_MODE]) {
|
||||
return new FilesystemCache(TL_ROOT . '/system/cache/leaflet');
|
||||
} else {
|
||||
return new ArrayCache();
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* Leaflet alias generator.
|
||||
*
|
||||
* @return \Netzmacht\Contao\Toolkit\Data\Alias\AliasGenerator
|
||||
*/
|
||||
$container[LeafletServices::ALIAS_GENERATOR] = $container->share(
|
||||
function ($container) {
|
||||
return function ($dataContainerName, $aliasField, $fields) use ($container) {
|
||||
$filters = [
|
||||
new ExistingAliasFilter(),
|
||||
new SlugifyFilter($fields),
|
||||
new DefaultAliasFilter($dataContainerName),
|
||||
new SuffixFilter(),
|
||||
];
|
||||
|
||||
$validator = new UniqueDatabaseValueValidator(
|
||||
$container[Services::DATABASE_CONNECTION],
|
||||
$dataContainerName,
|
||||
$aliasField
|
||||
);
|
||||
|
||||
return new FilterBasedAliasGenerator($filters, $validator, $dataContainerName, $aliasField, '_');
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* Leaflet alias generator.
|
||||
*
|
||||
* @return \Netzmacht\Contao\Toolkit\Data\Alias\AliasGenerator
|
||||
*/
|
||||
$container[LeafletServices::PARENT_ALIAS_GENERATOR] = $container->share(
|
||||
function ($container) {
|
||||
return function ($dataContainerName, $aliasField, $fields) use ($container) {
|
||||
$filters = [
|
||||
new ExistingAliasFilter(),
|
||||
new SlugifyFilter($fields),
|
||||
new DefaultAliasFilter($dataContainerName),
|
||||
new SuffixFilter(),
|
||||
];
|
||||
|
||||
$validator = new UniqueDatabaseValueValidator(
|
||||
$container[Services::DATABASE_CONNECTION],
|
||||
$dataContainerName,
|
||||
$aliasField,
|
||||
['pid']
|
||||
);
|
||||
|
||||
return new FilterBasedAliasGenerator($filters, $validator, $dataContainerName, $aliasField, '_');
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* Callback helper class for tl_leaflet_map.
|
||||
*
|
||||
* @return MapCallbacks
|
||||
*/
|
||||
$container['leaflet.dca.map-callbacks'] = $container->share(
|
||||
function ($container) {
|
||||
return new MapCallbacks(
|
||||
$container[Services::DCA_MANAGER],
|
||||
$container[Services::DATABASE_CONNECTION]
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* Callback helper class for tl_leaflet_layer.
|
||||
*
|
||||
* @return LayerCallbacks
|
||||
*/
|
||||
$container['leaflet.dca.layer-callbacks'] = $container->share(
|
||||
function ($container) {
|
||||
return new LayerCallbacks(
|
||||
$container[Services::DCA_MANAGER],
|
||||
$container[Services::DATABASE_CONNECTION],
|
||||
$container[Services::TRANSLATOR],
|
||||
$GLOBALS['LEAFLET_LAYERS'],
|
||||
$GLOBALS['LEAFLET_TILE_PROVIDERS'],
|
||||
require TL_ROOT . '/system/modules/leaflet/config/leaflet_amenities.php'
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* Callback helper class for tl_leaflet_control.
|
||||
*
|
||||
* @return ControlCallbacks
|
||||
*/
|
||||
$container['leaflet.dca.control-callbacks'] = $container->share(
|
||||
function ($container) {
|
||||
return new ControlCallbacks(
|
||||
$container[Services::DCA_MANAGER],
|
||||
$container[Services::DATABASE_CONNECTION]
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* Callback helper class for tl_leaflet_control.
|
||||
*
|
||||
* @return ControlCallbacks
|
||||
*/
|
||||
$container['leaflet.dca.vector-callbacks'] = $container->share(
|
||||
function ($container) {
|
||||
return new VectorCallbacks($container[Services::DCA_MANAGER]);
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* Callback helper class for frontend integration.
|
||||
*
|
||||
* @return FrontendIntegration
|
||||
*/
|
||||
$container['leaflet.dca.frontend-integration'] = $container->share(
|
||||
function ($container) {
|
||||
return new FrontendIntegration(
|
||||
$container[Services::TRANSLATOR]
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* Common callback helpers.
|
||||
*
|
||||
* @return LeafletCallbacks
|
||||
*/
|
||||
$container['leaflet.dca.common'] = $container->share(
|
||||
function ($container) {
|
||||
return new LeafletCallbacks(
|
||||
$container[Services::FILE_SYSTEM]
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* Validator helper class.
|
||||
*
|
||||
* @return Validator
|
||||
*/
|
||||
$container['leaflet.dca.validator'] = $container->share(
|
||||
function ($container) {
|
||||
return new Validator(
|
||||
$container[Services::TRANSLATOR]
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* Component factory for content element.
|
||||
*
|
||||
* @param ContentModel $model Content model.
|
||||
* @param string $column Template section.
|
||||
* @param ContainerInterface $container Container.
|
||||
*
|
||||
* @return MapElement
|
||||
*/
|
||||
$container[Services::CONTENT_ELEMENTS_MAP]['leaflet'] = function ($model, $column, ContainerInterface $container) {
|
||||
return new MapElement(
|
||||
$model,
|
||||
$container->get(Services::TEMPLATE_FACTORY),
|
||||
$container->get(Services::TRANSLATOR),
|
||||
$container->get(LeafletServices::MAP_PROVIDER),
|
||||
$container->get(Services::INPUT),
|
||||
$container->get(Services::CONFIG),
|
||||
$column
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* Component factory for frontend module.
|
||||
*
|
||||
* @param ModuleModel $model Module model.
|
||||
* @param string $column Template section.
|
||||
* @param ContainerInterface $container Container.
|
||||
*
|
||||
* @return MapModule
|
||||
*/
|
||||
$container[Services::MODULES_MAP]['leaflet'] = function ($model, $column, ContainerInterface $container) {
|
||||
return new MapModule(
|
||||
$model,
|
||||
$container->get(Services::TEMPLATE_FACTORY),
|
||||
$container->get(Services::TRANSLATOR),
|
||||
$container->get(LeafletServices::MAP_PROVIDER),
|
||||
$container->get(Services::INPUT),
|
||||
$container->get(Services::CONFIG),
|
||||
$column
|
||||
);
|
||||
};
|
||||
|
||||
$container['leaflet.subscriber.geo-json'] = $container->share(function () {
|
||||
return new GeoJsonSubscriber(
|
||||
$GLOBALS['LEAFLET_FEATURE_MODEL_PROPERTIES']
|
||||
);
|
||||
});
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2014 netzmacht creative David Molineus
|
||||
* @copyright 2014-2016 netzmacht David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
@@ -22,9 +22,9 @@ $GLOBALS['TL_DCA']['tl_content']['fields']['leaflet_map'] = array(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_content']['leaflet_map'],
|
||||
'inputType' => 'select',
|
||||
'exclude' => true,
|
||||
'options_callback' => array('Netzmacht\Contao\Leaflet\Dca\FrontendIntegration', 'getMaps'),
|
||||
'options_callback' => \Netzmacht\Contao\Leaflet\Dca\FrontendIntegration::callback('getMaps'),
|
||||
'wizard' => array(
|
||||
array('Netzmacht\Contao\Leaflet\Dca\FrontendIntegration', 'getEditMapLink'),
|
||||
\Netzmacht\Contao\Leaflet\Dca\FrontendIntegration::callback('getEditMapLink'),
|
||||
),
|
||||
'eval' => array(
|
||||
'tl_class' => 'w50 wizard',
|
||||
@@ -70,7 +70,7 @@ $GLOBALS['TL_DCA']['tl_content']['fields']['leaflet_template'] = array(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_content']['leaflet_template'],
|
||||
'inputType' => 'select',
|
||||
'exclude' => true,
|
||||
'options_callback' => \Netzmacht\Contao\Toolkit\Dca::createGetTemplatesCallback('leaflet_map_js'),
|
||||
'options_callback' => \Netzmacht\Contao\Toolkit\Dca\Callback\CallbackFactory::getTemplates('leaflet_map_js'),
|
||||
'eval' => array(
|
||||
'tl_class' => 'w50',
|
||||
'chosen' => true,
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2014 netzmacht creative David Molineus
|
||||
* @copyright 2014-2016 netzmacht David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
@@ -22,9 +22,11 @@ $GLOBALS['TL_DCA']['tl_leaflet_control'] = array
|
||||
(
|
||||
'id' => 'primary',
|
||||
'pid' => 'index',
|
||||
'alias' => 'unique',
|
||||
)
|
||||
)
|
||||
),
|
||||
'onsubmit_callback' => [
|
||||
\Netzmacht\Contao\Leaflet\Dca\LeafletCallbacks::callback('clearCache'),
|
||||
],
|
||||
),
|
||||
|
||||
// List
|
||||
@@ -38,7 +40,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_control'] = array
|
||||
'flag' => 1,
|
||||
'sorting' => 2,
|
||||
'panelLayout' => 'filter,sort;search,limit',
|
||||
'child_record_callback' => array('Netzmacht\Contao\Leaflet\Dca\Control', 'generateRow'),
|
||||
'child_record_callback' => \Netzmacht\Contao\Leaflet\Dca\ControlCallbacks::callback('generateRow'),
|
||||
),
|
||||
'label' => array
|
||||
(
|
||||
@@ -81,10 +83,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_control'] = array
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['toggle'],
|
||||
'icon' => 'visible.gif',
|
||||
'attributes' => 'onclick="Backend.getScrollOffset();return AjaxRequest.toggleVisibility(this,%s)"',
|
||||
'button_callback' => \Netzmacht\Contao\Toolkit\Dca::createToggleIconCallback(
|
||||
'tl_leaflet_control',
|
||||
'active'
|
||||
)
|
||||
'button_callback' => \Netzmacht\Contao\Toolkit\Dca\Callback\CallbackFactory::stateButton('tl_leaflet_control', 'active')
|
||||
),
|
||||
'show' => array
|
||||
(
|
||||
@@ -166,10 +165,16 @@ $GLOBALS['TL_DCA']['tl_leaflet_control'] = array
|
||||
'inputType' => 'text',
|
||||
'search' => true,
|
||||
'save_callback' => array(
|
||||
\Netzmacht\Contao\Leaflet\Dca\Helper::createGenerateAliasCallback('tl_leaflet_control', 'title'),
|
||||
\Netzmacht\Contao\Toolkit\Dca\Callback\CallbackFactory::aliasGenerator(
|
||||
'tl_leaflet_control',
|
||||
'alias',
|
||||
['title'],
|
||||
\Netzmacht\Contao\Leaflet\DependencyInjection\LeafletServices::PARENT_ALIAS_GENERATOR
|
||||
),
|
||||
\Netzmacht\Contao\Leaflet\Dca\Validator::callback('validateAlias'),
|
||||
),
|
||||
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true),
|
||||
'sql' => "varchar(255) NOT NULL default ''"
|
||||
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'nullIfEmpty' => true),
|
||||
'sql' => "varchar(255) NULL"
|
||||
),
|
||||
'type' => array
|
||||
(
|
||||
@@ -209,7 +214,10 @@ $GLOBALS['TL_DCA']['tl_leaflet_control'] = array
|
||||
'inputType' => 'checkbox',
|
||||
'filter' => true,
|
||||
'eval' => array('tl_class' => 'w50'),
|
||||
'sql' => "char(1) NOT NULL default ''"
|
||||
'sql' => "char(1) NOT NULL default ''",
|
||||
'save_callback' => [
|
||||
\Netzmacht\Contao\Leaflet\Dca\LeafletCallbacks::callback('clearCache'),
|
||||
],
|
||||
),
|
||||
'zoomInText' => array
|
||||
(
|
||||
@@ -267,10 +275,10 @@ $GLOBALS['TL_DCA']['tl_leaflet_control'] = array
|
||||
'exclude' => true,
|
||||
'inputType' => 'multiColumnWizard',
|
||||
'load_callback' => array(
|
||||
array('Netzmacht\Contao\Leaflet\Dca\Control', 'loadLayerRelations'),
|
||||
\Netzmacht\Contao\Leaflet\Dca\ControlCallbacks::callback('loadLayerRelations'),
|
||||
),
|
||||
'save_callback' => array(
|
||||
array('Netzmacht\Contao\Leaflet\Dca\Control', 'saveLayerRelations'),
|
||||
\Netzmacht\Contao\Leaflet\Dca\ControlCallbacks::callback('saveLayerRelations'),
|
||||
),
|
||||
'eval' => array
|
||||
(
|
||||
@@ -282,7 +290,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_control'] = array
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['layer'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'select',
|
||||
'options_callback' => array('Netzmacht\Contao\Leaflet\Dca\Layer', 'getLayers'),
|
||||
'options_callback' => \Netzmacht\Contao\Leaflet\Dca\ControlCallbacks::callback('getLayers'),
|
||||
'eval' => array(
|
||||
'style' => 'width: 300px',
|
||||
'chosen' => true,
|
||||
@@ -369,7 +377,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_control'] = array
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['zoomControl'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'select',
|
||||
'options_callback' => array('Netzmacht\Contao\Leaflet\Dca\Control', 'getZoomControls'),
|
||||
'options_callback' => \Netzmacht\Contao\Leaflet\Dca\ControlCallbacks::callback('getZoomControls'),
|
||||
'reference' => &$GLOBALS['TL_LANG']['tl_leaflet_control'],
|
||||
'eval' => array(
|
||||
'mandatory' => false,
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2014 netzmacht creative David Molineus
|
||||
* @copyright 2014-2016 netzmacht David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2014 netzmacht creative David Molineus
|
||||
* @copyright 2014-2016 netzmacht David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
@@ -21,7 +21,10 @@ $GLOBALS['TL_DCA']['tl_leaflet_icon'] = array
|
||||
'id' => 'primary',
|
||||
'alias' => 'unique',
|
||||
)
|
||||
)
|
||||
),
|
||||
'onsubmit_callback' => [
|
||||
\Netzmacht\Contao\Leaflet\Dca\LeafletCallbacks::callback('clearCache'),
|
||||
],
|
||||
),
|
||||
|
||||
'list' => array
|
||||
@@ -96,7 +99,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_icon'] = array
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['toggle'],
|
||||
'icon' => 'visible.gif',
|
||||
'attributes' => 'onclick="Backend.getScrollOffset();return AjaxRequest.toggleVisibility(this,%s)"',
|
||||
'button_callback' => \Netzmacht\Contao\Toolkit\Dca::createToggleIconCallback(
|
||||
'button_callback' => \Netzmacht\Contao\Toolkit\Dca\Callback\CallbackFactory::stateButton(
|
||||
'tl_leaflet_icon',
|
||||
'active'
|
||||
)
|
||||
@@ -147,7 +150,21 @@ $GLOBALS['TL_DCA']['tl_leaflet_icon'] = array
|
||||
'active' => array(
|
||||
'active'
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
'extra extends default' => array(
|
||||
'config' => array(
|
||||
'icon',
|
||||
'prefix',
|
||||
'shape',
|
||||
'markerColor',
|
||||
'number',
|
||||
'iconColor',
|
||||
),
|
||||
'active' => array(
|
||||
'active'
|
||||
)
|
||||
),
|
||||
),
|
||||
|
||||
'fields' => array
|
||||
@@ -174,10 +191,16 @@ $GLOBALS['TL_DCA']['tl_leaflet_icon'] = array
|
||||
'exclude' => true,
|
||||
'inputType' => 'text',
|
||||
'save_callback' => array(
|
||||
\Netzmacht\Contao\Leaflet\Dca\Helper::createGenerateAliasCallback('tl_leaflet_icon', 'title'),
|
||||
\Netzmacht\Contao\Toolkit\Dca\Callback\CallbackFactory::aliasGenerator(
|
||||
'tl_leaflet_icon',
|
||||
'alias',
|
||||
['title'],
|
||||
\Netzmacht\Contao\Leaflet\DependencyInjection\LeafletServices::ALIAS_GENERATOR
|
||||
),
|
||||
\Netzmacht\Contao\Leaflet\Dca\Validator::callback('validateAlias'),
|
||||
),
|
||||
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true),
|
||||
'sql' => "varchar(255) NOT NULL default ''"
|
||||
'sql' => "varchar(255) NULL"
|
||||
),
|
||||
'type' => array
|
||||
(
|
||||
@@ -201,7 +224,10 @@ $GLOBALS['TL_DCA']['tl_leaflet_icon'] = array
|
||||
'exclude' => true,
|
||||
'inputType' => 'checkbox',
|
||||
'eval' => array('tl_class' => 'w50'),
|
||||
'sql' => "char(1) NOT NULL default ''"
|
||||
'sql' => "char(1) NOT NULL default ''",
|
||||
'save_callback' => [
|
||||
\Netzmacht\Contao\Leaflet\Dca\LeafletCallbacks::callback('clearCache'),
|
||||
],
|
||||
),
|
||||
'iconImage' => array
|
||||
(
|
||||
@@ -265,7 +291,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_icon'] = array
|
||||
'exclude' => true,
|
||||
'inputType' => 'text',
|
||||
'save_callback' => array(
|
||||
array('Netzmacht\Contao\Leaflet\Dca\Leaflet', 'validateCoordinate')
|
||||
\Netzmacht\Contao\Leaflet\Dca\Validator::callback('validateCoordinates')
|
||||
),
|
||||
'eval' => array(
|
||||
'maxlength' => 255,
|
||||
@@ -280,7 +306,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_icon'] = array
|
||||
'exclude' => true,
|
||||
'inputType' => 'text',
|
||||
'save_callback' => array(
|
||||
array('Netzmacht\Contao\Leaflet\Dca\Leaflet', 'validateCoordinate')
|
||||
\Netzmacht\Contao\Leaflet\Dca\Validator::callback('validateCoordinates')
|
||||
),
|
||||
'eval' => array(
|
||||
'maxlength' => 255,
|
||||
@@ -295,7 +321,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_icon'] = array
|
||||
'exclude' => true,
|
||||
'inputType' => 'text',
|
||||
'save_callback' => array(
|
||||
array('Netzmacht\Contao\Leaflet\Dca\Leaflet', 'validateCoordinate')
|
||||
\Netzmacht\Contao\Leaflet\Dca\Validator::callback('validateCoordinates')
|
||||
),
|
||||
'eval' => array(
|
||||
'maxlength' => 255,
|
||||
@@ -339,5 +365,85 @@ $GLOBALS['TL_DCA']['tl_leaflet_icon'] = array
|
||||
),
|
||||
'sql' => "mediumtext NULL"
|
||||
),
|
||||
'icon' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['icon'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'text',
|
||||
'eval' => array(
|
||||
'maxlength' => 64,
|
||||
'tl_class' => 'w50',
|
||||
'nullIfEmpty' => true,
|
||||
),
|
||||
'sql' => "varchar(64) NULL"
|
||||
),
|
||||
'prefix' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['prefix'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'text',
|
||||
'eval' => array(
|
||||
'maxlength' => 64,
|
||||
'tl_class' => 'w50',
|
||||
'nullIfEmpty' => true,
|
||||
),
|
||||
'sql' => "varchar(64) NULL"
|
||||
),
|
||||
'shape' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['shape'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'select',
|
||||
'default' => 'circle',
|
||||
'options' => ['circle', 'square', 'star', 'penta'],
|
||||
'eval' => array(
|
||||
'tl_class' => 'w50',
|
||||
),
|
||||
'sql' => "varchar(64) NULL"
|
||||
),
|
||||
'iconColor' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['iconColor'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'text',
|
||||
'wizard' => array(
|
||||
\Netzmacht\Contao\Toolkit\Dca\Callback\CallbackFactory::colorPicker()
|
||||
),
|
||||
'eval' => array(
|
||||
'maxlength' => 64,
|
||||
'tl_class' => 'w50 wizard',
|
||||
'nullIfEmpty' => true,
|
||||
),
|
||||
'sql' => "varchar(16) NULL"
|
||||
),
|
||||
'markerColor' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['markerColor'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'select',
|
||||
'default' => 'circle',
|
||||
'options' => [
|
||||
'blue',
|
||||
'red',
|
||||
'orange-dark',
|
||||
'orange',
|
||||
'yellow',
|
||||
'blue-dark',
|
||||
'cyan',
|
||||
'purple',
|
||||
'violet',
|
||||
'pink',
|
||||
'green-dark',
|
||||
'green',
|
||||
'green-light',
|
||||
'black',
|
||||
'white'
|
||||
],
|
||||
'eval' => array(
|
||||
'tl_class' => 'w50',
|
||||
'nullIfEmpty' => true,
|
||||
),
|
||||
'sql' => "varchar(16) NULL"
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2014 netzmacht creative David Molineus
|
||||
* @copyright 2014-2016 netzmacht David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
@@ -16,7 +16,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = array
|
||||
'enableVersioning' => true,
|
||||
'ctable' => array('tl_leaflet_vector', 'tl_leaflet_marker'),
|
||||
'ondelete_callback' => array(
|
||||
array('Netzmacht\Contao\Leaflet\Dca\Layer', 'deleteRelations'),
|
||||
\Netzmacht\Contao\Leaflet\Dca\LayerCallbacks::callback('deleteRelations'),
|
||||
),
|
||||
'sql' => array
|
||||
(
|
||||
@@ -31,7 +31,10 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = array
|
||||
function() {
|
||||
\Controller::loadLanguageFile('leaflet');
|
||||
}
|
||||
)
|
||||
),
|
||||
'onsubmit_callback' => [
|
||||
\Netzmacht\Contao\Leaflet\Dca\LeafletCallbacks::callback('clearCache'),
|
||||
],
|
||||
),
|
||||
'list' => array
|
||||
(
|
||||
@@ -42,13 +45,13 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = array
|
||||
'flag' => 1,
|
||||
'icon' => 'system/modules/leaflet/assets/img/layers.png',
|
||||
'panelLayout' => 'filter;search,limit',
|
||||
'paste_button_callback' => array('Netzmacht\Contao\Leaflet\Dca\Layer', 'getPasteButtons'),
|
||||
'paste_button_callback' => \Netzmacht\Contao\Leaflet\Dca\LayerCallbacks::callback('getPasteButtons'),
|
||||
),
|
||||
'label' => array
|
||||
(
|
||||
'fields' => array('title'),
|
||||
'format' => '%s',
|
||||
'label_callback' => array('Netzmacht\Contao\Leaflet\Dca\Layer', 'generateRow')
|
||||
'label_callback' => \Netzmacht\Contao\Leaflet\Dca\LayerCallbacks::callback('generateRow')
|
||||
),
|
||||
'global_operations' => array
|
||||
(
|
||||
@@ -88,14 +91,14 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = array
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['markers'],
|
||||
'href' => 'table=tl_leaflet_marker',
|
||||
'icon' => 'edit.gif',
|
||||
'button_callback' => array('Netzmacht\Contao\Leaflet\Dca\Layer', 'generateMarkersButton'),
|
||||
'button_callback' => \Netzmacht\Contao\Leaflet\Dca\LayerCallbacks::callback('generateMarkersButton')
|
||||
),
|
||||
'vectors' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['vectors'],
|
||||
'href' => 'table=tl_leaflet_vector',
|
||||
'icon' => 'edit.gif',
|
||||
'button_callback' => array('Netzmacht\Contao\Leaflet\Dca\Layer', 'generateVectorsButton'),
|
||||
'button_callback' => \Netzmacht\Contao\Leaflet\Dca\LayerCallbacks::callback('generateVectorsButton'),
|
||||
),
|
||||
'edit' => array
|
||||
(
|
||||
@@ -128,10 +131,10 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = array
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['toggle'],
|
||||
'icon' => 'visible.gif',
|
||||
'attributes' => 'onclick="Backend.getScrollOffset();return AjaxRequest.toggleVisibility(this,%s)"',
|
||||
'button_callback' => \Netzmacht\Contao\Toolkit\Dca::createToggleIconCallback(
|
||||
'button_callback' => \Netzmacht\Contao\Toolkit\Dca\Callback\CallbackFactory::stateButton(
|
||||
'tl_leaflet_layer',
|
||||
'active'
|
||||
)
|
||||
),
|
||||
),
|
||||
'show' => array
|
||||
(
|
||||
@@ -150,12 +153,13 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = array
|
||||
'default' => array(
|
||||
'title' => array('title', 'alias', 'type'),
|
||||
'config' => array(),
|
||||
'style' => array(),
|
||||
'expert' => array(':hide'),
|
||||
'active' => array('active'),
|
||||
),
|
||||
'markers extends default' => array(
|
||||
'+expert' => array('pointToLayer'),
|
||||
'+config' => array('deferred', 'boundsMode')
|
||||
'+config' => array('boundsMode', 'deferred')
|
||||
),
|
||||
'group extends default' => array(
|
||||
'+title' => array('groupType'),
|
||||
@@ -163,7 +167,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = array
|
||||
),
|
||||
'vectors extends default' => array(
|
||||
'+expert' => array('onEachFeature', 'pointToLayer'),
|
||||
'+config' => array('deferred', 'boundsMode'),
|
||||
'+config' => array('boundsMode', 'deferred'),
|
||||
),
|
||||
'reference extends default' => array(
|
||||
'+title' => array('reference', 'standalone')
|
||||
@@ -210,7 +214,23 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = array
|
||||
'reuseTiles',
|
||||
'bounds'
|
||||
)
|
||||
)
|
||||
),
|
||||
'overpass extends default' => array(
|
||||
'config' => array(
|
||||
'overpassQuery',
|
||||
'boundsMode',
|
||||
'minZoom',
|
||||
'overpassEndpoint',
|
||||
'overpassPopup'
|
||||
),
|
||||
'style' => array(
|
||||
'amenityIcons'
|
||||
),
|
||||
'+expert' => array(
|
||||
'onEachFeature',
|
||||
'pointToLayer',
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
'metasubselectpalettes' => array(
|
||||
@@ -224,7 +244,9 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = array
|
||||
),
|
||||
|
||||
'metasubpalettes' => array(
|
||||
'spiderfyOnMaxZoom' => array('spiderfyDistanceMultiplier')
|
||||
'spiderfyOnMaxZoom' => array('spiderfyDistanceMultiplier'),
|
||||
'deferred' => array('cache'),
|
||||
'cache' => array('cacheLifeTime')
|
||||
),
|
||||
|
||||
'fields' => array
|
||||
@@ -261,10 +283,16 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = array
|
||||
'inputType' => 'text',
|
||||
'search' => true,
|
||||
'save_callback' => array(
|
||||
\Netzmacht\Contao\Leaflet\Dca\Helper::createGenerateAliasCallback('tl_leaflet_layer', 'title'),
|
||||
\Netzmacht\Contao\Toolkit\Dca\Callback\CallbackFactory::aliasGenerator(
|
||||
'tl_leaflet_layer',
|
||||
'alias',
|
||||
['title'],
|
||||
\Netzmacht\Contao\Leaflet\DependencyInjection\LeafletServices::ALIAS_GENERATOR
|
||||
),
|
||||
\Netzmacht\Contao\Leaflet\Dca\Validator::callback('validateAlias'),
|
||||
),
|
||||
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true),
|
||||
'sql' => "varchar(255) NOT NULL default ''"
|
||||
'sql' => "varchar(255) NULL"
|
||||
),
|
||||
'type' => array
|
||||
(
|
||||
@@ -291,7 +319,10 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = array
|
||||
'inputType' => 'checkbox',
|
||||
'filter' => true,
|
||||
'eval' => array('tl_class' => 'w50'),
|
||||
'sql' => "char(1) NOT NULL default ''"
|
||||
'sql' => "char(1) NOT NULL default ''",
|
||||
'save_callback' => [
|
||||
\Netzmacht\Contao\Leaflet\Dca\LeafletCallbacks::callback('clearCache'),
|
||||
],
|
||||
),
|
||||
'tile_provider' => array(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['tile_provider'],
|
||||
@@ -317,7 +348,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = array
|
||||
'submitOnChange' => true,
|
||||
'chosen' => false,
|
||||
),
|
||||
'options_callback' => array('Netzmacht\Contao\Leaflet\Dca\Layer', 'getVariants'),
|
||||
'options_callback' => \Netzmacht\Contao\Leaflet\Dca\LayerCallbacks::callback('getVariants'),
|
||||
'sql' => "varchar(32) NOT NULL default ''"
|
||||
),
|
||||
'tile_provider_key' => array
|
||||
@@ -366,7 +397,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = array
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['reference'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'select',
|
||||
'options_callback' => array('Netzmacht\Contao\Leaflet\Dca\Layer', 'getLayers'),
|
||||
'options_callback' => \Netzmacht\Contao\Leaflet\Dca\LayerCallbacks::callback('getLayers'),
|
||||
'eval' => array(
|
||||
'mandatory' => true,
|
||||
'tl_class' => 'w50',
|
||||
@@ -462,7 +493,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = array
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['disableClusteringAtZoom'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'select',
|
||||
'options_callback' => array('Netzmacht\Contao\Leaflet\Dca\Leaflet', 'getZoomLevels'),
|
||||
'options_callback' => Netzmacht\Contao\Leaflet\Dca\LeafletCallbacks::callback('getZoomLevels'),
|
||||
'default' => '',
|
||||
'eval' => array(
|
||||
'maxlength' => 4,
|
||||
@@ -542,7 +573,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = array
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['boundsMode'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'select',
|
||||
'options_callback' => array('Netzmacht\Contao\Leaflet\Dca\Layer', 'getBoundsModes'),
|
||||
'options_callback' => \Netzmacht\Contao\Leaflet\Dca\LayerCallbacks::callback('getBoundsModes'),
|
||||
'eval' => array('tl_class' => 'w50', 'includeBlankOption' => true),
|
||||
'sql' => "varchar(6) NOT NULL default ''"
|
||||
),
|
||||
@@ -560,7 +591,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = array
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['minZoom'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'select',
|
||||
'options_callback' => array('Netzmacht\Contao\Leaflet\Dca\Leaflet', 'getZoomLevels'),
|
||||
'options_callback' => Netzmacht\Contao\Leaflet\Dca\LeafletCallbacks::callback('getZoomLevels'),
|
||||
'eval' => array(
|
||||
'maxlength' => 4,
|
||||
'rgxp' => 'digit',
|
||||
@@ -575,7 +606,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = array
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['maxZoom'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'select',
|
||||
'options_callback' => array('Netzmacht\Contao\Leaflet\Dca\Leaflet', 'getZoomLevels'),
|
||||
'options_callback' => Netzmacht\Contao\Leaflet\Dca\LeafletCallbacks::callback('getZoomLevels'),
|
||||
'eval' => array(
|
||||
'maxlength' => 4,
|
||||
'rgxp' => 'digit',
|
||||
@@ -590,7 +621,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = array
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['maxNativeZoom'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'select',
|
||||
'options_callback' => array('Netzmacht\Contao\Leaflet\Dca\Leaflet', 'getZoomLevels'),
|
||||
'options_callback' => Netzmacht\Contao\Leaflet\Dca\LeafletCallbacks::callback('getZoomLevels'),
|
||||
'eval' => array(
|
||||
'maxlength' => 4,
|
||||
'rgxp' => 'digit',
|
||||
@@ -751,5 +782,149 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = array
|
||||
),
|
||||
'sql' => "mediumblob NULL"
|
||||
),
|
||||
'cache' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['cache'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'checkbox',
|
||||
'default' => false,
|
||||
'eval' => array('tl_class' => 'w50 m12', 'submitOnChange' => true),
|
||||
'sql' => "char(1) NOT NULL default ''"
|
||||
),
|
||||
'cacheLifeTime' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['cacheLifeTime'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'text',
|
||||
'default' => 0,
|
||||
'eval' => array('maxlength' => 5, 'rgxp' => 'digit', 'tl_class' => 'w50'),
|
||||
'sql' => "int(10) unsigned NOT NULL default '0'"
|
||||
),
|
||||
'overpassQuery' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['overpassQuery'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'textarea',
|
||||
'eval' => array(
|
||||
'preserveTags' => true,
|
||||
'decodeEntities' => true,
|
||||
'allowHtml' => true,
|
||||
'rte' => 'ace',
|
||||
'tl_class' => 'clr'
|
||||
),
|
||||
'sql' => "mediumtext NULL"
|
||||
),
|
||||
'overpassEndpoint' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['overpassEndpoint'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'text',
|
||||
'default' => '',
|
||||
'eval' => array('tl_class' => 'w50'),
|
||||
'sql' => "varchar(255) NOT NULL default ''"
|
||||
),
|
||||
'overpassCallback' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['overpassCallback'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'textarea',
|
||||
'eval' => array(
|
||||
'preserveTags' => true,
|
||||
'decodeEntities' => true,
|
||||
'allowHtml' => true,
|
||||
'rte' => 'ace|javascript',
|
||||
'tl_class' => 'clr'
|
||||
),
|
||||
'sql' => "mediumtext NULL"
|
||||
),
|
||||
'minZoomIndicatorPosition' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['minZoomIndicatorPosition'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'select',
|
||||
'filter' => true,
|
||||
'sorting' => true,
|
||||
'options' => array('topleft', 'topright', 'bottomleft', 'bottomright'),
|
||||
'reference' => &$GLOBALS['TL_LANG']['tl_leaflet_layer'],
|
||||
'eval' => array('mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50', 'helpwizard' => true),
|
||||
'sql' => "varchar(255) NOT NULL default ''"
|
||||
),
|
||||
'minZoomIndicatorMessage' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['minZoomIndicatorMessage'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'text',
|
||||
'default' => '',
|
||||
'eval' => array('tl_class' => 'clr w50'),
|
||||
'sql' => "varchar(255) NOT NULL default ''"
|
||||
),
|
||||
'minZoomIndicatorMessageNoLayer' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['minZoomIndicatorMessageNoLayer'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'text',
|
||||
'default' => '',
|
||||
'eval' => array('tl_class' => 'w50'),
|
||||
'sql' => "varchar(255) NOT NULL default ''"
|
||||
),
|
||||
'debug' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['debug'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'checkbox',
|
||||
'default' => false,
|
||||
'eval' => array('tl_class' => 'w50 m12'),
|
||||
'sql' => "char(1) NOT NULL default ''"
|
||||
),
|
||||
'amenityIcons' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['amenityIcons'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'multiColumnWizard',
|
||||
'options_callback' => array('Netzmacht\Contao\Leaflet\Dca\MarkerCallbacks', 'getIcons'),
|
||||
'eval' => array(
|
||||
'columnFields' => array(
|
||||
'amenity' => array(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['amenity'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'select',
|
||||
'options_callback' => \Netzmacht\Contao\Leaflet\Dca\LayerCallbacks::callback('getAmenities'),
|
||||
'eval' => array(
|
||||
'mandatory' => true,
|
||||
'tl_class' => 'w50',
|
||||
'style' => 'width: 200px',
|
||||
'chosen' => true,
|
||||
),
|
||||
),
|
||||
'icon' => array(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['amenityIcon'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'select',
|
||||
'options_callback' => array('Netzmacht\Contao\Leaflet\Dca\MarkerCallbacks', 'getIcons'),
|
||||
'eval' => array(
|
||||
'mandatory' => true,
|
||||
'tl_class' => 'w50',
|
||||
'style' => 'width: 200px',
|
||||
'chosen' => true,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
'sql' => "blob NULL",
|
||||
),
|
||||
'overpassPopup' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['overpassPopup'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'textarea',
|
||||
'eval' => array(
|
||||
'preserveTags' => true,
|
||||
'decodeEntities' => true,
|
||||
'allowHtml' => true,
|
||||
'rte' => 'ace|javascript',
|
||||
'tl_class' => 'clr'
|
||||
),
|
||||
'sql' => "mediumtext NULL"
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2014 netzmacht creative David Molineus
|
||||
* @copyright 2014-2016 netzmacht David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
@@ -27,7 +27,10 @@ $GLOBALS['TL_DCA']['tl_leaflet_map'] = array
|
||||
function() {
|
||||
\Controller::loadLanguageFile('leaflet');
|
||||
}
|
||||
)
|
||||
),
|
||||
'onsubmit_callback' => [
|
||||
\Netzmacht\Contao\Leaflet\Dca\LeafletCallbacks::callback('clearCache'),
|
||||
],
|
||||
),
|
||||
|
||||
'list' => array
|
||||
@@ -94,7 +97,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_map'] = array
|
||||
'metapalettes' => array(
|
||||
'default' => array(
|
||||
'title' => array('title', 'alias'),
|
||||
'zoom' => array('center', 'zoom', 'adjustZoomExtra', 'adjustBounds', 'dynamicLoad'),
|
||||
'zoom' => array('center', 'zoom', 'adjustZoomExtra', 'adjustBounds', 'dynamicLoad', 'boundsPadding'),
|
||||
'locate' => array('locate'),
|
||||
'layers' => array('layers'),
|
||||
'interaction' => array(
|
||||
@@ -114,6 +117,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_map'] = array
|
||||
),
|
||||
'expert' => array(
|
||||
'options',
|
||||
'cache',
|
||||
)
|
||||
),
|
||||
),
|
||||
@@ -124,7 +128,9 @@ $GLOBALS['TL_DCA']['tl_leaflet_map'] = array
|
||||
),
|
||||
'adjustZoomExtra' => array(
|
||||
'minZoom',
|
||||
'maxZoom'
|
||||
'maxZoom',
|
||||
'zoomSnap',
|
||||
'zoomDelta',
|
||||
),
|
||||
'locate' => array(
|
||||
':hide',
|
||||
@@ -135,6 +141,9 @@ $GLOBALS['TL_DCA']['tl_leaflet_map'] = array
|
||||
'locateMaximumAge',
|
||||
'enableHighAccuracy'
|
||||
),
|
||||
'cache' => array(
|
||||
'cacheLifeTime'
|
||||
)
|
||||
),
|
||||
|
||||
'fields' => array
|
||||
@@ -163,10 +172,16 @@ $GLOBALS['TL_DCA']['tl_leaflet_map'] = array
|
||||
'inputType' => 'text',
|
||||
'search' => true,
|
||||
'save_callback' => array(
|
||||
\Netzmacht\Contao\Leaflet\Dca\Helper::createGenerateAliasCallback('tl_leaflet_map', 'title'),
|
||||
\Netzmacht\Contao\Toolkit\Dca\Callback\CallbackFactory::aliasGenerator(
|
||||
'tl_leaflet_map',
|
||||
'alias',
|
||||
['title'],
|
||||
\Netzmacht\Contao\Leaflet\DependencyInjection\LeafletServices::ALIAS_GENERATOR
|
||||
),
|
||||
\Netzmacht\Contao\Leaflet\Dca\Validator::callback('validateAlias')
|
||||
),
|
||||
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true),
|
||||
'sql' => "varchar(255) NOT NULL default ''"
|
||||
'sql' => "varchar(255) NULL"
|
||||
),
|
||||
'center' => array
|
||||
(
|
||||
@@ -174,10 +189,10 @@ $GLOBALS['TL_DCA']['tl_leaflet_map'] = array
|
||||
'exclude' => true,
|
||||
'inputType' => 'text',
|
||||
'save_callback' => array(
|
||||
array('Netzmacht\Contao\Leaflet\Dca\Leaflet', 'validateCoordinate')
|
||||
\Netzmacht\Contao\Leaflet\Dca\Validator::callback('validateCoordinates'),
|
||||
),
|
||||
'wizard' => array(
|
||||
array('Netzmacht\Contao\Leaflet\Dca\Leaflet', 'getGeocoder')
|
||||
Netzmacht\Contao\Leaflet\Dca\LeafletCallbacks::callback('getGeocoder')
|
||||
),
|
||||
'eval' => array(
|
||||
'maxlength' => 255,
|
||||
@@ -192,10 +207,10 @@ $GLOBALS['TL_DCA']['tl_leaflet_map'] = array
|
||||
'exclude' => true,
|
||||
'inputType' => 'multiColumnWizard',
|
||||
'load_callback' => array(
|
||||
array('Netzmacht\Contao\Leaflet\Dca\Map', 'loadLayerRelations'),
|
||||
\Netzmacht\Contao\Leaflet\Dca\MapCallbacks::callback('loadLayerRelations'),
|
||||
),
|
||||
'save_callback' => array(
|
||||
array('Netzmacht\Contao\Leaflet\Dca\Map', 'saveLayerRelations'),
|
||||
\Netzmacht\Contao\Leaflet\Dca\MapCallbacks::callback('saveLayerRelations'),
|
||||
),
|
||||
'eval' => array(
|
||||
'multiple' => true,
|
||||
@@ -206,7 +221,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_map'] = array
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['reference'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'select',
|
||||
'options_callback' => array('Netzmacht\Contao\Leaflet\Dca\Layer', 'getLayers'),
|
||||
'options_callback' => \Netzmacht\Contao\Leaflet\Dca\MapCallbacks::callback('getLayers'),
|
||||
'eval' => array(
|
||||
'mandatory' => true,
|
||||
'tl_class' => 'w50',
|
||||
@@ -226,7 +241,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_map'] = array
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['zoom'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'select',
|
||||
'options_callback' => array('Netzmacht\Contao\Leaflet\Dca\Leaflet', 'getZoomLevels'),
|
||||
'options_callback' => Netzmacht\Contao\Leaflet\Dca\LeafletCallbacks::callback('getZoomLevels'),
|
||||
'default' => '',
|
||||
'eval' => array(
|
||||
'maxlength' => 4,
|
||||
@@ -251,7 +266,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_map'] = array
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['minZoom'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'select',
|
||||
'options_callback' => array('Netzmacht\Contao\Leaflet\Dca\Leaflet', 'getZoomLevels'),
|
||||
'options_callback' => Netzmacht\Contao\Leaflet\Dca\LeafletCallbacks::callback('getZoomLevels'),
|
||||
'eval' => array(
|
||||
'maxlength' => 4,
|
||||
'rgxp' => 'digit',
|
||||
@@ -266,7 +281,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_map'] = array
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['maxZoom'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'select',
|
||||
'options_callback' => array('Netzmacht\Contao\Leaflet\Dca\Leaflet', 'getZoomLevels'),
|
||||
'options_callback' => Netzmacht\Contao\Leaflet\Dca\LeafletCallbacks::callback('getZoomLevels'),
|
||||
'eval' => array(
|
||||
'maxlength' => 4,
|
||||
'rgxp' => 'digit',
|
||||
@@ -276,6 +291,34 @@ $GLOBALS['TL_DCA']['tl_leaflet_map'] = array
|
||||
),
|
||||
'sql' => "int(4) NULL"
|
||||
),
|
||||
'zoomSnap' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['zoomSnap'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'text',
|
||||
'eval' => array(
|
||||
'maxlength' => 4,
|
||||
'rgxp' => 'digit',
|
||||
'tl_class' => 'w50',
|
||||
'includeBlankOption' => true,
|
||||
'nullIfEmpty' => true
|
||||
),
|
||||
'sql' => "varchar(4) NULL"
|
||||
),
|
||||
'zoomDelta' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['zoomDelta'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'text',
|
||||
'eval' => array(
|
||||
'maxlength' => 4,
|
||||
'rgxp' => 'digit',
|
||||
'tl_class' => 'w50',
|
||||
'includeBlankOption' => true,
|
||||
'nullIfEmpty' => true
|
||||
),
|
||||
'sql' => "varchar(4) NULL"
|
||||
),
|
||||
'dragging' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['dragging'],
|
||||
@@ -436,9 +479,22 @@ $GLOBALS['TL_DCA']['tl_leaflet_map'] = array
|
||||
'exclude' => true,
|
||||
'inputType' => 'checkbox',
|
||||
'default' => false,
|
||||
'eval' => array('tl_class' => 'w50', 'submitOnChange' => false),
|
||||
'eval' => array('tl_class' => 'clr w50', 'submitOnChange' => false),
|
||||
'sql' => "char(1) NOT NULL default ''"
|
||||
),
|
||||
'boundsPadding' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['boundsPadding'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'text',
|
||||
'eval' => array(
|
||||
'maxlength' => 32,
|
||||
'tl_class' => 'w50',
|
||||
'includeBlankOption' => true,
|
||||
'nullIfEmpty' => true
|
||||
),
|
||||
'sql' => "varchar(32) NULL"
|
||||
),
|
||||
'locate' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['locate'],
|
||||
@@ -497,7 +553,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_map'] = array
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['locateMaxZoom'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'select',
|
||||
'options_callback' => array('Netzmacht\Contao\Leaflet\Dca\Leaflet', 'getZoomLevels'),
|
||||
'options_callback' => Netzmacht\Contao\Leaflet\Dca\LeafletCallbacks::callback('getZoomLevels'),
|
||||
'eval' => array(
|
||||
'maxlength' => 4,
|
||||
'rgxp' => 'digit',
|
||||
@@ -507,5 +563,23 @@ $GLOBALS['TL_DCA']['tl_leaflet_map'] = array
|
||||
),
|
||||
'sql' => "int(4) NULL"
|
||||
),
|
||||
'cache' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['cache'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'checkbox',
|
||||
'default' => false,
|
||||
'eval' => array('tl_class' => 'w50 m12', 'submitOnChange' => true),
|
||||
'sql' => "char(1) NOT NULL default ''"
|
||||
),
|
||||
'cacheLifeTime' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['cacheLifeTime'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'text',
|
||||
'default' => 0,
|
||||
'eval' => array('maxlength' => 5, 'rgxp' => 'digit', 'tl_class' => 'w50'),
|
||||
'sql' => "int(9) NOT NULL default '0'"
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2014 netzmacht creative David Molineus
|
||||
* @copyright 2014-2016 netzmacht David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2014 netzmacht creative David Molineus
|
||||
* @copyright 2014-2016 netzmacht David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
@@ -28,7 +28,10 @@ $GLOBALS['TL_DCA']['tl_leaflet_marker'] = array
|
||||
function() {
|
||||
\Controller::loadLanguageFile('leaflet');
|
||||
}
|
||||
)
|
||||
),
|
||||
'onsubmit_callback' => [
|
||||
\Netzmacht\Contao\Leaflet\Dca\LeafletCallbacks::callback('clearCache'),
|
||||
],
|
||||
),
|
||||
|
||||
'list' => array
|
||||
@@ -40,7 +43,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_marker'] = array
|
||||
'flag' => 1,
|
||||
'panelLayout' => 'sort,filter;search,limit',
|
||||
'headerFields' => array('title', 'type'),
|
||||
'child_record_callback' => array('Netzmacht\Contao\Leaflet\Dca\Marker', 'generateRow'),
|
||||
'child_record_callback' => array('Netzmacht\Contao\Leaflet\Dca\MarkerCallbacks', 'generateRow'),
|
||||
),
|
||||
'label' => array
|
||||
(
|
||||
@@ -97,7 +100,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_marker'] = array
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['toggle'],
|
||||
'icon' => 'visible.gif',
|
||||
'attributes' => 'onclick="Backend.getScrollOffset();return AjaxRequest.toggleVisibility(this,%s)"',
|
||||
'button_callback' => \Netzmacht\Contao\Toolkit\Dca::createToggleIconCallback(
|
||||
'button_callback' => \Netzmacht\Contao\Toolkit\Dca\Callback\CallbackFactory::stateButton(
|
||||
'tl_leaflet_marker',
|
||||
'active'
|
||||
)
|
||||
@@ -172,10 +175,16 @@ $GLOBALS['TL_DCA']['tl_leaflet_marker'] = array
|
||||
'inputType' => 'text',
|
||||
'search' => true,
|
||||
'save_callback' => array(
|
||||
\Netzmacht\Contao\Leaflet\Dca\Helper::createGenerateAliasCallback('tl_leaflet_marker', 'title'),
|
||||
\Netzmacht\Contao\Toolkit\Dca\Callback\CallbackFactory::aliasGenerator(
|
||||
'tl_leaflet_marker',
|
||||
'alias',
|
||||
['title'],
|
||||
\Netzmacht\Contao\Leaflet\DependencyInjection\LeafletServices::ALIAS_GENERATOR
|
||||
),
|
||||
\Netzmacht\Contao\Leaflet\Dca\Validator::callback('validateAlias'),
|
||||
),
|
||||
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true),
|
||||
'sql' => "varchar(255) NOT NULL default ''"
|
||||
'sql' => "varchar(255) NULL"
|
||||
),
|
||||
'coordinates' => array
|
||||
(
|
||||
@@ -183,14 +192,14 @@ $GLOBALS['TL_DCA']['tl_leaflet_marker'] = array
|
||||
'exclude' => true,
|
||||
'inputType' => 'text',
|
||||
'save_callback' => array(
|
||||
array('Netzmacht\Contao\Leaflet\Dca\Leaflet', 'validateCoordinate'),
|
||||
array('Netzmacht\Contao\Leaflet\Dca\Marker', 'saveCoordinates')
|
||||
\Netzmacht\Contao\Leaflet\Dca\Validator::callback('validateCoordinates'),
|
||||
array('Netzmacht\Contao\Leaflet\Dca\MarkerCallbacks', 'saveCoordinates')
|
||||
),
|
||||
'load_callback' => array(
|
||||
array('Netzmacht\Contao\Leaflet\Dca\Marker', 'loadCoordinates')
|
||||
array('Netzmacht\Contao\Leaflet\Dca\MarkerCallbacks', 'loadCoordinates')
|
||||
),
|
||||
'wizard' => array(
|
||||
array('Netzmacht\Contao\Leaflet\Dca\Leaflet', 'getGeocoder')
|
||||
Netzmacht\Contao\Leaflet\Dca\LeafletCallbacks::callback('getGeocoder')
|
||||
),
|
||||
'eval' => array(
|
||||
'maxlength' => 255,
|
||||
@@ -232,7 +241,10 @@ $GLOBALS['TL_DCA']['tl_leaflet_marker'] = array
|
||||
'flag' => 12,
|
||||
'inputType' => 'checkbox',
|
||||
'eval' => array('tl_class' => 'w50'),
|
||||
'sql' => "char(1) NOT NULL default ''"
|
||||
'sql' => "char(1) NOT NULL default ''",
|
||||
'save_callback' => [
|
||||
\Netzmacht\Contao\Leaflet\Dca\LeafletCallbacks::callback('clearCache'),
|
||||
],
|
||||
),
|
||||
'tooltip' => array
|
||||
(
|
||||
@@ -264,7 +276,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_marker'] = array
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['popup'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'select',
|
||||
'options_callback' => array('Netzmacht\Contao\Leaflet\Dca\Marker', 'getPopups'),
|
||||
'options_callback' => array('Netzmacht\Contao\Leaflet\Dca\MarkerCallbacks', 'getPopups'),
|
||||
'eval' => array(
|
||||
'mandatory' => false,
|
||||
'tl_class' => 'w50',
|
||||
@@ -295,7 +307,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_marker'] = array
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['icon'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'select',
|
||||
'options_callback' => array('Netzmacht\Contao\Leaflet\Dca\Marker', 'getIcons'),
|
||||
'options_callback' => array('Netzmacht\Contao\Leaflet\Dca\MarkerCallbacks', 'getIcons'),
|
||||
'eval' => array(
|
||||
'mandatory' => true,
|
||||
'tl_class' => 'w50',
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2014 netzmacht creative David Molineus
|
||||
* @copyright 2014-2016 netzmacht David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
@@ -21,7 +21,10 @@ $GLOBALS['TL_DCA']['tl_leaflet_popup'] = array
|
||||
'id' => 'primary',
|
||||
'alias' => 'unique',
|
||||
)
|
||||
)
|
||||
),
|
||||
'onsubmit_callback' => [
|
||||
\Netzmacht\Contao\Leaflet\Dca\LeafletCallbacks::callback('clearCache'),
|
||||
],
|
||||
),
|
||||
|
||||
'list' => array
|
||||
@@ -96,7 +99,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_popup'] = array
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['toggle'],
|
||||
'icon' => 'visible.gif',
|
||||
'attributes' => 'onclick="Backend.getScrollOffset();return AjaxRequest.toggleVisibility(this,%s)"',
|
||||
'button_callback' => \Netzmacht\Contao\Toolkit\Dca::createToggleIconCallback(
|
||||
'button_callback' => \Netzmacht\Contao\Toolkit\Dca\Callback\CallbackFactory::stateButton(
|
||||
'tl_leaflet_popup',
|
||||
'active'
|
||||
)
|
||||
@@ -160,10 +163,16 @@ $GLOBALS['TL_DCA']['tl_leaflet_popup'] = array
|
||||
'exclude' => true,
|
||||
'inputType' => 'text',
|
||||
'save_callback' => array(
|
||||
\Netzmacht\Contao\Leaflet\Dca\Helper::createGenerateAliasCallback('tl_leaflet_popup', 'title'),
|
||||
\Netzmacht\Contao\Toolkit\Dca\Callback\CallbackFactory::aliasGenerator(
|
||||
'tl_leaflet_popup',
|
||||
'alias',
|
||||
['title'],
|
||||
\Netzmacht\Contao\Leaflet\DependencyInjection\LeafletServices::ALIAS_GENERATOR
|
||||
),
|
||||
\Netzmacht\Contao\Leaflet\Dca\Validator::callback('validateAlias'),
|
||||
),
|
||||
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true),
|
||||
'sql' => "varchar(255) NOT NULL default ''"
|
||||
'sql' => "varchar(255) NULL"
|
||||
),
|
||||
'maxWidth' => array
|
||||
(
|
||||
@@ -225,7 +234,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_popup'] = array
|
||||
'exclude' => true,
|
||||
'inputType' => 'text',
|
||||
'save_callback' => array(
|
||||
array('Netzmacht\Contao\Leaflet\Dca\Leaflet', 'validateCoordinate')
|
||||
\Netzmacht\Contao\Leaflet\Dca\Validator::callback('validateCoordinates')
|
||||
),
|
||||
'eval' => array(
|
||||
'maxlength' => 255,
|
||||
@@ -284,7 +293,10 @@ $GLOBALS['TL_DCA']['tl_leaflet_popup'] = array
|
||||
'search' => false,
|
||||
'flag' => 12,
|
||||
'eval' => array('tl_class' => 'w50'),
|
||||
'sql' => "char(1) NOT NULL default ''"
|
||||
'sql' => "char(1) NOT NULL default ''",
|
||||
'save_callback' => [
|
||||
\Netzmacht\Contao\Leaflet\Dca\LeafletCallbacks::callback('clearCache'),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2014 netzmacht creative David Molineus
|
||||
* @copyright 2014-2016 netzmacht David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
@@ -20,7 +20,10 @@ $GLOBALS['TL_DCA']['tl_leaflet_style'] = array
|
||||
'id' => 'primary',
|
||||
'alias' => 'unique',
|
||||
)
|
||||
)
|
||||
),
|
||||
'onsubmit_callback' => [
|
||||
\Netzmacht\Contao\Leaflet\Dca\LeafletCallbacks::callback('clearCache'),
|
||||
],
|
||||
),
|
||||
|
||||
'list' => array
|
||||
@@ -95,7 +98,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_style'] = array
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['toggle'],
|
||||
'icon' => 'visible.gif',
|
||||
'attributes' => 'onclick="Backend.getScrollOffset();return AjaxRequest.toggleVisibility(this,%s)"',
|
||||
'button_callback' => \Netzmacht\Contao\Toolkit\Dca::createToggleIconCallback(
|
||||
'button_callback' => \Netzmacht\Contao\Toolkit\Dca\Callback\CallbackFactory::stateButton(
|
||||
'tl_leaflet_style',
|
||||
'active'
|
||||
)
|
||||
@@ -153,10 +156,16 @@ $GLOBALS['TL_DCA']['tl_leaflet_style'] = array
|
||||
'exclude' => true,
|
||||
'inputType' => 'text',
|
||||
'save_callback' => array(
|
||||
\Netzmacht\Contao\Leaflet\Dca\Helper::createGenerateAliasCallback('tl_leaflet_style', 'title'),
|
||||
\Netzmacht\Contao\Toolkit\Dca\Callback\CallbackFactory::aliasGenerator(
|
||||
'tl_leaflet_style',
|
||||
'alias',
|
||||
['title'],
|
||||
\Netzmacht\Contao\Leaflet\DependencyInjection\LeafletServices::ALIAS_GENERATOR
|
||||
),
|
||||
\Netzmacht\Contao\Leaflet\Dca\Validator::callback('validateAlias'),
|
||||
),
|
||||
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true),
|
||||
'sql' => "varchar(255) NOT NULL default ''"
|
||||
'sql' => "varchar(255) NULL"
|
||||
),
|
||||
'type' => array
|
||||
(
|
||||
@@ -189,7 +198,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_style'] = array
|
||||
'exclude' => true,
|
||||
'inputType' => 'text',
|
||||
'wizard' => array(
|
||||
\Netzmacht\Contao\Toolkit\Dca::createColorPickerCallback(),
|
||||
\Netzmacht\Contao\Toolkit\Dca\Callback\CallbackFactory::colorPicker()
|
||||
),
|
||||
'eval' => array(
|
||||
'tl_class' => 'w50 wizard clr',
|
||||
@@ -230,7 +239,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_style'] = array
|
||||
'exclude' => true,
|
||||
'inputType' => 'text',
|
||||
'wizard' => array(
|
||||
\Netzmacht\Contao\Toolkit\Dca::createColorPickerCallback(),
|
||||
\Netzmacht\Contao\Toolkit\Dca\Callback\CallbackFactory::colorPicker()
|
||||
),
|
||||
'eval' => array(
|
||||
'tl_class' => 'clr w50 wizard',
|
||||
@@ -286,7 +295,10 @@ $GLOBALS['TL_DCA']['tl_leaflet_style'] = array
|
||||
'search' => false,
|
||||
'flag' => 12,
|
||||
'eval' => array('tl_class' => 'w50'),
|
||||
'sql' => "char(1) NOT NULL default ''"
|
||||
'sql' => "char(1) NOT NULL default ''",
|
||||
'save_callback' => [
|
||||
\Netzmacht\Contao\Leaflet\Dca\LeafletCallbacks::callback('clearCache'),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2014 netzmacht creative David Molineus
|
||||
* @copyright 2014-2016 netzmacht David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
@@ -28,7 +28,10 @@ $GLOBALS['TL_DCA']['tl_leaflet_vector'] = array
|
||||
function() {
|
||||
\Controller::loadLanguageFile('leaflet');
|
||||
}
|
||||
)
|
||||
),
|
||||
'onsubmit_callback' => [
|
||||
\Netzmacht\Contao\Leaflet\Dca\LeafletCallbacks::callback('clearCache'),
|
||||
],
|
||||
),
|
||||
|
||||
'list' => array
|
||||
@@ -40,7 +43,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_vector'] = array
|
||||
'flag' => 1,
|
||||
'panelLayout' => 'sort,filter;search,limit',
|
||||
'headerFields' => array('title', 'type'),
|
||||
'child_record_callback' => array('Netzmacht\Contao\Leaflet\Dca\Vector', 'generateRow'),
|
||||
'child_record_callback' => Netzmacht\Contao\Leaflet\Dca\VectorCallbacks::callback('generateRow'),
|
||||
),
|
||||
'label' => array
|
||||
(
|
||||
@@ -104,7 +107,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_vector'] = array
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['toggle'],
|
||||
'icon' => 'visible.gif',
|
||||
'attributes' => 'onclick="Backend.getScrollOffset();return AjaxRequest.toggleVisibility(this,%s)"',
|
||||
'button_callback' => \Netzmacht\Contao\Toolkit\Dca::createToggleIconCallback(
|
||||
'button_callback' => \Netzmacht\Contao\Toolkit\Dca\Callback\CallbackFactory::stateButton(
|
||||
'tl_leaflet_vector',
|
||||
'active'
|
||||
)
|
||||
@@ -198,10 +201,16 @@ $GLOBALS['TL_DCA']['tl_leaflet_vector'] = array
|
||||
'inputType' => 'text',
|
||||
'search' => true,
|
||||
'save_callback' => array(
|
||||
\Netzmacht\Contao\Leaflet\Dca\Helper::createGenerateAliasCallback('tl_leaflet_vector', 'title'),
|
||||
\Netzmacht\Contao\Toolkit\Dca\Callback\CallbackFactory::aliasGenerator(
|
||||
'tl_leaflet_vector',
|
||||
'alias',
|
||||
['title'],
|
||||
\Netzmacht\Contao\Leaflet\DependencyInjection\LeafletServices::ALIAS_GENERATOR
|
||||
),
|
||||
\Netzmacht\Contao\Leaflet\Dca\Validator::callback('validateAlias'),
|
||||
),
|
||||
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true),
|
||||
'sql' => "varchar(255) NOT NULL default ''"
|
||||
'sql' => "varchar(255) NULL"
|
||||
),
|
||||
'type' => array
|
||||
(
|
||||
@@ -234,7 +243,10 @@ $GLOBALS['TL_DCA']['tl_leaflet_vector'] = array
|
||||
'search' => false,
|
||||
'flag' => 12,
|
||||
'eval' => array('tl_class' => 'w50'),
|
||||
'sql' => "char(1) NOT NULL default ''"
|
||||
'sql' => "char(1) NOT NULL default ''",
|
||||
'save_callback' => [
|
||||
\Netzmacht\Contao\Leaflet\Dca\LeafletCallbacks::callback('clearCache'),
|
||||
],
|
||||
),
|
||||
'addPopup' => array
|
||||
(
|
||||
@@ -250,7 +262,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_vector'] = array
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['popup'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'select',
|
||||
'options_callback' => array('Netzmacht\Contao\Leaflet\Dca\Marker', 'getPopups'),
|
||||
'options_callback' => array('Netzmacht\Contao\Leaflet\Dca\MarkerCallbacks', 'getPopups'),
|
||||
'eval' => array(
|
||||
'mandatory' => false,
|
||||
'tl_class' => 'w50',
|
||||
@@ -273,7 +285,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_vector'] = array
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['style'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'select',
|
||||
'options_callback' => array('Netzmacht\Contao\Leaflet\Dca\Vector', 'getStyles'),
|
||||
'options_callback' => Netzmacht\Contao\Leaflet\Dca\VectorCallbacks::callback('getStyles'),
|
||||
'eval' => array(
|
||||
'mandatory' => false,
|
||||
'tl_class' => 'w50',
|
||||
@@ -305,15 +317,16 @@ $GLOBALS['TL_DCA']['tl_leaflet_vector'] = array
|
||||
'exclude' => true,
|
||||
'inputType' => 'text',
|
||||
'save_callback' => array(
|
||||
array('Netzmacht\Contao\Leaflet\Dca\Leaflet', 'validateCoordinate')
|
||||
\Netzmacht\Contao\Leaflet\Dca\Validator::callback('validateCoordinates')
|
||||
),
|
||||
'wizard' => array(
|
||||
array('Netzmacht\Contao\Leaflet\Dca\Leaflet', 'getGeocoder')
|
||||
Netzmacht\Contao\Leaflet\Dca\LeafletCallbacks::callback('getGeocoder')
|
||||
),
|
||||
'eval' => array(
|
||||
'maxlength' => 255,
|
||||
'tl_class' => 'long clr',
|
||||
'nullIfEmpty' => true,
|
||||
'mandatory' => true,
|
||||
),
|
||||
'sql' => "varchar(255) NULL"
|
||||
),
|
||||
@@ -332,6 +345,9 @@ $GLOBALS['TL_DCA']['tl_leaflet_vector'] = array
|
||||
'inputType' => 'textarea',
|
||||
'search' => false,
|
||||
'eval' => array('mandatory' => true, 'alwaysSave' => true),
|
||||
'save_callback' => array(
|
||||
\Netzmacht\Contao\Leaflet\Dca\Validator::callback('validateMultipleCoordinates')
|
||||
),
|
||||
'sql' => "longblob NULL"
|
||||
),
|
||||
'multiData' => array
|
||||
@@ -354,6 +370,9 @@ $GLOBALS['TL_DCA']['tl_leaflet_vector'] = array
|
||||
)
|
||||
)
|
||||
),
|
||||
'save_callback' => array(
|
||||
\Netzmacht\Contao\Leaflet\Dca\Validator::callback('validateMultipleCoordinateSets')
|
||||
),
|
||||
'sql' => "longblob NULL"
|
||||
),
|
||||
'bounds' => array
|
||||
@@ -361,8 +380,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_vector'] = array
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['bounds'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'text',
|
||||
'save_callback' => array(
|
||||
),
|
||||
'save_callback' => array(),
|
||||
'eval' => array(
|
||||
'maxlength' => 255,
|
||||
'multiple'=>true,
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2014 netzmacht creative David Molineus
|
||||
* @copyright 2014-2016 netzmacht David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
@@ -22,9 +22,9 @@ $GLOBALS['TL_DCA']['tl_module']['fields']['leaflet_map'] = array(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_module']['leaflet_map'],
|
||||
'inputType' => 'select',
|
||||
'exclude' => true,
|
||||
'options_callback' => array('Netzmacht\Contao\Leaflet\Dca\FrontendIntegration', 'getMaps'),
|
||||
'options_callback' => \Netzmacht\Contao\Leaflet\Dca\FrontendIntegration::callback('getMaps'),
|
||||
'wizard' => array(
|
||||
array('Netzmacht\Contao\Leaflet\Dca\FrontendIntegration', 'getEditMapLink'),
|
||||
\Netzmacht\Contao\Leaflet\Dca\FrontendIntegration::callback('getEditMapLink'),
|
||||
),
|
||||
'eval' => array(
|
||||
'tl_class' => 'w50 wizard',
|
||||
@@ -70,7 +70,7 @@ $GLOBALS['TL_DCA']['tl_module']['fields']['leaflet_template'] = array(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_module']['leaflet_template'],
|
||||
'inputType' => 'select',
|
||||
'exclude' => true,
|
||||
'options_callback' => \Netzmacht\Contao\Toolkit\Dca::createGetTemplatesCallback('leaflet_map_js'),
|
||||
'options_callback' => \Netzmacht\Contao\Toolkit\Dca\Callback\CallbackFactory::getTemplates('leaflet_map_js'),
|
||||
'eval' => array(
|
||||
'tl_class' => 'w50',
|
||||
'chosen' => true,
|
||||
|
||||
@@ -8,12 +8,14 @@
|
||||
*
|
||||
* @license http://www.gnu.org/licenses/lgpl-3.0.html LGPL
|
||||
*
|
||||
* last-updated: 2015-02-11T08:57:52+01:00
|
||||
* last-updated: 2016-10-06T15:54:30+02:00
|
||||
*/
|
||||
|
||||
|
||||
$GLOBALS['TL_LANG']['leaflet']['applyPosition'] = 'Position anwenden';
|
||||
$GLOBALS['TL_LANG']['leaflet']['invalidAlias'] = 'Ein ungültiger Alias wurde angegeben. Ein Alias darf nicht leer sein, mit einer Zahl beginnen oder Sonderzeichen enthalten (Unterstriche sind erlaubt).';
|
||||
$GLOBALS['TL_LANG']['leaflet']['invalidCoordinates'] = 'Ungültige Koordinatenwerte vorhanden.';
|
||||
$GLOBALS['TL_LANG']['leaflet_control']['attribution']['0'] = 'Copyright-Leiste';
|
||||
$GLOBALS['TL_LANG']['leaflet_control']['attribution']['1'] = 'Das Kontrollelement zur Namensnennung erlaubt es, Urheber in einer kleinen Textbox auf der Karte anzuzeigen. Lesen Sie für weitere Details die <a href="http://leafletjs.com/reference.html#control-attribution" target="_blank">Leaflet-Dokumentation</a>.';
|
||||
$GLOBALS['TL_LANG']['leaflet_control']['fullscreen']['0'] = 'Fullscreen-Kontrollelement';
|
||||
$GLOBALS['TL_LANG']['leaflet_control']['fullscreen']['1'] = 'Diese Einstellung fügt einen Button hinzu, der den Fullscreen-Modus umschaltet. Für weitere Details lesen Sie den Artikel in der <a href="https://github.com/brunob/leaflet.fullscreen" target="_blank">Plugin-Dokumentation</a>.';
|
||||
$GLOBALS['TL_LANG']['leaflet_control']['layers']['0'] = 'Layer-Kontrollelement';
|
||||
@@ -21,15 +23,23 @@ $GLOBALS['TL_LANG']['leaflet_control']['layers']['1'] = 'Das Layer-Kontrol
|
||||
$GLOBALS['TL_LANG']['leaflet_control']['loading']['0'] = 'Lade-Indikator';
|
||||
$GLOBALS['TL_LANG']['leaflet_control']['loading']['1'] = 'Leaflet.loading ist ein einfacher Ladeindikator als Kontrollelement. Für weitere Details lesen Sie den Artikel in der <a href="https://github.com/ebrelsford/Leaflet.loading" target="_blank">Plugin-Dokumentation</a>.';
|
||||
$GLOBALS['TL_LANG']['leaflet_control']['scale']['0'] = 'Maßstabs-Kontrollelement';
|
||||
$GLOBALS['TL_LANG']['leaflet_control']['scale']['1'] = 'Einfaches Maßstabs-Kontrollelement, das den aktuellen Maßstab der Kartenmitte anzeigt. Lesen Sie für mehr Details die <a href="http://leafletjs.com/reference.html#control-scale" target="_blank">Leaflet-Dokumentation</a>.';
|
||||
$GLOBALS['TL_LANG']['leaflet_control']['zoom']['0'] = 'Zoom-Kontrollelement';
|
||||
$GLOBALS['TL_LANG']['leaflet_control']['zoom']['1'] = 'Diese Komponente ermöglicht eine Kontrolle des Zoomverhaltens. Für weitere Details lesen Sie die <a href="http://leafletjs.com/reference.html#control-zoom" target="_blank">Leaflet-Documentation</a>.';
|
||||
$GLOBALS['TL_LANG']['leaflet_layer']['group']['0'] = 'Layer-Gruppe';
|
||||
$GLOBALS['TL_LANG']['leaflet_layer']['group']['1'] = 'Layergruppen, die aus mehreren unterschiedlichen Layern zusammengesetzt sind. Lesen Sie für die Details die <a href="http://leafletjs.com/reference.html#layergroup" target="_blank">Leaflet-Dokumentation</a>. ';
|
||||
$GLOBALS['TL_LANG']['leaflet_layer']['markercluster']['0'] = 'Marker-Cluster';
|
||||
$GLOBALS['TL_LANG']['leaflet_layer']['markercluster']['1'] = 'Markercluster-Layer, der auf einem based on <a href="https://github.com/Leaflet/Leaflet.markercluster" target="_blank">Leaflet.markercluster</a.';
|
||||
$GLOBALS['TL_LANG']['leaflet_layer']['markers']['0'] = 'Marker';
|
||||
$GLOBALS['TL_LANG']['leaflet_layer']['markers']['1'] = 'Geben Sie den Layer an der die Marker enthält.';
|
||||
$GLOBALS['TL_LANG']['leaflet_layer']['overpass']['0'] = 'Overpass API';
|
||||
$GLOBALS['TL_LANG']['leaflet_layer']['overpass']['1'] = 'Overpass API Datenlayer.';
|
||||
$GLOBALS['TL_LANG']['leaflet_layer']['provider']['0'] = 'Vorkonfigurierte Karte';
|
||||
$GLOBALS['TL_LANG']['leaflet_layer']['provider']['1'] = 'Leaflet-Kachelanbieter. Lesen Sie für weitere Details die <a href="https://github.com/leaflet-extras/leaflet-providers" target="_blank">Plugin-Dokumentation</a>.';
|
||||
$GLOBALS['TL_LANG']['leaflet_layer']['reference']['0'] = 'Referenz';
|
||||
$GLOBALS['TL_LANG']['leaflet_layer']['reference']['1'] = 'Ein Referenzlayer ist ein Link zu einem anderen Layer.';
|
||||
$GLOBALS['TL_LANG']['leaflet_layer']['tile']['0'] = 'Kachel-Layer';
|
||||
$GLOBALS['TL_LANG']['leaflet_layer']['tile']['1'] = 'Kachel-Layer mit vollständigen Konfigurationsoptionen.';
|
||||
$GLOBALS['TL_LANG']['leaflet_layer']['vectors']['0'] = 'Vektoren';
|
||||
$GLOBALS['TL_LANG']['leaflet_layer']['vectors']['1'] = 'Vektorlayer beinhalten Vektoren wie Polygone, Polylines, etc.';
|
||||
$GLOBALS['TL_LANG']['leaflet_vector']['circle']['0'] = 'Kreis';
|
||||
@@ -37,7 +47,9 @@ $GLOBALS['TL_LANG']['leaflet_vector']['circle']['1'] = 'Kreisförmiges Ov
|
||||
$GLOBALS['TL_LANG']['leaflet_vector']['circleMarker']['0'] = 'Kreis-Marker';
|
||||
$GLOBALS['TL_LANG']['leaflet_vector']['circleMarker']['1'] = 'Kreisförmiger Marker mit fester Pixelbreite. Für weitere Details lesen Sie den Artikel in der <a href="http://leafletjs.com/reference.html#circlemarker" target="_blank">Leaflet-DoKumentation</a>.';
|
||||
$GLOBALS['TL_LANG']['leaflet_vector']['multiPolygon']['0'] = 'Mehrere Polygone';
|
||||
$GLOBALS['TL_LANG']['leaflet_vector']['multiPolygon']['1'] = 'Mehrere Polygone mit gemeinsamen Stilen. Lesen Sie für weitere Details die <a href="http://leafletjs.com/reference.html#multipolygon" target="_blank">Leaflet-Dokumentation</a>.';
|
||||
$GLOBALS['TL_LANG']['leaflet_vector']['multiPolyline']['0'] = 'Mehrere Polylines';
|
||||
$GLOBALS['TL_LANG']['leaflet_vector']['multiPolyline']['1'] = 'Mehrere Polylines mit gemeinsamen Stilen. Lesen Sie für weitere Details die <a href="http://leafletjs.com/reference.html#multipolyline" target="_blank">Leaflet-Dokumentation</a>.';
|
||||
$GLOBALS['TL_LANG']['leaflet_vector']['polygon']['0'] = 'Polygon';
|
||||
$GLOBALS['TL_LANG']['leaflet_vector']['polygon']['1'] = 'Polygon-Overlay. Für weitere Details lesen Sie den Artikel in der <a href="http://leafletjs.com/reference.html#polygon" target="_blank">Leaflet-Dokumentation</a>.';
|
||||
$GLOBALS['TL_LANG']['leaflet_vector']['polyline']['0'] = 'Polyline';
|
||||
|
||||
@@ -8,15 +8,16 @@
|
||||
*
|
||||
* @license http://www.gnu.org/licenses/lgpl-3.0.html LGPL
|
||||
*
|
||||
* last-updated: 2015-02-11T08:57:54+01:00
|
||||
* last-updated: 2016-10-04T13:07:35+02:00
|
||||
*/
|
||||
|
||||
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['active']['0'] = 'Kontrollelement aktivieren';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['active']['1'] = 'Kontrollelement auf der Karte aktivieren.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['active_legend'] = 'Aktivierung';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['alias']['0'] = 'Alias';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['alias']['1'] = 'Alias des Kontrollelementes.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['attributions']['0'] = 'Namensnennung';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['attributions']['1'] = 'Hier können Sie Texte zur Namensnennung hinzufügen. In diesem Feld ist HTML erlaubt.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['autoZIndex']['0'] = 'Automatischer Z-Index';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['autoZIndex']['1'] = 'Falls aktiviert wird das Kontrollelement zu allen Layern in aufsteigender Reihenfolge einen z-index hinzufügen, damit die Reihenfolge auch beim an- und abschalten von Layern erhalten bleibt.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['base']['0'] = 'Basislayer';
|
||||
@@ -58,6 +59,8 @@ $GLOBALS['TL_LANG']['tl_leaflet_control']['pastenew']['0'] = 'Kontroll
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['pastenew']['1'] = 'Neue Kopie des Kontrollelements ID %s erzeugen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['position']['0'] = 'Position';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['position']['1'] = 'Position des Kontrollelementes.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['prefix']['0'] = 'Namensnennungs-Prefix';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['prefix']['1'] = 'Passen Sie den Prefix für die Namensnennung an. In der Voreinstellung wird der Leaflet-Link benutzt. HTML ist erlaubt.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['separate']['0'] = 'Separat';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['separate']['1'] = 'Kontrollelemente getrennt von der Zoomkontrolle anzeigen.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['show']['0'] = 'Details anzeigen';
|
||||
@@ -81,8 +84,13 @@ $GLOBALS['TL_LANG']['tl_leaflet_control']['type']['1'] = 'Wählen
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['updateWhenIdle']['0'] = 'Bei ';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['updateWhenIdle']['1'] = 'Falls aktiviert wird das Kontrollelement erst nach Abschluss einer Bewegung der Karte neu gezeichnet. Andernfalls wird es bereits während der Bewegung aktualisiert.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['zoomControl']['0'] = 'Zoom-Kontrollelement';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['zoomControl']['1'] = 'Weisen Sie das Lade-Kontrollelement einem bestimmten Zoom-Kontrollelement zu. Falls dieses nicht benutzt wird oder deaktiviert ist wird das Standard-Kontrollelement verwendet.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['zoomInText']['0'] = 'ZoomIn-Text';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['zoomInText']['1'] = 'Dieser Text wird im ZoomIn-Button ausgegegeben. Der voreingestellte Wert ist "+". Wenn Sie den voreingestellten Wert verwenden möchten lassen Sie das Feld leer.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['zoomInTitle']['0'] = 'ZoomIn-Titel';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['zoomInTitle']['1'] = 'Geben Sie den Titel des Buttons zum Hineinzoomen an.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['zoomOutText']['0'] = 'ZoomOut-Text';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['zoomOutText']['1'] = 'Dieser Text wird im ZoomOut-Button ausgegegeben. Der voreingestellte Wert ist "-". Wenn Sie den voreingestellten Wert verwenden möchten lassen Sie das Feld leer.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['zoomOutTitle']['0'] = 'ZoomOut-Titel';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['zoomOutTitle']['1'] = 'Geben Sie den Titel des Buttons zum Herauszoomen an.';
|
||||
|
||||
|
||||
@@ -8,10 +8,9 @@
|
||||
*
|
||||
* @license http://www.gnu.org/licenses/lgpl-3.0.html LGPL
|
||||
*
|
||||
* last-updated: 2015-02-11T08:57:55+01:00
|
||||
* last-updated: 2016-10-04T13:07:35+02:00
|
||||
*/
|
||||
|
||||
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_icon']['active']['0'] = 'Aktivieren Sie das Icon.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_icon']['active']['1'] = 'Aktivieren Sie das Icon.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_icon']['active_legend'] = 'Aktivierung';
|
||||
@@ -28,7 +27,11 @@ $GLOBALS['TL_LANG']['tl_leaflet_icon']['delete']['0'] = 'Icon lösche
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_icon']['delete']['1'] = 'Icon ID %s öschen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_icon']['edit']['0'] = 'Icon bearbeiten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_icon']['edit']['1'] = 'Icon ID %s bearbeiten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_icon']['icon']['0'] = 'Icon-CSS-Klasse';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_icon']['icon']['1'] = 'Icon-CSS-Klasse, beispielsweise <em>fa-envelope</em>';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_icon']['iconAnchor']['0'] = 'Icon-Anker';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_icon']['iconColor']['0'] = 'Iconfarbe';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_icon']['iconColor']['1'] = 'Definieren Sie hier eine Farbe für den Icon-Marker';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_icon']['iconImage']['0'] = 'Icon-Bild';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_icon']['iconImage']['1'] = 'Wählen Sie ein Bild für das Icon aus.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_icon']['iconRetinaImage']['0'] = 'Retina-Iconbild';
|
||||
@@ -37,6 +40,8 @@ $GLOBALS['TL_LANG']['tl_leaflet_icon']['layersBtn']['0'] = 'Layer verwal
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_icon']['layersBtn']['1'] = 'Leaflet-Layer verwalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_icon']['map']['0'] = 'Karten verwalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_icon']['map']['1'] = 'Leaflet-Karten verwalten.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_icon']['markerColor']['0'] = 'Markerfarbe';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_icon']['markerColor']['1'] = 'Wählen Sie eine vordefinierte Farbe für den Marker';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_icon']['new']['0'] = 'Icon erstellen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_icon']['new']['1'] = 'Erstellen Sie ein neues Icon';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_icon']['popupAnchor']['0'] = 'Popup-Anker';
|
||||
@@ -49,6 +54,8 @@ $GLOBALS['TL_LANG']['tl_leaflet_icon']['shadowImage']['1'] = 'Wählen Sie
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_icon']['shadowRetinaImage']['0'] = 'Retina-Schattenbild';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_icon']['shadowRetinaImage']['1'] = 'Wählen Sie ein Retina-Bild für den Schatten aus.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_icon']['shadow_legend'] = 'Schatten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_icon']['shape']['0'] = 'Markerform';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_icon']['shape']['1'] = 'Definieren Sie hier die Form des Markers';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_icon']['show']['0'] = 'Details anzeigen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_icon']['show']['1'] = 'Details des Icons %s anzeigen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_icon']['styles']['0'] = 'Stile verwalten';
|
||||
|
||||
@@ -8,20 +8,26 @@
|
||||
*
|
||||
* @license http://www.gnu.org/licenses/lgpl-3.0.html LGPL
|
||||
*
|
||||
* last-updated: 2015-02-11T08:57:55+01:00
|
||||
* last-updated: 2016-10-06T15:54:30+02:00
|
||||
*/
|
||||
|
||||
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['active']['0'] = 'Layer aktivieren';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['active']['1'] = 'Layer auf der Karte aktivieren';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['active_legend'] = 'Aktivierung';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['alias']['0'] = 'Alias';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['alias']['1'] = 'Alias des Layers.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['amenityIcon']['0'] = 'Iconstil';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['amenityIcon']['1'] = 'Icon';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['animateAddingMarkers']['0'] = 'Hinzufügen von Markern animieren';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['animateAddingMarkers']['1'] = 'Falls angewählt werden Marker, die einer Clustergruppe hinzugefügt werden animiert.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['attribution']['0'] = 'Namensnennung';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['attribution']['1'] = 'Geben Sie das Copyright des Kachellayer-Anbieters ein. Beachten Sie die jeweiligen Nutzungsbedingungen.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['bounds']['0'] = 'Begrenzungen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['boundsMode']['1'] = 'Wählen Sie aus, auf welche Weise die Layerdaten die Darstellungsgrenzen beeinflussen.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['cache']['0'] = 'Cache aktivieren';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['cache']['1'] = 'Falls ausgewählt werden dynamisch geladene Daten gecached.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['cacheLifeTime']['0'] = 'Cache-Lebenszeit';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['cacheLifeTime']['1'] = 'Der Wert in Sekunden bestimmt, wie lange Daten im Cache gültig sind';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['config_legend'] = 'Konfiguration';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['continuousWorld']['0'] = 'Fortlaufende Welt';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['copy']['0'] = 'Layer kopieren';
|
||||
@@ -69,21 +75,35 @@ $GLOBALS['TL_LANG']['tl_leaflet_layer']['new']['1'] = 'Er
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['noWrap']['0'] = 'Kein Umbruch';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['opacity']['0'] = 'Transparenz';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['opacity']['1'] = 'Transparenz des Kachel-Layers.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['overpassEndpoint']['0'] = 'Overpass API-Endpoint';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['overpassEndpoint']['1'] = 'Endpoint für Overpass API-Abfragen. Falls leer wird //overpass-api.de/api/ benutzt.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['overpassQuery']['0'] = 'Overpass API-Anfrage';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['overpassQuery']['1'] = 'Overpass API -Anfrage. Beispiele finden Sie unter <a href="https://overpass-turbo.eu/" target="_blank">https://overpass-turbo.eu/</a>.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['pasteafter']['1'] = 'Nach Layer %s einfügen';
|
||||
$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']['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';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['removeOutsideVisibleBounds']['1'] = 'Cluster und Marker, die zu weit vom sichtbaren Bereich entfernt sind, werden aus Leistungsgründen aus der Karte entfernt.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['reuseTiles']['0'] = 'Kacheln wiederverwenden';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['show']['0'] = 'Details anzeigen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['show']['1'] = 'Details des Layers ID %s anzeigen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['showCoverageOnHover']['0'] = 'Abdeckung bei hover zeigen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['showCoverageOnHover']['1'] = 'Wenn Sie die Maus über einen Cluster bewegen werden die Grenzen der Marker angezeigt.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['singleMarkerMode']['0'] = 'Cluster anstelle von Markern anzeigen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['standalone']['0'] = 'Eigenständiges Layer';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['standalone']['1'] = 'Kopie anstelle eines Links des Layers erstellen.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['style_legend'] = 'Stil';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['styles']['0'] = 'Stile verwalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['styles']['1'] = 'Vektorstile verwalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['subdomains']['0'] = 'Subdomain';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['subdomains']['1'] = 'Subdomains des Kachelservices. Jeder Buchstabe wird wie eine Subdomain behandelt.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['tileSize']['0'] = 'Kachelgröße';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['tileSize']['1'] = 'Kachelgröße (Breite und Höhe in Pixeln, auf quadratische Kacheln bezogen).';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['tile_provider']['0'] = 'Kachelanbieter';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['tile_provider']['1'] = 'Wählen Sie den Typ des Layers aus.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['tile_provider_variant']['0'] = 'Kachelvariante';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['tile_provider_variant']['1'] = 'Kachelvarianten-Stil';
|
||||
@@ -102,4 +122,5 @@ $GLOBALS['TL_LANG']['tl_leaflet_layer']['zIndex']['1'] = 'Le
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['zoomOffset']['0'] = 'Zoom-Offset';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['zoomReverse']['0'] = 'Umgekehrter Zoom';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['zoomToBoundsOnClick']['0'] = 'Per Klick auf die Begrenzungen zoomen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['zoomToBoundsOnClick']['1'] = 'Wenn Benutzer auf einen Cluster klicken wird auf seine Grenzen gezoomt.';
|
||||
|
||||
|
||||
@@ -8,79 +8,103 @@
|
||||
*
|
||||
* @license http://www.gnu.org/licenses/lgpl-3.0.html LGPL
|
||||
*
|
||||
* last-updated: 2015-02-11T08:57:56+01:00
|
||||
* last-updated: 2016-10-06T15:54:30+02:00
|
||||
*/
|
||||
|
||||
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['adjustBoundsOptions']['load']['0'] = 'bei Karteninitialisierung';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['adjustZoomExtra']['0'] = 'Erweiterte Zoom-Einstellungen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['alias']['0'] = 'Alias';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['alias']['1'] = 'Legen Sie den Alias der Karte fest.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['behaviour_legend'] = 'Verhalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['bounceAtZoomLimits']['0'] = 'Zurückfedern bei Erreichen des Zoom-Limits';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['boxZoom']['0'] = 'Zoomen durch Markierung';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['boxZoom']['1'] = 'legen Sie fest ob der Kartenausschnitt vergrößert werden kann indem Benutzer die Maus mit gedrückter Umschalttaste über die Karte ziehen.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['center']['0'] = 'Zentrieren';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['center']['1'] = 'Legen Sie das initiale Zentrum der Karte fest. Nutzen Sie kommegetrente Werte für die Koordinaten.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['closeOnClick']['0'] = 'Popup nach Klick schließen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['closeOnClick']['1'] = 'Deaktivieren Sie diese Einstellung, wenn Sie verhindern wollen dass das Popup bei einem Klick auf die Karte geschlossen wird.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['controls']['0'] = 'Kontrollelemente verwalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['controls']['1'] = 'Kontrollelemente der Karte ID %s verwalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['copy']['0'] = 'Karte kopieren';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['copy']['1'] = 'Karte UD %s kopieren';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['delete']['0'] = 'Karte löschen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['delete']['1'] = 'Karte ID %s löschen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['doubleClickZoom']['0'] = 'Zoom bei Doppelklick';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['doubleClickZoom']['1'] = 'Legen Sie fest ob in der Karte mit einem Doppelklick hineingezoomt und mit Umstelltaste-Doppelklick gerausgezoomt werden kann.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['dragging']['0'] = 'Verschieben';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['dragging']['1'] = 'Legen Sie fest ob die Karte mit Maus oder Touchgesten verschiebbar ist.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['edit']['0'] = 'Karte bearbeiten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['edit']['1'] = 'Karte ID %s bearbeiten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['enableHighAccuracy']['0'] = 'Hohe Genauigkeit';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['expert_legend'] = 'Experteneinstellungen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['interaction_legend'] = 'Bedienelemente';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['keyboard']['0'] = 'Tatstaturnavigation';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['keyboardZoomOffset']['1'] = 'Legen Sie die Anzahl der Zoom-Levels fest die mit den + / - -Tasten angesteuert werden können.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['layers']['0'] = 'Standardlayer';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['layers']['1'] = 'beim Laden sichtbare layer der Karte. Für optionale Layer nutzen Sie das Layer-Kontrollelement.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['layers_legend'] = 'Standardlayer';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['locate']['0'] = 'Nutzerposition ermitteln';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['locate']['1'] = 'Initialer Kartenzoom. Diese Funktion versucht, den Benutzer mittels Geolocation-API zu orten.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['locateMaximumAge']['0'] = 'Maximale Gültigkeit der Benutzerposition';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['locateSetView']['0'] = 'Kartenmitte aktualisieren';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['locateSetView']['1'] = 'Falls angewählt wird die Kartenansicht an der Position des Benutzers ausgerichtet. Andernfalls wird nur der <em>locationfound</em>-Event getriggert.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['locateTimeout']['0'] = 'Timeout Standorterkennung';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['locateTimeout']['1'] = 'Zeit in Millisekunden, die für eine Antwort des Geolocation-Services gewartet wird.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['locateWatch']['0'] = 'Kontinuierlich nachverfolgen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['locateWatch']['1'] = 'Falls gesetzt wird die Position des Benutzers kontinuierlich nachverfolgt.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['locate_legend'] = 'Nutzerposition ermitteln';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['maxZoom']['0'] = 'Größter Zoomfaktor';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['maxZoom']['1'] = 'Maximales Zoomlevel der Karte. Diese Einstellung überschreibt jede andere Einstellung für das maximale Zoom-Level auf Kartenlayern.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['minZoom']['0'] = 'Kleinster Zoomfaktor';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['minZoom']['1'] = 'Minimales Zoomlevel der Karte. Diese Einstellung überschreibt jede andere Einstellung für das minimale Zoom-Level auf Kartenlayern.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['new']['0'] = 'Karte erstellen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['new']['1'] = 'Neue Karte erstellen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['options']['0'] = 'Erweiterte Optionen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['options']['1'] = 'Fügen Sie zusätzliche Kartenoptionen als valides json hinzu. Detais unter <a href="http://leafletjs.com/reference.html#map-options">http://leafletjs.com/reference.html#map-options</a>';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['scrollWheelZoom']['0'] = 'Zoom mit Scrollrad';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['scrollWheelZoom']['1'] = 'Legen Sie fest ob die Karte mit dem Mausrad gezoomt werden kann.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['show']['0'] = 'Details anzeigen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['show']['1'] = 'Details der Karte %s anzeigen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['title']['0'] = 'Titel';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['title']['1'] = 'Legen Sie den Titel der Karte fest.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['title_legend'] = 'Titel';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['touchZoom']['0'] = 'Touch-Zoom';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['touchZoom']['1'] = 'Legen Sie fest ob die Karte durch eine Zwei-Finger-Geste gezoomt werden kann.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['trackResize']['0'] = 'Fensteränderungen beachten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['trackResize']['1'] = 'Legen Sie fest ob die Karte sich nach einer Veränderung der Größe des Browserfensters automatisch anpasst.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['zoom']['0'] = 'Zoom-Faktor';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['zoom']['1'] = 'Anfänglicher Zoom-Faktor';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['zoomControl']['0'] = 'Zoom-Kontrollelement standardmäßig anzeigen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['zoomControl']['1'] = 'Legt fest ob das Kontrollelement für den Kartenzoom standardmäßig eingeblendet wird.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['zoomValues']['']['0'] = 'Deaktivieren';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['zoomValues']['']['1'] = 'Zoom deaktivieren';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['zoomValues']['1']['0'] = 'Aktivieren';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['zoomValues']['1']['1'] = 'Zoom aktivieren';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['zoomValues']['center']['0'] = 'Zentrieren';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['zoom_legend'] = 'Zentrieren und zoomen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['adjustBounds']['0'] = 'Grenzen festlegen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['adjustBounds']['1'] = 'Falls aktiviert passt sich die karten an den Bereich der Datenlayer an, für die Auswirkungen auf die Kartengrenzen zugelassen sind.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['adjustBoundsOptions']['deferred']['1'] = 'Bestimmt ob die Kartengrenzen neu berechnet werden wenn ein Feature verzögert geladen wird.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['adjustBoundsOptions']['load']['0'] = 'bei Karteninitialisierung';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['adjustBoundsOptions']['load']['1'] = 'Grenzen berechnen, wenn die Karte initialisiert wird. Alle statischen und bereits geladenen Features werden mit einbezogen.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['adjustZoomExtra']['0'] = 'Erweiterte Zoom-Einstellungen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['adjustZoomExtra']['1'] = 'Aktivieren Sie diese Einstellung, wenn Sie den minimalen und den maximalen Zoomfaktor ebenfalls einstellen möchten.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['alias']['0'] = 'Alias';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['alias']['1'] = 'Legen Sie den Alias der Karte fest.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['behaviour_legend'] = 'Verhalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['bounceAtZoomLimits']['0'] = 'Zurückfedern bei Erreichen des Zoom-Limits';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['bounceAtZoomLimits']['1'] = 'Deaktivieren Sie diese Einstellung, falls Sie verhindern möchten, dass außerhalb liegende Elemente der Karte beim Zoomen über die festgelegten minimalen / maximalen Zoomstufen hinaus angezeigt werden wenn mit zwei Fingern gezoomt wird.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['boxZoom']['0'] = 'Zoomen durch Markierung';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['boxZoom']['1'] = 'legen Sie fest ob der Kartenausschnitt vergrößert werden kann indem Benutzer die Maus mit gedrückter Umschalttaste über die Karte ziehen.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['cache']['0'] = 'Cache aktivieren';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['cache']['1'] = 'Falls aktiviert wird das für die Karte generierte JavaScript gecached.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['cacheLifeTime']['0'] = 'Cache-Lebenszeit';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['cacheLifeTime']['1'] = 'Der Wert in Sekunden bestimmt, wie lange Daten im Cache gültig sind.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['center']['0'] = 'Zentrieren';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['center']['1'] = 'Legen Sie das initiale Zentrum der Karte fest. Nutzen Sie kommegetrente Werte für die Koordinaten.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['closeOnClick']['0'] = 'Popup nach Klick schließen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['closeOnClick']['1'] = 'Deaktivieren Sie diese Einstellung, wenn Sie verhindern wollen dass das Popup bei einem Klick auf die Karte geschlossen wird.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['controls']['0'] = 'Kontrollelemente verwalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['controls']['1'] = 'Kontrollelemente der Karte ID %s verwalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['copy']['0'] = 'Karte kopieren';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['copy']['1'] = 'Karte UD %s kopieren';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['delete']['0'] = 'Karte löschen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['delete']['1'] = 'Karte ID %s löschen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['doubleClickZoom']['0'] = 'Zoom bei Doppelklick';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['doubleClickZoom']['1'] = 'Legen Sie fest ob in der Karte mit einem Doppelklick hineingezoomt und mit Umstelltaste-Doppelklick gerausgezoomt werden kann.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['dragging']['0'] = 'Verschieben';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['dragging']['1'] = 'Legen Sie fest ob die Karte mit Maus oder Touchgesten verschiebbar ist.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['dynamicLoad']['0'] = 'Daten innerhalb der Grenzen dynamisch laden';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['dynamicLoad']['1'] = 'Falls ausgewählt werden Layerdaten nur innerhalb des dargestellten Ausschnitts geladen und bei Veränderung des Ausschnitts nachgeladen.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['edit']['0'] = 'Karte bearbeiten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['edit']['1'] = 'Karte ID %s bearbeiten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['enableHighAccuracy']['0'] = 'Hohe Genauigkeit';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['enableHighAccuracy']['1'] = 'Aktiviert hohe Genauigkeit. Lesen die die Details in der <a href="http://dev.w3.org/geo/api/spec-source.html#high-accuracy" target="_blank">Beschreibung innerhalb der Spezifikation des W3C</a> nach.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['expert_legend'] = 'Experteneinstellungen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['interaction_legend'] = 'Bedienelemente';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['keyboard']['0'] = 'Tatstaturnavigation';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['keyboard']['1'] = 'Diese Einstellung macht die Karte fokussierbar und erlaubt Nutzern, mit Hilfe der +/- und Pfeiltasten-Tasten in der Karte zu navigieren.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['keyboardPanOffset']['0'] = 'Keyboard-Verschiebeoffset';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['keyboardPanOffset']['1'] = 'Diese Einstellung bestimmt die Anzahl der Pixel, um die eine Kartenansicht mit jedem Druck einer Pfeiltaste verschoben wird.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['keyboardZoomOffset']['0'] = 'Keyboard-Zoomoffset';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['keyboardZoomOffset']['1'] = 'Legen Sie die Anzahl der Zoom-Levels fest die mit den + / - -Tasten angesteuert werden können.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['layers']['0'] = 'Standardlayer';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['layers']['1'] = 'beim Laden sichtbare layer der Karte. Für optionale Layer nutzen Sie das Layer-Kontrollelement.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['layers_legend'] = 'Standardlayer';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['locate']['0'] = 'Nutzerposition ermitteln';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['locate']['1'] = 'Initialer Kartenzoom. Diese Funktion versucht, den Benutzer mittels Geolocation-API zu orten.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['locateMaximumAge']['0'] = 'Maximale Gültigkeit der Benutzerposition';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['locateMaximumAge']['1'] = 'Maximales Alter der Daten zum Aufenthaltsort in Millisekunden. Ansonsten wird der zwischengespeicherte Wert benutzt.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['locateSetView']['0'] = 'Kartenmitte aktualisieren';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['locateSetView']['1'] = 'Falls angewählt wird die Kartenansicht an der Position des Benutzers ausgerichtet. Andernfalls wird nur der <em>locationfound</em>-Event getriggert.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['locateTimeout']['0'] = 'Timeout Standorterkennung';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['locateTimeout']['1'] = 'Zeit in Millisekunden, die für eine Antwort des Geolocation-Services gewartet wird.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['locateWatch']['0'] = 'Kontinuierlich nachverfolgen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['locateWatch']['1'] = 'Falls gesetzt wird die Position des Benutzers kontinuierlich nachverfolgt.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['locate_legend'] = 'Nutzerposition ermitteln';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['maxZoom']['0'] = 'Größter Zoomfaktor';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['maxZoom']['1'] = 'Maximales Zoomlevel der Karte. Diese Einstellung überschreibt jede andere Einstellung für das maximale Zoom-Level auf Kartenlayern.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['minZoom']['0'] = 'Kleinster Zoomfaktor';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['minZoom']['1'] = 'Minimales Zoomlevel der Karte. Diese Einstellung überschreibt jede andere Einstellung für das minimale Zoom-Level auf Kartenlayern.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['new']['0'] = 'Karte erstellen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['new']['1'] = 'Neue Karte erstellen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['options']['0'] = 'Erweiterte Optionen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['options']['1'] = 'Fügen Sie zusätzliche Kartenoptionen als valides json hinzu. Detais unter <a href="http://leafletjs.com/reference.html#map-options">http://leafletjs.com/reference.html#map-options</a>';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['scrollWheelZoom']['0'] = 'Zoom mit Scrollrad';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['scrollWheelZoom']['1'] = 'Legen Sie fest ob die Karte mit dem Mausrad gezoomt werden kann.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['show']['0'] = 'Details anzeigen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['show']['1'] = 'Details der Karte %s anzeigen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['tap']['0'] = 'Einmaliges Tippen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['tap']['1'] = 'Diese Einstellung aktiviert Hacks, mit der einmaliges Tippen unterstützt wird.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['title']['0'] = 'Titel';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['title']['1'] = 'Legen Sie den Titel der Karte fest.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['title_legend'] = 'Titel';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['touchZoom']['0'] = 'Touch-Zoom';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['touchZoom']['1'] = 'Legen Sie fest ob die Karte durch eine Zwei-Finger-Geste gezoomt werden kann.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['trackResize']['0'] = 'Fensteränderungen beachten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['trackResize']['1'] = 'Legen Sie fest ob die Karte sich nach einer Veränderung der Größe des Browserfensters automatisch anpasst.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['zoom']['0'] = 'Zoom-Faktor';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['zoom']['1'] = 'Anfänglicher Zoom-Faktor';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['zoomControl']['0'] = 'Zoom-Kontrollelement standardmäßig anzeigen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['zoomControl']['1'] = 'Legt fest ob das Kontrollelement für den Kartenzoom standardmäßig eingeblendet wird.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['zoomDelta']['0'] = 'Zoom-Delta';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['zoomDelta']['1'] = 'Der Delta-Wert bestimmt die Anpassung des Zoom-Faktors nach dem Ein- oder Auszoomen.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['zoomSnap']['0'] = 'Zoom einrasten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['zoomSnap']['1'] = 'Erzwingt dass das Zoomlevel immer ein Vielfaches des Wertes ist. Standardwert ist 1.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['zoomValues']['']['0'] = 'Deaktivieren';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['zoomValues']['']['1'] = 'Zoom deaktivieren';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['zoomValues']['1']['0'] = 'Aktivieren';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['zoomValues']['1']['1'] = 'Zoom aktivieren';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['zoomValues']['center']['0'] = 'Zentrieren';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['zoomValues']['center']['1'] = 'Falls der Wert \'center\' übergeben wird, zoomt die Kartenansicht zur Mitte des Auschnitts, unabhängig davon an welchem Punkt sich die Maus befindet.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['zoom_legend'] = 'Zentrieren und zoomen';
|
||||
|
||||
|
||||
@@ -8,55 +8,59 @@
|
||||
*
|
||||
* @license http://www.gnu.org/licenses/lgpl-3.0.html LGPL
|
||||
*
|
||||
* last-updated: 2015-02-11T08:57:57+01:00
|
||||
* last-updated: 2016-10-06T15:54:30+02:00
|
||||
*/
|
||||
|
||||
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['active']['0'] = 'Marker aktivieren';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['active']['1'] = 'Nur aktivierte Marker werden auf der Karte dargestellt.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['active_legend'] = 'Aktivierung';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['addPopup']['0'] = 'Popup hinzufügen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['addPopup']['1'] = 'Fügen Sie dem Marker ein Popup hinzu.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['alias']['0'] = 'Alias';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['alias']['1'] = 'Kartenalias';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['alt']['0'] = 'Alternativer Text';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['alt']['1'] = 'Geben Sie einen Text für das alt-Attribut des Iconbildes an. Dies ist für einen barrierearmen Zugang wichtig.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['clickable']['0'] = 'Klickbar';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['config_legend'] = 'Konfiguration';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['content_legend'] = 'Inhalt';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['coordinates']['0'] = 'Koordinaten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['coordinates']['1'] = 'Koordinaten für den Marker. Geben Sie kommagetrennte Werte ein (Länge, Breite [,Höhe]).';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['copy']['0'] = 'Marker kopieren';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['copy']['1'] = 'Marker ID %s kopieren';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['customIcon']['0'] = 'Individuelles Icon';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['customIcon']['1'] = 'Individuelles Icon verwenden.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['delete']['0'] = 'Marker löschen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['delete']['1'] = 'Marker ID %s löschen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['draggable']['0'] = 'Verschiebbar';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['draggable']['1'] = 'Legen Sie fest ob er Marker mit Maus oder Touchgesten verschiebbar ist.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['edit']['0'] = 'Marker bearbeiten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['edit']['1'] = 'Marker ID %s bearbeiten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['expert_legend'] = 'Experteneinstellungen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['featureData']['0'] = 'Feature-Daten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['icon']['0'] = 'Icon';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['icon']['1'] = 'Individuelles Icon auswählen.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['icons']['0'] = 'Icons verwalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['icons']['1'] = 'Marker-Icons verwalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['keyboard']['0'] = 'Tatstaturnavigation';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['new']['0'] = 'Marker erstellen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['new']['1'] = 'Neuen Marker erstellen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['popup']['0'] = 'Popup';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['popup']['1'] = 'Wählen Sie ein Popup aus dessen Eigenschaften verwendet werden sollen.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['popupContent']['0'] = 'Popup-Inhalt';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['popupContent']['1'] = 'Geben Sie den Inhalt des Popups an. Insert-Tags werden ersetzt.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['popups']['0'] = 'Popups verwalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['show']['0'] = 'Details anzeigen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['show']['1'] = 'Details des Markers ID %s anzeigen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['title']['0'] = 'Titel';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['title']['1'] = 'Kartentitel';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['title_legend'] = 'Titel und Typ';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['toggle']['0'] = 'Aktivierung umschalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['toggle']['1'] = 'Aktivierung von Marker ID %s umschalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['tooltip']['0'] = 'Tooltip';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['zIndexOffset']['0'] = 'Z-Index-Offset';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['active']['0'] = 'Marker aktivieren';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['active']['1'] = 'Nur aktivierte Marker werden auf der Karte dargestellt.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['active_legend'] = 'Aktivierung';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['addPopup']['0'] = 'Popup hinzufügen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['addPopup']['1'] = 'Fügen Sie dem Marker ein Popup hinzu.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['alias']['0'] = 'Alias';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['alias']['1'] = 'Kartenalias';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['alt']['0'] = 'Alternativer Text';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['alt']['1'] = 'Geben Sie einen Text für das alt-Attribut des Iconbildes an. Dies ist für einen barrierearmen Zugang wichtig.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['clickable']['0'] = 'Klickbar';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['clickable']['1'] = 'Falls deaktiviert wird der Marker nicht auf Mausevents reagieren und sich wie ein Teil der darunterliegenden Karte verhalten.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['config_legend'] = 'Konfiguration';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['content_legend'] = 'Inhalt';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['coordinates']['0'] = 'Koordinaten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['coordinates']['1'] = 'Koordinaten für den Marker. Geben Sie kommagetrennte Werte ein (Länge, Breite [,Höhe]).';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['copy']['0'] = 'Marker kopieren';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['copy']['1'] = 'Marker ID %s kopieren';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['customIcon']['0'] = 'Individuelles Icon';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['customIcon']['1'] = 'Individuelles Icon verwenden.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['delete']['0'] = 'Marker löschen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['delete']['1'] = 'Marker ID %s löschen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['draggable']['0'] = 'Verschiebbar';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['draggable']['1'] = 'Legen Sie fest ob er Marker mit Maus oder Touchgesten verschiebbar ist.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['edit']['0'] = 'Marker bearbeiten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['edit']['1'] = 'Marker ID %s bearbeiten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['expert_legend'] = 'Experteneinstellungen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['featureData']['0'] = 'Feature-Daten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['featureData']['1'] = 'Der Marker wird als GeoJSON-Eigenschaft übertragen. Daten werden als <em>feature.properties.data</em> übergeben.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['icon']['0'] = 'Icon';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['icon']['1'] = 'Individuelles Icon auswählen.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['icons']['0'] = 'Icons verwalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['icons']['1'] = 'Marker-Icons verwalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['ignoreForBounds']['0'] = 'Von Grenzen-Berechnung ausschließen.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['keyboard']['0'] = 'Tatstaturnavigation';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['keyboard']['1'] = 'Legen Sie fest ob der Marker über die Tabulatortaste erreicht und mit der Eingabetaste geklickt werden kann.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['new']['0'] = 'Marker erstellen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['new']['1'] = 'Neuen Marker erstellen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['popup']['0'] = 'Popup';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['popup']['1'] = 'Wählen Sie ein Popup aus dessen Eigenschaften verwendet werden sollen.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['popupContent']['0'] = 'Popup-Inhalt';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['popupContent']['1'] = 'Geben Sie den Inhalt des Popups an. Insert-Tags werden ersetzt.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['popups']['0'] = 'Popups verwalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['popups']['1'] = 'Popup Einstellungen verwalten.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['show']['0'] = 'Details anzeigen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['show']['1'] = 'Details des Markers ID %s anzeigen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['title']['0'] = 'Titel';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['title']['1'] = 'Kartentitel';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['title_legend'] = 'Titel und Typ';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['toggle']['0'] = 'Aktivierung umschalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['toggle']['1'] = 'Aktivierung von Marker ID %s umschalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['tooltip']['0'] = 'Tooltip';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['zIndexOffset']['0'] = 'Z-Index-Offset';
|
||||
|
||||
|
||||
@@ -8,56 +8,61 @@
|
||||
*
|
||||
* @license http://www.gnu.org/licenses/lgpl-3.0.html LGPL
|
||||
*
|
||||
* last-updated: 2015-02-11T08:57:58+01:00
|
||||
* last-updated: 2016-10-05T14:56:05+02:00
|
||||
*/
|
||||
|
||||
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['active']['0'] = 'Popup aktivieren';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['active']['1'] = 'Nur aktivierte Popups werden auf den Objekten zugewiesen..';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['active_legend'] = 'Aktivierung';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['alias']['0'] = 'Alias';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['alias']['1'] = 'Alias des Icons.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['className']['0'] = 'CSS-Klasse';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['className']['1'] = 'Legen Sie eine individuelle Klasse für das Popup fest.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['closeButton']['0'] = 'Schließ-Button';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['closeOnClick']['0'] = 'Beim Klick auf die Karte schließen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['closeOnClick']['1'] = 'Deaktivieren Sie diese Einstellung, wenn Sie verhindern wollen dass, das Popup bei einem Klick auf die Karte geschlossen wird.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['config_legend'] = 'Konfiguration';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['controls']['0'] = 'Kontrollelemente verwalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['controls']['1'] = 'Kontrollelemente des Popups ID %s verwalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['copy']['0'] = 'Popup kopieren';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['copy']['1'] = 'Popup ID %s kopieren';
|
||||
$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']['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';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['layersBtn']['1'] = 'Leaflet-Layer verwalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['map']['0'] = 'Karten verwalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['map']['1'] = 'Leaflet-Karten verwalten.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['maxHeight']['0'] = 'Minimale Breite';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['maxHeight']['1'] = 'Minimale Breite des Popups';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['maxWidth']['0'] = 'Maximale Breite';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['maxWidth']['1'] = 'Maximale Breite des Popups';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['minWidth']['0'] = 'Minimale Breite';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['minWidth']['1'] = 'Minimale Breite des Popups';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['new']['0'] = 'Popup erstellen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['new']['1'] = 'Neues Popup erstellen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['offset']['0'] = 'Offset';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['offset']['1'] = 'Geben Sie den Offset der Popup-Position als kommagetrennte Werte ein (beispielsweise 5,2).';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['show']['0'] = 'Details anzeigen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['show']['1'] = 'Details des Popups %s anzeigen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['size_legend'] = 'Popup-Größe';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['styles']['0'] = 'Stile verwalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['styles']['1'] = 'Vektorstile verwalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['title']['0'] = 'Titel';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['title']['1'] = 'Titel des Icons.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['title_legend'] = 'Titel';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['toggle']['0'] = 'Aktivierung umschalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['toggle']['1'] = 'Aktivierung von Popups ID %s umschalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['zoomAnimation']['0'] = 'Beim Zoomen animieren';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['active']['0'] = 'Popup aktivieren';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['active']['1'] = 'Nur aktivierte Popups werden auf den Objekten zugewiesen..';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['active_legend'] = 'Aktivierung';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['alias']['0'] = 'Alias';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['alias']['1'] = 'Alias des Icons.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['autoPan']['0'] = 'Karte verschieben';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['autoPan']['1'] = 'Die Karte wird automatisch verschoben um das Popup anzuzeigen.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['autoPanPadding']['0'] = 'Auto-Padding';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['autoPanPadding']['1'] = 'Geben Sie die Entfernung zwischen dem Popup und dem Kartenrand an. Erste Eingabe: Links oben. Zweite Eingabe: Rechts unten. Die Werte werden kommagetrennt erwartet (z.B. 5,5).';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['className']['0'] = 'CSS-Klasse';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['className']['1'] = 'Legen Sie eine individuelle Klasse für das Popup fest.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['closeButton']['0'] = 'Schließ-Button';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['closeButton']['1'] = 'Diese Einstellung legt fest ob das Popup über einen Schließknopf verfügt.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['closeOnClick']['0'] = 'Beim Klick auf die Karte schließen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['closeOnClick']['1'] = 'Deaktivieren Sie diese Einstellung, wenn Sie verhindern wollen dass, das Popup bei einem Klick auf die Karte geschlossen wird.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['config_legend'] = 'Konfiguration';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['controls']['0'] = 'Kontrollelemente verwalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['controls']['1'] = 'Kontrollelemente des Popups ID %s verwalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['copy']['0'] = 'Popup kopieren';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['copy']['1'] = 'Popup ID %s kopieren';
|
||||
$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']['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';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['layersBtn']['1'] = 'Leaflet-Layer verwalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['map']['0'] = 'Karten verwalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['map']['1'] = 'Leaflet-Karten verwalten.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['maxHeight']['0'] = 'Maximale Höhe';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['maxHeight']['1'] = 'Maximale Höhe des Popups';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['maxWidth']['0'] = 'Maximale Breite';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['maxWidth']['1'] = 'Maximale Breite des Popups';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['minWidth']['0'] = 'Minimale Breite';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['minWidth']['1'] = 'Minimale Breite des Popups';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['new']['0'] = 'Popup erstellen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['new']['1'] = 'Neues Popup erstellen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['offset']['0'] = 'Offset';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['offset']['1'] = 'Geben Sie den Offset der Popup-Position als kommagetrennte Werte ein (beispielsweise 5,2).';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['show']['0'] = 'Details anzeigen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['show']['1'] = 'Details des Popups %s anzeigen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['size_legend'] = 'Popup-Größe';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['styles']['0'] = 'Stile verwalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['styles']['1'] = 'Vektorstile verwalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['title']['0'] = 'Titel';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['title']['1'] = 'Titel des Icons.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['title_legend'] = 'Titel';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['toggle']['0'] = 'Aktivierung umschalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['toggle']['1'] = 'Aktivierung von Popups ID %s umschalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['zoomAnimation']['0'] = 'Beim Zoomen animieren';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['zoomAnimation']['1'] = 'Diese Einstellung bestimmt ob das Popup beim Zoom animiert dargestellt wird. Deaktivieren Sie diese Einstellung, wenn Sie Probleme mit flackernden Inhalten innerhalb des Popups haben.';
|
||||
|
||||
|
||||
@@ -8,10 +8,9 @@
|
||||
*
|
||||
* @license http://www.gnu.org/licenses/lgpl-3.0.html LGPL
|
||||
*
|
||||
* last-updated: 2015-02-11T08:57:58+01:00
|
||||
* last-updated: 2016-10-04T13:07:35+02:00
|
||||
*/
|
||||
|
||||
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_style']['active_legend'] = 'Aktivierung';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_style']['alias']['0'] = 'Alias';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_style']['alias']['1'] = 'Alias des Stils.';
|
||||
@@ -35,6 +34,7 @@ $GLOBALS['TL_LANG']['tl_leaflet_style']['layersBtn']['0'] = 'Layer verwalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_style']['layersBtn']['1'] = 'Leaflet-Layer verwalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_style']['lineCap']['0'] = 'Linienenden';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_style']['lineCap']['1'] = 'Geben Sie einen Wert ein, der für die <a href="https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-linecap" target="_blank">Enden der Linie</a> benutzt werden soll,';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_style']['lineJoin']['0'] = 'Linienverbindung';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_style']['new']['0'] = 'Stil erstellen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_style']['new']['1'] = 'Neuen Stil erstellen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_style']['opacity']['0'] = 'Linientransparenz';
|
||||
|
||||
@@ -8,10 +8,9 @@
|
||||
*
|
||||
* @license http://www.gnu.org/licenses/lgpl-3.0.html LGPL
|
||||
*
|
||||
* last-updated: 2015-02-11T08:57:59+01:00
|
||||
* last-updated: 2016-10-06T15:54:30+02:00
|
||||
*/
|
||||
|
||||
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_vector']['active']['0'] = 'Vektor aktivieren';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_vector']['active']['1'] = 'Nur aktivierte Vektoren werden auf der Karte ausgegeben.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_vector']['active_legend'] = 'Aktivierung';
|
||||
@@ -20,9 +19,11 @@ $GLOBALS['TL_LANG']['tl_leaflet_vector']['addPopup']['1'] = 'Fügen Sie d
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_vector']['alias']['0'] = 'Alias';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_vector']['alias']['1'] = 'Alias des Vektors';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_vector']['bounds']['0'] = 'Grenzen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_vector']['bounds']['1'] = 'Jedes Feld bestimmt eine Ecke der Kartengrenzen als kommagetrennte Werte (Längenwert, Breitenwert [,Höhenwert]).';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_vector']['className']['0'] = 'CSS-Klasse';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_vector']['className']['1'] = 'Legen Sie eine individuelle Klasse für ein Element fest.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_vector']['clickable']['0'] = 'Klickbar';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_vector']['clickable']['1'] = 'Falls deaktiviert wird der Vektor nicht auf Mausevents reagieren und sich wie ein Teil der darunterliegenden Karte verhalten.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_vector']['config_legend'] = 'Konfiguration';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_vector']['coordinates']['0'] = 'Koordinaten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_vector']['coordinates']['1'] = 'Koordinaten für den Vektor. Geben Sie kommagetrennte Werte ein (Länge, Breite [,Höhe]).';
|
||||
@@ -31,15 +32,19 @@ $GLOBALS['TL_LANG']['tl_leaflet_vector']['copy']['1'] = 'Vektor ID %s
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_vector']['cut']['0'] = 'Vektor verschieben';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_vector']['cut']['1'] = 'Vektor ID %s bewegen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_vector']['data']['0'] = 'Vektordaten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_vector']['data']['1'] = 'Legen Sie jede Koordinate für den Linienvektor fest. Jede Linie besteht aus kommagetrennten Werten (Längenwert, Breitenwert [,Höhenwert]).';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_vector']['data_legend'] = 'Vektordaten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_vector']['delete']['0'] = 'Vektor löschen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_vector']['delete']['1'] = 'Vektor ID %s löschen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_vector']['edit']['0'] = 'Vektor bearbeiten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_vector']['edit']['1'] = 'Vektor ID %s bearbeiten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_vector']['expert_legend'] = 'Experteneinstellungen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_vector']['featureData']['0'] = 'Feature-Daten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_vector']['featureData']['1'] = 'Der Marker wird als GeoJSON-Eigenschaft übertragen. Daten werden als <em>feature.properties.data</em> übergeben.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_vector']['ignoreForBounds']['0'] = 'Von Grenzen-Berechnung ausschließen.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_vector']['ignoreForBounds']['1'] = 'Diesen Datensatz nicht ausgeben, wenn er außerhalb des festgelegten Anzeigebereiches liegt.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_vector']['multiData']['0'] = 'Multi-Daten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_vector']['multiData']['1'] = 'Legt Koordinaten für jeden Vektor in einem neuen Textbereich fest.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_vector']['new']['0'] = 'Vektor erstellen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_vector']['new']['1'] = 'Erstellen Sie einen neuen Vektoren.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_vector']['popup']['0'] = 'Popup';
|
||||
@@ -54,6 +59,7 @@ $GLOBALS['TL_LANG']['tl_leaflet_vector']['radius']['1'] = 'Geben Sie de
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_vector']['show']['0'] = 'Details anzeigen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_vector']['show']['1'] = 'Details des Vektors ID %s anzeigen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_vector']['style']['0'] = 'Stil';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_vector']['style']['1'] = 'Wählen Sie einen Stil aus der als Standardvorgabe benutzt werden soll. Falls nichts ausgewählt ist wird die Standardvorgabe benutzt.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_vector']['styles']['0'] = 'Stile verwalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_vector']['styles']['1'] = 'Vektorstile verwalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_vector']['title']['0'] = 'Titel';
|
||||
|
||||
@@ -27,21 +27,26 @@ $GLOBALS['TL_LANG']['leaflet_layer']['markercluster'][0] = 'Marker cluster';
|
||||
$GLOBALS['TL_LANG']['leaflet_layer']['markercluster'][1] = 'Marker cluster layer based on <a href="https://github.com/Leaflet/Leaflet.markercluster" target="_blank">Leaflet.markercluster</a.';
|
||||
$GLOBALS['TL_LANG']['leaflet_layer']['tile'][0] = 'Tile layer';
|
||||
$GLOBALS['TL_LANG']['leaflet_layer']['tile'][1] = 'Tile layer with full config options.';
|
||||
$GLOBALS['TL_LANG']['leaflet_layer']['overpass'][0] = 'Overpass API';
|
||||
$GLOBALS['TL_LANG']['leaflet_layer']['overpass'][1] = 'Overpass API data layer.';
|
||||
|
||||
$GLOBALS['TL_LANG']['leaflet_vector']['polyline'][0] = 'Polyline';
|
||||
$GLOBALS['TL_LANG']['leaflet_vector']['polyline'][1] = 'Polyline overlay. For more details read the <a href="http://leafletjs.com/reference.html#polyline" target="_blank">Leaflet documentation</a>.';
|
||||
$GLOBALS['TL_LANG']['leaflet_vector']['multiPolyline'][0] = 'Multi polylines';
|
||||
$GLOBALS['TL_LANG']['leaflet_vector']['multiPolyline'][1] = 'Multi polylines with shared styling. For more details read the <a href="http://leafletjs.com/reference.html#multipolyline" target="_blank">Leaflet documentation</a>.';
|
||||
$GLOBALS['TL_LANG']['leaflet_vector']['polygon'][0] = 'Polygon';
|
||||
$GLOBALS['TL_LANG']['leaflet_vector']['polygon'][1] = 'Polygon overlay. For more details read the <a href="http://leafletjs.com/reference.html#polygon" target="_blank">Leaflet documentation</a>.';
|
||||
$GLOBALS['TL_LANG']['leaflet_vector']['polyline'][0] = 'Polyline';
|
||||
$GLOBALS['TL_LANG']['leaflet_vector']['polyline'][1] = 'Polyline overlay. For more details read the <a href="http://leafletjs.com/reference.html#polyline" target="_blank">Leaflet documentation</a>.';
|
||||
$GLOBALS['TL_LANG']['leaflet_vector']['multiPolyline'][0] = 'Multi polylines';
|
||||
$GLOBALS['TL_LANG']['leaflet_vector']['multiPolyline'][1] = 'Multi polylines with shared styling. For more details read the <a href="http://leafletjs.com/reference.html#multipolyline" target="_blank">Leaflet documentation</a>.';
|
||||
$GLOBALS['TL_LANG']['leaflet_vector']['polygon'][0] = 'Polygon';
|
||||
$GLOBALS['TL_LANG']['leaflet_vector']['polygon'][1] = 'Polygon overlay. For more details read the <a href="http://leafletjs.com/reference.html#polygon" target="_blank">Leaflet documentation</a>.';
|
||||
$GLOBALS['TL_LANG']['leaflet_vector']['multiPolygon'][0] = 'Multi polygons';
|
||||
$GLOBALS['TL_LANG']['leaflet_vector']['multiPolygon'][1] = 'Multi polygons with shared styling. For more details read the <a href="http://leafletjs.com/reference.html#multipolygon" target="_blank">Leaflet documentation</a>.';
|
||||
$GLOBALS['TL_LANG']['leaflet_vector']['circle'][0] = 'Circle';
|
||||
$GLOBALS['TL_LANG']['leaflet_vector']['circle'][1] = 'Circle overlay. For more details read the <a href="http://leafletjs.com/reference.html#circle" target="_blank">Leaflet documentation</a>.';
|
||||
$GLOBALS['TL_LANG']['leaflet_vector']['circle'][0] = 'Circle';
|
||||
$GLOBALS['TL_LANG']['leaflet_vector']['circle'][1] = 'Circle overlay. For more details read the <a href="http://leafletjs.com/reference.html#circle" target="_blank">Leaflet documentation</a>.';
|
||||
$GLOBALS['TL_LANG']['leaflet_vector']['circleMarker'][0] = 'Circle marker';
|
||||
$GLOBALS['TL_LANG']['leaflet_vector']['circleMarker'][1] = 'Circle marker with fixed pixel width. For more details read the <a href="http://leafletjs.com/reference.html#circlemarker" target="_blank">Leaflet documentation</a>.';
|
||||
$GLOBALS['TL_LANG']['leaflet_vector']['rectangle'][0] = 'Rectangle';
|
||||
$GLOBALS['TL_LANG']['leaflet_vector']['rectangle'][1] = 'Rectangle overlay. For more details read the <a href="http://leafletjs.com/reference.html#rectangle" target="_blank">Leaflet documentation</a>.';
|
||||
$GLOBALS['TL_LANG']['leaflet_vector']['rectangle'][0] = 'Rectangle';
|
||||
$GLOBALS['TL_LANG']['leaflet_vector']['rectangle'][1] = 'Rectangle overlay. For more details read the <a href="http://leafletjs.com/reference.html#rectangle" target="_blank">Leaflet documentation</a>.';
|
||||
|
||||
$GLOBALS['TL_LANG']['leaflet']['searchPosition'] = 'Search location';
|
||||
$GLOBALS['TL_LANG']['leaflet']['applyPosition'] = 'Apply position';
|
||||
|
||||
$GLOBALS['TL_LANG']['leaflet']['invalidAlias'] = 'Invalid alias given. Alias may not be empty, begin with a numeric value nor contain any special chars (underscore allowed).';
|
||||
$GLOBALS['TL_LANG']['leaflet']['invalidCoordinates'] = 'Invalid coordinate values given.';
|
||||
|
||||
@@ -52,3 +52,13 @@ $GLOBALS['TL_LANG']['tl_leaflet_icon']['active'][0] = 'Activate the i
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_icon']['active'][1] = 'Activate the icon.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_icon']['className'][0] = 'Class name';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_icon']['className'][1] = 'A custom class name to assign to both icon and shadow images. Empty by default.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_icon']['icon'][0] = 'Icon CSS class';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_icon']['icon'][1] = 'Icon CCS class, e.g <em>fa-envelope</em>';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_icon']['prefix'][0] = 'Icon prefix class';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_icon']['prefix'][1] = 'Icon prefix class, e.g <em>fa</em>';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_icon']['shape'][0] = 'Marker shape';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_icon']['shape'][1] = 'The shape of the marker';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_icon']['markerColor'][0] = 'marker color';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_icon']['markerColor'][1] = 'Choose a predefined color of the marker.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_icon']['iconColor'][0] = 'Icon color';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_icon']['iconColor'][1] = 'Define a custom icon color here.';
|
||||
|
||||
@@ -4,6 +4,7 @@ $GLOBALS['TL_LANG']['tl_leaflet_layer']['title_legend'] = 'Layer';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['active_legend'] = 'Activation';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['expert_legend'] = 'Expert settings';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['config_legend'] = 'Configuration';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['style_legend'] = 'Style';
|
||||
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['map'][0] = 'Manage maps';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['map'][1] = 'Manage leaflet maps';
|
||||
@@ -118,10 +119,29 @@ $GLOBALS['TL_LANG']['tl_leaflet_layer']['reuseTiles'][0] = 'Reus
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['reuseTiles'][1] = 'If true, all the tiles that are not visible after panning are placed in a reuse queue from which they will be fetched when new tiles become visible (as opposed to dynamically creating new ones).';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['bounds'][0] = 'Bounds';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['bounds'][1] = 'When this option is set, the TileLayer only loads tiles that are in the given geographical bounds. Each field defines a corner of the bounds as comma separated value (Latitude,longitude[,altitude]).';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['cache'][0] = 'Enable cache';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['cache'][1] = 'If enabled the dynamic loaded data is cached.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['cacheLifeTime'][0] = 'Cache lifetime';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['cacheLifeTime'][1] = 'Indicates how long a cache entry is valid in seconds.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['overpassQuery'][0] = 'Overpass API query';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['overpassQuery'][1] = 'Overpass API query. See <a href="https://overpass-turbo.eu/" target="_blank">https://overpass-turbo.eu/</a> for examples.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['overpassEndpoint'][0] = 'Overpass API endpoint';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['overpassEndpoint'][1] = 'Endpoint for overpass API request. If empty //overpass-api.de/api/ is used.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['overpassPopup'][0] = 'Popup expression';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['overpassPopup'][1] = 'Define a custom function or reference to create the popup. <em>feature</em> and <em>markerOrLayer</em> are passed as arguments.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['amenityIcons'][0] = 'Amenity icons';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['amenityIcons'][1] = 'Define the mapping between amenities and icon styles.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['amenity'][0] = 'Amenity';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['amenity'][1] = 'OSM amenity.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['amenityIcon'][1] = 'Icon';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['amenityIcon'][0] = 'Icon style';
|
||||
|
||||
$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']['feature'][0] = 'Feature group';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['groupTypes']['feature'][1] = 'Extended layer group with events and popup support. <br>See <a href="http://leafletjs.com/reference.html#featuregroup" target="_blank">http://leafletjs.com/reference.html#featuregroup</a>';
|
||||
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['pasteinto'][1] = 'Paste into layer %s';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['pasteafter'][1] = 'Paste after layer %s';
|
||||
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['countEntries'] = 'Entries';
|
||||
|
||||
@@ -55,6 +55,10 @@ $GLOBALS['TL_LANG']['tl_leaflet_map']['minZoom'][0] = 'Minimum zoom
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['minZoom'][1] = 'Minimum zoom level of the map. Overrides any minZoom set on map layers.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['maxZoom'][0] = 'Maximum zoom level';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['maxZoom'][1] = 'Maximum zoom level of the map. This overrides any maxZoom set on map layers.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['zoomSnap'][0] = 'Zoom snap';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['zoomSnap'][1] = 'Forces the map\'s zoom level to always be a multiple of the number. Default is 1.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['zoomDelta'][0] = 'Zoom delta';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['zoomDelta'][1] = 'Controls how much the map\'s zoom level will change after zoom in or zoom out.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['zoomControl'][0] = 'Add default zoom control';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['zoomControl'][1] = 'Whether the zoom control is added to the map by default.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['bounceAtZoomLimits'][0] = 'Bounce at zoom limits';
|
||||
@@ -83,6 +87,12 @@ $GLOBALS['TL_LANG']['tl_leaflet_map']['locateMaximumAge'][0] = 'Locate maximu
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['locateMaximumAge'][1] = 'Maximum age of detected location in milliseconds. Use cached value if time has not passed.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['dynamicLoad'][0] = 'Load data dynamically in bounds';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['dynamicLoad'][1] = 'If enabled the map requests data from the layers for the current bounds only and make a new request if bounds has changed.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['boundsPadding'][0] = 'Bounds padding';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['boundsPadding'][1] = 'Padding being used then applying bounds. Use comma separated values. If 2 values are given the <em>padding</em> option is set. If 4 values are given <em>paddingTopLeft</em> and <em>paddingBottomRight</em> is set.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['cache'][0] = 'Enable cache';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['cache'][1] = 'If enabled the generated map javascript is cached.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['cacheLifeTime'][0] = 'Cache lifetime';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['cacheLifeTime'][1] = 'Indicates how long a cache entry is valid in seconds.';
|
||||
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['adjustBoundsOptions']['load'][0] = 'At map initialization';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['adjustBoundsOptions']['load'][1] = 'Calculate bounds when the map is initialized. All static and already loaded deferred featured are included.';
|
||||
|
||||
@@ -9,8 +9,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 popups';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['icons'][1] = 'Manage marker popups';
|
||||
$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';
|
||||
@@ -28,31 +28,31 @@ $GLOBALS['TL_LANG']['tl_leaflet_popup']['show'][1] = 'Show popup ID %s deta
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['toggle'][0] = 'Toggle activation';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['toggle'][1] = 'Toggle popup ID %s activation';
|
||||
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['title'][0] = 'Title';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['title'][1] = 'Title of the icon.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['alias'][0] = 'Alias';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['alias'][1] = 'Alias of the icon.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['maxWidth'][0] = 'Max width';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['maxWidth'][1] = 'Max width of the popup.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['minWidth'][0] = 'Min width';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['minWidth'][1] = 'Min width of the popup.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['maxHeight'][0] = 'Min width';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['maxHeight'][1] = 'Min width of the popup.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['closeButton'][0] = 'Close button';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['closeButton'][1] = 'Controls the presense of a close button in the popup.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['closeOnClick'][0] = 'Close on map click';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['closeOnClick'][1] = 'Disable it if you want to override the default behavior of the popup closing when user clicks the map ';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['offset'][0] = 'Offset';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['offset'][1] = 'The offset of the popup position as comma separated point (e.g. 5,2)';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['keepInView'][0] = 'Keep in view';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['keepInView'][1] = 'Set it to true if you want to prevent users from panning the popup off of the screen while it is open.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['zoomAnimation'][0] = 'Animate on zoom';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['zoomAnimation'][1] = 'Whether to animate the popup on zoom. Disable it if you have problems with Flash content inside popups.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['className'][0] = 'Class name';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['className'][1] = 'A custom class name to assign to the popup.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['autoPanPadding'][0] = 'Auto pan padding';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['autoPanPadding'][1] = 'The margin between the popup and the top left (first input) and the bottom right (second input) of the map view. Each value as comma separated point (e.g. 5,5)';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['autoPan'][0] = 'Pan map';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['autoPan'][1] = 'Automatically pan the map to display the popup.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['active'][0] = 'Activate popup';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['active'][1] = 'Only activated popups are assigned to the map object.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['title'][0] = 'Title';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['title'][1] = 'Title of the icon.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['alias'][0] = 'Alias';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['alias'][1] = 'Alias of the icon.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['maxWidth'][0] = 'Max width';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['maxWidth'][1] = 'Max width of the popup.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['minWidth'][0] = 'Min width';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['minWidth'][1] = 'Min width of the popup.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['maxHeight'][0] = 'Max height';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['maxHeight'][1] = 'Max height of the popup.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['closeButton'][0] = 'Close button';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['closeButton'][1] = 'Controls the presense of a close button in the popup.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['closeOnClick'][0] = 'Close on map click';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['closeOnClick'][1] = 'Disable it if you want to override the default behavior of the popup closing when user clicks the map ';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['offset'][0] = 'Offset';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['offset'][1] = 'The offset of the popup position as comma separated point (e.g. 5,2)';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['keepInView'][0] = 'Keep in view';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['keepInView'][1] = 'Set it to true if you want to prevent users from panning the popup off of the screen while it is open.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['zoomAnimation'][0] = 'Animate on zoom';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['zoomAnimation'][1] = 'Whether to animate the popup on zoom. Disable it if you have problems with Flash content inside popups.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['className'][0] = 'Class name';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['className'][1] = 'A custom class name to assign to the popup.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['autoPanPadding'][0] = 'Auto pan padding';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['autoPanPadding'][1] = 'The margin between the popup and the top left (first input) and the bottom right (second input) of the map view. Each value as comma separated point (e.g. 5,5)';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['autoPan'][0] = 'Pan map';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['autoPan'][1] = 'Automatically pan the map to display the popup.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['active'][0] = 'Activate popup';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['active'][1] = 'Only activated popups are assigned to the map object.';
|
||||
|
||||
@@ -13,14 +13,14 @@
|
||||
<p>
|
||||
This software ships with an visible attribution to <em>netzmacht creative</em> in the map attribution control.
|
||||
If you want to remove this attribution, you have to purchase a commercial license.
|
||||
For more details visit the <a href="http://contao-leaflet.netzmacht.de" target="_blank">project website</a>.
|
||||
For more details visit the <a href="https://netzmacht.de/contao-leaflet" target="_blank">project website</a>.
|
||||
</p>
|
||||
</div>
|
||||
<div class="right">
|
||||
<a href="http://www.netzmacht.de" <?php echo LINK_NEW_WINDOW; ?>>
|
||||
<img src="system/modules/leaflet/assets/img/logo.png"></a>
|
||||
<p>
|
||||
<strong class="company">netzmacht <em>creative</em></strong><br>
|
||||
<strong class="company">netzmacht </strong><br>
|
||||
David Molineus<br>
|
||||
</p>
|
||||
<p>
|
||||
@@ -51,12 +51,12 @@
|
||||
<p>There are many ways you can con­tribute. Translations,
|
||||
docu­mentation or code contributions are welcome.
|
||||
</p>
|
||||
<p><a href="http://contao-leaflet.netzmacht.de/contribute.html" class="btn" target="_blank">Contribute</a> </p>
|
||||
<p><a href="https://netzmacht/contao-leaflet/contribute.html" class="btn" target="_blank">Contribute</a> </p>
|
||||
</div>
|
||||
<div class="col">
|
||||
<h3>Fund a feature</h3>
|
||||
<p>Contao Leaflet is not feature complete. Have a look at the list of planned feature and support them.</p>
|
||||
<p><a href="http://contao-leaflet.netzmacht.de/planned-features.html" class="btn" target="_blank">Planned features</a> </p>
|
||||
<p><a href="https://netzmacht/contao-leaflet/planned-features.html" class="btn" target="_blank">Planned features</a> </p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
@@ -64,12 +64,12 @@
|
||||
<div class="col">
|
||||
<h3>Individual development</h3>
|
||||
<p>If you have special requirements you can hire me for an individual development.</p>
|
||||
<p><a href="http://contao-leaflet.netzmacht.de/contact.html" class="btn" target="_blank">Contact</a> </p>
|
||||
<p><a href="https://netzmacht/contao-leaflet/contact.html" class="btn" target="_blank">Contact</a> </p>
|
||||
</div>
|
||||
<div class="col">
|
||||
<h3>Commercial license</h3>
|
||||
<p>If you want to remove the attribution in the attribution control, you can purchase a commercial license.</p>
|
||||
<p><a href="http://contao-leaflet.netzmacht.de/commercial-license.html" class="btn" target="_blank">Purchase license</a> </p>
|
||||
<p><a href="https://netzmacht/contao-leaflet/commercial-license.html" class="btn" target="_blank">Purchase license</a> </p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -4,21 +4,23 @@
|
||||
<?php $GLOBALS['TL_JAVASCRIPT'][] = 'assets/leaflet/libs/leaflet/leaflet.js'; ?>
|
||||
<?php $GLOBALS['TL_JAVASCRIPT'][] = 'assets/leaflet/libs/control-geocoder/Control.Geocoder.js'; ?>
|
||||
|
||||
<div id="map_<?php echo $this->field; ?>" style="margin-top: 5px; width: 670px; height: 300px"></div>
|
||||
<div id="map_<?php echo $this->field; ?>" style="margin-top: 5px; width: calc(100% - 28px); height: 300px"></div>
|
||||
<script>
|
||||
var map = L.map('map_<?php echo $this->field; ?>').setView([0, 0], 2);
|
||||
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
|
||||
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
|
||||
}).addTo(map);
|
||||
var element = $('<?php echo $this->field; ?>');
|
||||
var geocoder = L.Control.geocoder({
|
||||
defaultMarkGeocode: false,
|
||||
collapsed: false,
|
||||
placeholder: '<?php echo $GLOBALS['TL_LANG']['leaflet']['searchPosition']; ?>'
|
||||
}).addTo(map);
|
||||
|
||||
geocoder.markGeocode = function(result) {
|
||||
geocoder.on('markgeocode', function(event) {
|
||||
var container = document.createElement('div');
|
||||
var link = document.createElement('button');
|
||||
var element = $('<?php echo $this->field; ?>');
|
||||
var result = event.geocode;
|
||||
|
||||
link.set('style', 'margin-left: 10px;');
|
||||
link.appendText('<?php echo $GLOBALS['TL_LANG']['leaflet']['applyPosition']; ?>');
|
||||
@@ -38,7 +40,7 @@
|
||||
map.fitBounds(result.bbox, { padding: [0, 70]});
|
||||
map.panTo(result.center);
|
||||
|
||||
this._geocodeMarker = new L.Marker(result.center)
|
||||
this._geocodeMarker = new L.Marker(result.center, {draggable: true})
|
||||
.bindPopup(container, {
|
||||
keepInView: true,
|
||||
autoPanPaddingTopLeft: [0, 70]
|
||||
@@ -46,11 +48,16 @@
|
||||
.addTo(map)
|
||||
.openPopup();
|
||||
|
||||
return this;
|
||||
};
|
||||
this._geocodeMarker.on('dragend', function (event) {
|
||||
element.set('value', event.target._latlng.lat + ',' + event.target._latlng.lng);
|
||||
});
|
||||
});
|
||||
|
||||
<?php if ($this->marker): ?>
|
||||
geocoder._geocodeMarker = L.marker(<?php echo $this->marker; ?>).addTo(map);
|
||||
geocoder._geocodeMarker = L.marker(<?php echo $this->marker; ?>, {draggable: true}).addTo(map);
|
||||
geocoder._geocodeMarker.on('dragend', function (event) {
|
||||
element.set('value', event.target._latlng.lat + ',' + event.target._latlng.lng);
|
||||
});
|
||||
map.setZoom(16);
|
||||
map.panTo(<?php echo $this->marker; ?>);
|
||||
<?php endif; ?>
|
||||
|
||||
@@ -9,4 +9,5 @@
|
||||
|
||||
</div>
|
||||
<!-- indexer::continue -->
|
||||
<?php $GLOBALS['TL_BODY'][] = '<script>' . $this->javascript .'</script>'; ?>
|
||||
|
||||
|
||||
@@ -6,12 +6,7 @@
|
||||
<?php endif; ?>
|
||||
|
||||
<div id="<?php echo $this->mapId; ?>" style="<?php echo $this->mapStyle; ?>"></div>
|
||||
<?php if ($this->map): ?>
|
||||
<script>
|
||||
<?php echo $this->map; ?>
|
||||
</script>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
<!-- indexer::continue -->
|
||||
|
||||
<?php $GLOBALS['TL_BODY'][] = '<script>' . $this->javascript .'</script>'; ?>
|
||||
|
||||
31
package.json
Normal file
31
package.json
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"name": "contao-leaflet-maps",
|
||||
"version": "1.0.0",
|
||||
"description": "Leaflet maps for Contao",
|
||||
"main": "gulpfile.js",
|
||||
"dependencies": {
|
||||
"del": "^2.2.2",
|
||||
"gulp": "^3.9.1",
|
||||
"gulp-concat": "^2.6.0",
|
||||
"gulp-uglify": "^2.0.0"
|
||||
},
|
||||
"devDependencies": {},
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/netzmacht/contao-leaflet-maps.git"
|
||||
},
|
||||
"keywords": [
|
||||
"Contao",
|
||||
"Leaflet",
|
||||
"Maps"
|
||||
],
|
||||
"author": "netzmacht David Molineus",
|
||||
"license": "LGPL-3.0",
|
||||
"bugs": {
|
||||
"url": "https://github.com/netzmacht/contao-leaflet-maps/issues"
|
||||
},
|
||||
"homepage": "https://github.com/netzmacht/contao-leaflet-maps#readme"
|
||||
}
|
||||
61
src/Netzmacht/Contao/Leaflet/Alias/DefaultAliasFilter.php
Normal file
61
src/Netzmacht/Contao/Leaflet/Alias/DefaultAliasFilter.php
Normal file
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package netzmacht
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2016 netzmacht David Molineus. All rights reserved.
|
||||
* @filesource
|
||||
*
|
||||
*/
|
||||
|
||||
namespace Netzmacht\Contao\Leaflet\Alias;
|
||||
|
||||
use Netzmacht\Contao\Toolkit\Data\Alias\Filter\AbstractFilter;
|
||||
|
||||
/**
|
||||
* Class DefaultAliasFilter creates an prefix of the alias.
|
||||
*
|
||||
* @package Netzmacht\Contao\Leaflet\Alias
|
||||
*/
|
||||
class DefaultAliasFilter extends AbstractFilter
|
||||
{
|
||||
/**
|
||||
* Alias prefix.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $prefix;
|
||||
|
||||
/**
|
||||
* DefaultAliasFilter constructor.
|
||||
*
|
||||
* @param string $dataContainerName Data container name.
|
||||
* @param int $combine Combine strategy.
|
||||
*/
|
||||
public function __construct($dataContainerName, $combine = self::COMBINE_REPLACE)
|
||||
{
|
||||
parent::__construct(true, $combine);
|
||||
|
||||
$this->prefix = str_replace('tl_leaflet_', '', $dataContainerName);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function repeatUntilValid()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function apply($model, $value, $separator)
|
||||
{
|
||||
if (!$value) {
|
||||
return $this->prefix . $separator . $model->id;
|
||||
}
|
||||
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2015 netzmacht creative David Molineus
|
||||
* @copyright 2014-2016 netzmacht David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2014 netzmacht creative David Molineus
|
||||
* @copyright 2014-2016 netzmacht David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2014 netzmacht creative David Molineus
|
||||
* @copyright 2014-2016 netzmacht David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
namespace Netzmacht\Contao\Leaflet;
|
||||
|
||||
use Netzmacht\Contao\Toolkit\View\Assets\AssetsManager;
|
||||
use Netzmacht\LeafletPHP\Assets;
|
||||
|
||||
/**
|
||||
@@ -27,6 +28,34 @@ class ContaoAssets implements Assets
|
||||
*/
|
||||
private $map;
|
||||
|
||||
/**
|
||||
* Assets manager.
|
||||
*
|
||||
* @var AssetsManager
|
||||
*/
|
||||
private $assetsManager;
|
||||
|
||||
/**
|
||||
* Cached assets.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private $cache = [
|
||||
'stylesheets' => [],
|
||||
'javascripts' => [],
|
||||
'map' => []
|
||||
];
|
||||
|
||||
/**
|
||||
* ContaoAssets constructor.
|
||||
*
|
||||
* @param AssetsManager $assetsManager Contao assets manager.
|
||||
*/
|
||||
public function __construct(AssetsManager $assetsManager)
|
||||
{
|
||||
$this->assetsManager = $assetsManager;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
@@ -34,20 +63,16 @@ class ContaoAssets implements Assets
|
||||
*/
|
||||
public function addJavascript($script, $type = self::TYPE_SOURCE)
|
||||
{
|
||||
$this->cache['javascripts'][] = [$script, $type];
|
||||
|
||||
switch ($type) {
|
||||
case static::TYPE_SOURCE:
|
||||
$GLOBALS['TL_HEAD'][] = sprintf('<script>%s</script>', $script);
|
||||
break;
|
||||
|
||||
case static::TYPE_FILE:
|
||||
if (!\Config::get('debugMode') && TL_MODE === 'FE') {
|
||||
$script .= '|static';
|
||||
}
|
||||
|
||||
// no break
|
||||
|
||||
default:
|
||||
$GLOBALS['TL_JAVASCRIPT'][] = $script;
|
||||
$this->assetsManager->addJavascript($script);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,19 +83,16 @@ class ContaoAssets implements Assets
|
||||
*/
|
||||
public function addStylesheet($stylesheet, $type = self::TYPE_FILE)
|
||||
{
|
||||
$this->cache['stylesheets'][] = [$stylesheet, $type];
|
||||
|
||||
switch ($type) {
|
||||
case static::TYPE_SOURCE:
|
||||
$GLOBALS['TL_HEAD'][] = sprintf('<style>%s</style>', $stylesheet);
|
||||
break;
|
||||
|
||||
case static::TYPE_FILE:
|
||||
if (!\Config::get('debugMode')) {
|
||||
$stylesheet .= '|all|static';
|
||||
}
|
||||
// no break
|
||||
|
||||
default:
|
||||
$GLOBALS['TL_CSS'][] = $stylesheet;
|
||||
$this->assetsManager->addStylesheet($stylesheet);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,8 +109,39 @@ class ContaoAssets implements Assets
|
||||
*/
|
||||
public function setMap($map)
|
||||
{
|
||||
$this->map = $map;
|
||||
$this->cache['map'] = $map;
|
||||
$this->map = $map;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Export to array.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function toArray()
|
||||
{
|
||||
return $this->cache;
|
||||
}
|
||||
|
||||
/**
|
||||
* From array.
|
||||
*
|
||||
* @param array $cache Cache.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function fromArray(array $cache)
|
||||
{
|
||||
foreach ($cache['javascripts'] as $javascript) {
|
||||
$this->addJavascript($javascript[0], $javascript[1]);
|
||||
}
|
||||
|
||||
foreach ($cache['stylesheets'] as $stylesheet) {
|
||||
$this->addStylesheet($stylesheet[0], $stylesheet[1]);
|
||||
}
|
||||
|
||||
$this->map = $cache['map'];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2015 netzmacht creative David Molineus
|
||||
* @copyright 2014-2016 netzmacht David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
@@ -11,8 +11,9 @@
|
||||
|
||||
namespace Netzmacht\Contao\Leaflet\Dca;
|
||||
|
||||
use Netzmacht\Contao\Toolkit\Dca\Callback\Callbacks;
|
||||
use Netzmacht\Contao\Toolkit\Dca\Manager;
|
||||
use Netzmacht\Contao\Toolkit\Dca\Options\OptionsBuilder;
|
||||
use Netzmacht\Contao\Toolkit\ServiceContainerTrait;
|
||||
use Netzmacht\Contao\Leaflet\Model\ControlModel;
|
||||
use Netzmacht\Contao\Leaflet\Model\LayerModel;
|
||||
|
||||
@@ -21,9 +22,21 @@ use Netzmacht\Contao\Leaflet\Model\LayerModel;
|
||||
*
|
||||
* @package Netzmacht\Contao\Leaflet\Dca
|
||||
*/
|
||||
class Control
|
||||
class ControlCallbacks extends Callbacks
|
||||
{
|
||||
use ServiceContainerTrait;
|
||||
/**
|
||||
* Name of the data container.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $name = 'tl_leaflet_control';
|
||||
|
||||
/**
|
||||
* Helper service name.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $serviceName = 'leaflet.dca.control-callbacks';
|
||||
|
||||
/**
|
||||
* The database connection.
|
||||
@@ -34,10 +47,15 @@ class Control
|
||||
|
||||
/**
|
||||
* Construct.
|
||||
*
|
||||
* @param Manager $manager Data container manager.
|
||||
* @param \Database $database Database connection.
|
||||
*/
|
||||
public function __construct()
|
||||
public function __construct(Manager $manager, \Database $database)
|
||||
{
|
||||
$this->database = static::getServiceContainer()->getDatabaseConnection();
|
||||
parent::__construct($manager);
|
||||
|
||||
$this->database = $database;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -63,16 +81,11 @@ class Control
|
||||
*/
|
||||
public function getLayers()
|
||||
{
|
||||
$options = array();
|
||||
$collection = LayerModel::findBy('pid', '0', array('order' => 'title'));
|
||||
$collection = LayerModel::findAll();
|
||||
|
||||
if ($collection) {
|
||||
foreach ($collection as $model) {
|
||||
$options[$model->id] = $model->title;
|
||||
}
|
||||
}
|
||||
|
||||
return $options;
|
||||
return OptionsBuilder::fromCollection($collection, 'title')
|
||||
->asTree()
|
||||
->getOptions();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -84,7 +97,7 @@ class Control
|
||||
{
|
||||
$collection = ControlModel::findBy('type', 'zoom', array('order' => 'title'));
|
||||
|
||||
return OptionsBuilder::fromCollection($collection, 'id', 'title')->getOptions();
|
||||
return OptionsBuilder::fromCollection($collection, 'title')->getOptions();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2014 netzmacht creative David Molineus
|
||||
* @copyright 2014-2016 netzmacht David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
@@ -11,6 +11,8 @@
|
||||
|
||||
namespace Netzmacht\Contao\Leaflet\Dca;
|
||||
|
||||
use ContaoCommunityAlliance\Translator\TranslatorInterface as Translator;
|
||||
use Netzmacht\Contao\Toolkit\Dca\Callback\CallbackFactory;
|
||||
use Netzmacht\Contao\Toolkit\Dca\Options\OptionsBuilder;
|
||||
use Netzmacht\Contao\Leaflet\Model\MapModel;
|
||||
|
||||
@@ -21,6 +23,35 @@ use Netzmacht\Contao\Leaflet\Model\MapModel;
|
||||
*/
|
||||
class FrontendIntegration
|
||||
{
|
||||
/**
|
||||
* Translator.
|
||||
*
|
||||
* @var Translator
|
||||
*/
|
||||
private $translator;
|
||||
|
||||
/**
|
||||
* FrontendIntegration constructor.
|
||||
*
|
||||
* @param Translator $translator Translator.
|
||||
*/
|
||||
public function __construct(Translator $translator)
|
||||
{
|
||||
$this->translator = $translator;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate the callback definition.
|
||||
*
|
||||
* @param string $methodName Callback method name.
|
||||
*
|
||||
* @return callable
|
||||
*/
|
||||
public static function callback($methodName)
|
||||
{
|
||||
return CallbackFactory::service('leaflet.dca.frontend-integration', $methodName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all leaflet maps.
|
||||
*
|
||||
@@ -30,7 +61,7 @@ class FrontendIntegration
|
||||
{
|
||||
$collection = MapModel::findAll();
|
||||
|
||||
return OptionsBuilder::fromCollection($collection, 'id', 'title')->getOptions();
|
||||
return OptionsBuilder::fromCollection($collection, 'title')->getOptions();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -39,8 +70,6 @@ class FrontendIntegration
|
||||
* @param \DataContainer $dataContainer The dataContainer driver.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.Superglobals)
|
||||
*/
|
||||
public function getEditMapLink($dataContainer)
|
||||
{
|
||||
@@ -53,23 +82,23 @@ class FrontendIntegration
|
||||
|
||||
return sprintf(
|
||||
'<a href="%s%s&popup=1&rt=%s" %s>%s</a>',
|
||||
'contao/main.php?do=leaflet&table=tl_leaflet_map&act=edit&id=',
|
||||
'contao/main.php?do=leaflet_map&table=tl_leaflet_map&act=edit&id=',
|
||||
$dataContainer->value,
|
||||
\RequestToken::get(),
|
||||
sprintf(
|
||||
$pattern,
|
||||
specialchars(sprintf($GLOBALS['TL_LANG']['tl_content']['editalias'][1], $dataContainer->value)),
|
||||
specialchars($this->translator->translate('editalias.1', 'tl_content', [$dataContainer->value])),
|
||||
specialchars(
|
||||
str_replace(
|
||||
"'",
|
||||
"\\'",
|
||||
sprintf($GLOBALS['TL_LANG']['tl_content']['editalias'][1], $dataContainer->value)
|
||||
sprintf($this->translator->translate('editalias.1', 'tl_content', [$dataContainer->value]))
|
||||
)
|
||||
)
|
||||
),
|
||||
\Image::getHtml(
|
||||
'alias.gif',
|
||||
$GLOBALS['TL_LANG']['tl_content']['editalias'][0],
|
||||
$this->translator->translate('editalias.0', 'tl_content', [$dataContainer->value]),
|
||||
'style="vertical-align:top"'
|
||||
)
|
||||
);
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2015 netzmacht creative David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
*/
|
||||
|
||||
namespace Netzmacht\Contao\Leaflet\Dca;
|
||||
|
||||
use Netzmacht\Contao\Toolkit\Dca;
|
||||
use Netzmacht\Contao\Toolkit\Dca\Callback\GenerateAliasCallback;
|
||||
|
||||
/**
|
||||
* Helper class for dca functions.
|
||||
*
|
||||
* @package Netzmacht\Contao\Leaflet\Dca
|
||||
*/
|
||||
class Helper
|
||||
{
|
||||
/**
|
||||
* Generate an alias callback which creates a valid javascript var name.
|
||||
*
|
||||
* @param string $table The table.
|
||||
* @param string $column The value column.
|
||||
*
|
||||
* @return GenerateAliasCallback
|
||||
*/
|
||||
public static function createGenerateAliasCallback($table, $column)
|
||||
{
|
||||
$callback = Dca::createGenerateAliasCallback($table, $column);
|
||||
$callback->getGenerator()->addFilter(
|
||||
function ($value) {
|
||||
return str_replace('-', '_', $value);
|
||||
}
|
||||
);
|
||||
|
||||
return $callback;
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2014 netzmacht creative David Molineus
|
||||
* @copyright 2014-2016 netzmacht David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
@@ -11,8 +11,10 @@
|
||||
|
||||
namespace Netzmacht\Contao\Leaflet\Dca;
|
||||
|
||||
use ContaoCommunityAlliance\Translator\TranslatorInterface as Translator;
|
||||
use Netzmacht\Contao\Toolkit\Dca\Callback\Callbacks;
|
||||
use Netzmacht\Contao\Toolkit\Dca\Manager;
|
||||
use Netzmacht\Contao\Toolkit\Dca\Options\OptionsBuilder;
|
||||
use Netzmacht\Contao\Toolkit\ServiceContainerTrait;
|
||||
use Netzmacht\Contao\Leaflet\Model\LayerModel;
|
||||
|
||||
/**
|
||||
@@ -20,9 +22,21 @@ use Netzmacht\Contao\Leaflet\Model\LayerModel;
|
||||
*
|
||||
* @package Netzmacht\Contao\Leaflet\Dca
|
||||
*/
|
||||
class Layer
|
||||
class LayerCallbacks extends Callbacks
|
||||
{
|
||||
use ServiceContainerTrait;
|
||||
/**
|
||||
* Name of the data container.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $name = 'tl_leaflet_layer';
|
||||
|
||||
/**
|
||||
* Helper service name.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $serviceName = 'leaflet.dca.layer-callbacks';
|
||||
|
||||
/**
|
||||
* Layers definition.
|
||||
@@ -37,19 +51,55 @@ class Layer
|
||||
* @var \Database
|
||||
*/
|
||||
private $database;
|
||||
|
||||
/**
|
||||
* Tile providers configuration.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private $tileProviders;
|
||||
|
||||
/**
|
||||
* Translator.
|
||||
*
|
||||
* @var Translator
|
||||
*/
|
||||
private $translator;
|
||||
|
||||
/**
|
||||
* OSM amenities.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private $amenities;
|
||||
|
||||
/**
|
||||
* Construct.
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.Superglobals)
|
||||
* @param Manager $manager Data container manager.
|
||||
* @param \Database $database Database connection.
|
||||
* @param Translator $translator Translator.
|
||||
* @param array $layers Leaflet layer configuration.
|
||||
* @param array $tileProviders Tile providers.
|
||||
* @param array $amenities OSM amenities.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->layers = &$GLOBALS['LEAFLET_LAYERS'];
|
||||
$this->database = static::getServiceContainer()->getDatabaseConnection();
|
||||
public function __construct(
|
||||
Manager $manager,
|
||||
\Database $database,
|
||||
Translator $translator,
|
||||
array $layers,
|
||||
array $tileProviders,
|
||||
array $amenities
|
||||
) {
|
||||
parent::__construct($manager);
|
||||
|
||||
\Controller::loadLanguageFile('leaflet_layer');
|
||||
|
||||
$this->database = $database;
|
||||
$this->layers = $layers;
|
||||
$this->tileProviders = $tileProviders;
|
||||
$this->translator = $translator;
|
||||
$this->amenities = $amenities;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -58,16 +108,14 @@ class Layer
|
||||
* @param \DataContainer $dataContainer The dataContainer driver.
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.Superglobals)
|
||||
*/
|
||||
public function getVariants($dataContainer)
|
||||
{
|
||||
if ($dataContainer->activeRecord
|
||||
&& $dataContainer->activeRecord->tile_provider
|
||||
&& !empty($GLOBALS['LEAFLET_TILE_PROVIDERS'][$dataContainer->activeRecord->tile_provider]['variants'])
|
||||
&& !empty($this->tileProviders[$dataContainer->activeRecord->tile_provider]['variants'])
|
||||
) {
|
||||
return $GLOBALS['LEAFLET_TILE_PROVIDERS'][$dataContainer->activeRecord->tile_provider]['variants'];
|
||||
return $this->tileProviders[$dataContainer->activeRecord->tile_provider]['variants'];
|
||||
}
|
||||
|
||||
return array();
|
||||
@@ -80,15 +128,9 @@ class Layer
|
||||
* @param string $label Current row label.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.Superglobals)
|
||||
*/
|
||||
public function generateRow($row, $label)
|
||||
{
|
||||
$alt = empty($GLOBALS['TL_LANG']['leaflet_layer'][$row['type']][0])
|
||||
? $row['type']
|
||||
: $GLOBALS['TL_LANG']['leaflet_layer'][$row['type']][0];
|
||||
|
||||
if (!empty($this->layers[$row['type']]['icon'])) {
|
||||
$src = $this->layers[$row['type']]['icon'];
|
||||
|
||||
@@ -100,6 +142,7 @@ class Layer
|
||||
$src = preg_replace('/(\.[^\.]+)$/', '_1$1', $src);
|
||||
}
|
||||
|
||||
$alt = $this->getFormatter()->formatValue('type', $row['type']);
|
||||
$icon = \Image::getHtml($src, $alt, sprintf('title="%s"', strip_tags($alt)));
|
||||
|
||||
if (!empty($this->layers[$row['type']]['label'])) {
|
||||
@@ -148,7 +191,6 @@ class Layer
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.Superglobals)
|
||||
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
|
||||
*/
|
||||
public function getPasteButtons($dataContainer, $row, $table, $whatever, $children)
|
||||
@@ -161,10 +203,10 @@ class Layer
|
||||
$buffer = sprintf(
|
||||
'<a href="%s" title="%s" onclick="Backend.getScrollOffset()">%s</a> ',
|
||||
$pasteAfterUrl,
|
||||
specialchars(sprintf($GLOBALS['TL_LANG'][$table]['pasteafter'][1], $row['id'])),
|
||||
specialchars($this->translator->translate('pasteafter.1', $table, [$row['id']])),
|
||||
\Image::getHtml(
|
||||
'pasteafter.gif',
|
||||
sprintf($GLOBALS['TL_LANG'][$table]['pasteafter'][1], $row['id'])
|
||||
$this->translator->translate('pasteafter.1', $table, [$row['id']])
|
||||
)
|
||||
);
|
||||
|
||||
@@ -181,10 +223,10 @@ class Layer
|
||||
$buffer .= sprintf(
|
||||
'<a href="%s" title="%s" onclick="Backend.getScrollOffset()">%s</a> ',
|
||||
$pasteIntoUrl,
|
||||
specialchars(sprintf($GLOBALS['TL_LANG'][$table]['pasteinto'][1], $row['id'])),
|
||||
specialchars($this->translator->translate('pasteinto.1', $table, [$row['id']])),
|
||||
\Image::getHtml(
|
||||
'pasteinto.gif',
|
||||
sprintf($GLOBALS['TL_LANG'][$table]['pasteinto'][1], $row['id'])
|
||||
$this->translator->translate('pasteinto.1', $table, [$row['id']])
|
||||
)
|
||||
);
|
||||
|
||||
@@ -237,22 +279,6 @@ class Layer
|
||||
return $this->generateButton($row, $href, $label, $title, $icon, $attributes);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all layers except of the current layer.
|
||||
*
|
||||
* @param \DataContainer $dataContainer The dataContainer driver.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getLayers($dataContainer)
|
||||
{
|
||||
$collection = LayerModel::findBy('id !', $dataContainer->id);
|
||||
|
||||
return OptionsBuilder::fromCollection($collection, 'id', 'title')
|
||||
->asTree()
|
||||
->getOptions();
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete the relations when the layer is deleted.
|
||||
*
|
||||
@@ -326,6 +352,32 @@ class Layer
|
||||
return $options;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all layers except of the current layer.
|
||||
*
|
||||
* @param \DataContainer $dataContainer The dataContainer driver.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getLayers($dataContainer)
|
||||
{
|
||||
$collection = LayerModel::findBy('id !', $dataContainer->id);
|
||||
|
||||
return OptionsBuilder::fromCollection($collection, 'title')
|
||||
->asTree()
|
||||
->getOptions();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all know osm amenities as options.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getAmenities()
|
||||
{
|
||||
return $this->amenities;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a button.
|
||||
*
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2014 netzmacht creative David Molineus
|
||||
* @copyright 2014-2016 netzmacht David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
@@ -11,10 +11,8 @@
|
||||
|
||||
namespace Netzmacht\Contao\Leaflet\Dca;
|
||||
|
||||
use Netzmacht\Contao\Leaflet\Mapper\DefinitionMapper;
|
||||
use Netzmacht\Contao\Leaflet\Mapper\MapMapper;
|
||||
use Netzmacht\Contao\Leaflet\Model\LayerModel;
|
||||
use Netzmacht\Contao\Leaflet\Model\MapModel;
|
||||
use Netzmacht\Contao\Toolkit\Dca\Callback\CallbackFactory;
|
||||
use Netzmacht\LeafletPHP\Value\LatLng;
|
||||
|
||||
/**
|
||||
@@ -22,24 +20,35 @@ use Netzmacht\LeafletPHP\Value\LatLng;
|
||||
*
|
||||
* @package Netzmacht\Contao\Leaflet\Dca
|
||||
*/
|
||||
class Leaflet
|
||||
class LeafletCallbacks
|
||||
{
|
||||
/**
|
||||
* Validate a coordinate.
|
||||
* File system.
|
||||
*
|
||||
* @param mixed $value The given value.
|
||||
*
|
||||
* @return mixed
|
||||
* @var \Files
|
||||
*/
|
||||
public function validateCoordinate($value)
|
||||
private $fileSystem;
|
||||
|
||||
/**
|
||||
* LeafletCallbacks constructor.
|
||||
*
|
||||
* @param \Files $fileSystem File system.
|
||||
*/
|
||||
public function __construct(\Files $fileSystem)
|
||||
{
|
||||
if (!empty($value)) {
|
||||
// Validate by creating latlng object. Throws an exception.
|
||||
$this->fileSystem = $fileSystem;
|
||||
}
|
||||
|
||||
LatLng::fromString($value);
|
||||
}
|
||||
|
||||
return $value;
|
||||
/**
|
||||
* Generate the callback definition.
|
||||
*
|
||||
* @param string $methodName Callback method name.
|
||||
*
|
||||
* @return callable
|
||||
*/
|
||||
public static function callback($methodName)
|
||||
{
|
||||
return CallbackFactory::service('leaflet.dca.common', $methodName);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -93,4 +102,18 @@ class Leaflet
|
||||
|
||||
return $options;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear the leaflet cache.
|
||||
*
|
||||
* @param mixed $value Value when used as save_callback.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function clearCache($value = null)
|
||||
{
|
||||
$this->fileSystem->rrdir('system/cache/leaflet', true);
|
||||
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2015 netzmacht creative David Molineus
|
||||
* @copyright 2014-2016 netzmacht David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
@@ -11,16 +11,31 @@
|
||||
|
||||
namespace Netzmacht\Contao\Leaflet\Dca;
|
||||
|
||||
use Netzmacht\Contao\Toolkit\ServiceContainerTrait;
|
||||
use Netzmacht\Contao\Leaflet\Model\LayerModel;
|
||||
use Netzmacht\Contao\Toolkit\Dca\Callback\Callbacks;
|
||||
use Netzmacht\Contao\Toolkit\Dca\Manager;
|
||||
use Netzmacht\Contao\Toolkit\Dca\Options\OptionsBuilder;
|
||||
|
||||
/**
|
||||
* Class Map is the helper class for the tl_leaflet_map dca.
|
||||
*
|
||||
* @package Netzmacht\Contao\Leaflet\Dca
|
||||
*/
|
||||
class Map
|
||||
class MapCallbacks extends Callbacks
|
||||
{
|
||||
use ServiceContainerTrait;
|
||||
/**
|
||||
* Name of the data container.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $name = 'tl_leaflet_map';
|
||||
|
||||
/**
|
||||
* Helper service name.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $serviceName = 'leaflet.dca.map-callbacks';
|
||||
|
||||
/**
|
||||
* The database connection.
|
||||
@@ -31,10 +46,15 @@ class Map
|
||||
|
||||
/**
|
||||
* Construct.
|
||||
*
|
||||
* @param Manager $manager Data container manager.
|
||||
* @param \Database $database Database connection.
|
||||
*/
|
||||
public function __construct()
|
||||
public function __construct(Manager $manager, \Database $database)
|
||||
{
|
||||
$this->database = static::getServiceContainer()->getDatabaseConnection();
|
||||
parent::__construct($manager);
|
||||
|
||||
$this->database = $database;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -120,4 +140,20 @@ class Map
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all layers except of the current layer.
|
||||
*
|
||||
* @param \DataContainer $dataContainer The dataContainer driver.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getLayers($dataContainer)
|
||||
{
|
||||
$collection = LayerModel::findBy('id !', $dataContainer->id);
|
||||
|
||||
return OptionsBuilder::fromCollection($collection, 'title')
|
||||
->asTree()
|
||||
->getOptions();
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2015 netzmacht creative David Molineus
|
||||
* @copyright 2014-2016 netzmacht David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
@@ -20,7 +20,7 @@ use Netzmacht\Contao\Leaflet\Model\PopupModel;
|
||||
*
|
||||
* @package Netzmacht\Contao\Leaflet\Dca
|
||||
*/
|
||||
class Marker
|
||||
class MarkerCallbacks
|
||||
{
|
||||
/**
|
||||
* Generate the row label.
|
||||
@@ -44,7 +44,6 @@ class Marker
|
||||
$collection = IconModel::findAll(array('order' => 'title'));
|
||||
$builder = OptionsBuilder::fromCollection(
|
||||
$collection,
|
||||
'id',
|
||||
function ($model) {
|
||||
return sprintf('%s [%s]', $model['title'], $model['type']);
|
||||
}
|
||||
@@ -61,7 +60,7 @@ class Marker
|
||||
public function getPopups()
|
||||
{
|
||||
$collection = PopupModel::findAll(array('order' => 'title'));
|
||||
$builder = OptionsBuilder::fromCollection($collection, 'id', 'title');
|
||||
$builder = OptionsBuilder::fromCollection($collection, 'title');
|
||||
|
||||
return $builder->getOptions();
|
||||
}
|
||||
133
src/Netzmacht/Contao/Leaflet/Dca/Validator.php
Normal file
133
src/Netzmacht/Contao/Leaflet/Dca/Validator.php
Normal file
@@ -0,0 +1,133 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package netzmacht
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2016 netzmacht David Molineus. All rights reserved.
|
||||
* @filesource
|
||||
*
|
||||
*/
|
||||
|
||||
namespace Netzmacht\Contao\Leaflet\Dca;
|
||||
|
||||
use ContaoCommunityAlliance\Translator\TranslatorInterface as Translator;
|
||||
use Netzmacht\Contao\Toolkit\Dca\Callback\CallbackFactory;
|
||||
use Netzmacht\LeafletPHP\Value\LatLng;
|
||||
|
||||
/**
|
||||
* Class Validator.
|
||||
*
|
||||
* @package Netzmacht\Contao\Leaflet\Dca
|
||||
*/
|
||||
class Validator
|
||||
{
|
||||
/**
|
||||
* Translator.
|
||||
*
|
||||
* @var Translator;
|
||||
*/
|
||||
private $translator;
|
||||
|
||||
/**
|
||||
* Validator constructor.
|
||||
*
|
||||
* @param Translator $translator Translator.
|
||||
*/
|
||||
public function __construct(Translator $translator)
|
||||
{
|
||||
$this->translator = $translator;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate the callback definition.
|
||||
*
|
||||
* @param string $methodName Callback method name.
|
||||
*
|
||||
* @return callable
|
||||
*/
|
||||
public static function callback($methodName)
|
||||
{
|
||||
return CallbackFactory::service('leaflet.dca.validator', $methodName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate coordinates.
|
||||
*
|
||||
* @param mixed $value Given value.
|
||||
*
|
||||
* @return mixed
|
||||
* @throws \InvalidArgumentException When invalid coordinates give.
|
||||
*/
|
||||
public function validateCoordinates($value)
|
||||
{
|
||||
try {
|
||||
LatLng::fromString($value);
|
||||
} catch (\Exception $e) {
|
||||
throw new \InvalidArgumentException(
|
||||
$this->translator->translate('invalidCoordinates', 'leaflet', [$value]),
|
||||
0,
|
||||
$e
|
||||
);
|
||||
}
|
||||
|
||||
return $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate multiple coordinates.
|
||||
*
|
||||
* @param mixed $values Given value.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function validateMultipleCoordinates($values)
|
||||
{
|
||||
if (!is_array($values)) {
|
||||
$lines = explode("\n", $values);
|
||||
} else {
|
||||
$lines = $values;
|
||||
}
|
||||
|
||||
foreach ($lines as $coordinate) {
|
||||
$this->validateCoordinates($coordinate);
|
||||
}
|
||||
|
||||
return $values;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate multiple coordinate sets.
|
||||
*
|
||||
* @param mixed $values Given value.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function validateMultipleCoordinateSets($values)
|
||||
{
|
||||
$sets = deserialize($values, true);
|
||||
foreach ($sets as $lines) {
|
||||
$this->validateMultipleCoordinates($lines);
|
||||
}
|
||||
|
||||
return $values;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate an alias.
|
||||
*
|
||||
* @param string $value Given value.
|
||||
*
|
||||
* @return string
|
||||
* @throws \InvalidArgumentException When invalid value given.
|
||||
*/
|
||||
public function validateAlias($value)
|
||||
{
|
||||
if (preg_match('/^[A-Za-z_]+[A-Za-z0-9_]+$/', $value) !== 1) {
|
||||
throw new \InvalidArgumentException(
|
||||
$this->translator->translate('invalidAlias', 'leaflet')
|
||||
);
|
||||
}
|
||||
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2015 netzmacht creative David Molineus
|
||||
* @copyright 2014-2016 netzmacht David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
namespace Netzmacht\Contao\Leaflet\Dca;
|
||||
|
||||
use Netzmacht\Contao\Toolkit\Dca\Callback\Callbacks;
|
||||
use Netzmacht\Contao\Toolkit\Dca\Options\OptionsBuilder;
|
||||
use Netzmacht\Contao\Leaflet\Model\StyleModel;
|
||||
|
||||
@@ -19,8 +20,22 @@ use Netzmacht\Contao\Leaflet\Model\StyleModel;
|
||||
*
|
||||
* @package Netzmacht\Contao\Leaflet\Dca
|
||||
*/
|
||||
class Vector
|
||||
class VectorCallbacks extends Callbacks
|
||||
{
|
||||
/**
|
||||
* Name of the data container.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $name = 'tl_leaflet_vector';
|
||||
|
||||
/**
|
||||
* Helper service name.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $serviceName = 'leaflet.dca.vector-callbacks';
|
||||
|
||||
/**
|
||||
* Generate the row label.
|
||||
*
|
||||
@@ -30,7 +45,11 @@ class Vector
|
||||
*/
|
||||
public function generateRow($row)
|
||||
{
|
||||
return sprintf('%s <span class="tl_gray">[%s]</span>', $row['title'], $row['type']);
|
||||
return sprintf(
|
||||
'%s <span class="tl_gray">(%s)</span>',
|
||||
$row['title'],
|
||||
$this->getFormatter()->formatValue('type', $row['type'])
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -42,6 +61,6 @@ class Vector
|
||||
{
|
||||
$collection = StyleModel::findAll(array('order' => 'title'));
|
||||
|
||||
return OptionsBuilder::fromCollection($collection, 'id', 'title')->getOptions();
|
||||
return OptionsBuilder::fromCollection($collection, 'title')->getOptions();
|
||||
}
|
||||
}
|
||||
168
src/Netzmacht/Contao/Leaflet/Definition/Layer/OverpassLayer.php
Normal file
168
src/Netzmacht/Contao/Leaflet/Definition/Layer/OverpassLayer.php
Normal file
@@ -0,0 +1,168 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package netzmacht
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2016 netzmacht David Molineus. All rights reserved.
|
||||
* @filesource
|
||||
*
|
||||
*/
|
||||
|
||||
namespace Netzmacht\Contao\Leaflet\Definition\Layer;
|
||||
|
||||
use Netzmacht\JavascriptBuilder\Encoder;
|
||||
use Netzmacht\JavascriptBuilder\Type\AnonymousFunction;
|
||||
use Netzmacht\JavascriptBuilder\Type\ConvertsToJavascript;
|
||||
use Netzmacht\JavascriptBuilder\Type\Expression;
|
||||
use Netzmacht\LeafletPHP\Definition\AbstractLayer;
|
||||
use Netzmacht\LeafletPHP\Definition\HasOptions;
|
||||
use Netzmacht\LeafletPHP\Encoder\EncodeHelperTrait;
|
||||
|
||||
/**
|
||||
* Class OverpassLayer provides implementation of https://github.com/kartenkarsten/leaflet-layer-overpass.
|
||||
*
|
||||
* @package Netzmacht\LeafletPHP\Plugins\OverpassLayer
|
||||
*/
|
||||
class OverpassLayer extends AbstractLayer implements HasOptions, ConvertsToJavascript
|
||||
{
|
||||
use EncodeHelperTrait;
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static function getType()
|
||||
{
|
||||
return 'OverpassLayer';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static function getRequiredLibraries()
|
||||
{
|
||||
$libs = parent::getRequiredLibraries();
|
||||
$libs[] = 'osmtogeojson';
|
||||
|
||||
return $libs;
|
||||
}
|
||||
|
||||
/**
|
||||
* OverpassLayer constructor.
|
||||
*
|
||||
* @param string $identifier Indicator of the layer.
|
||||
* @param array $options Options.
|
||||
*/
|
||||
public function __construct($identifier, array $options = [])
|
||||
{
|
||||
parent::__construct($identifier);
|
||||
|
||||
$this->setOptions($options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the query.
|
||||
*
|
||||
* @param string $query Query.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setQuery($query)
|
||||
{
|
||||
return $this->setOption('query', $query);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get query.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getQuery()
|
||||
{
|
||||
return $this->getOption('query', '(node(BBOX)[organic];node(BBOX)[second_hand];);out qt;');
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the endpoint.
|
||||
*
|
||||
* @param string $endpoint Endpoint.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setEndpoint($endpoint)
|
||||
{
|
||||
return $this->setOption('endpoint', $endpoint);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get endpoint.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getEndpoint()
|
||||
{
|
||||
return $this->getOption('endpoint', '//overpass-api.de/api/');
|
||||
}
|
||||
|
||||
/**
|
||||
* Set point to layer function.
|
||||
*
|
||||
* @param Expression|AnonymousFunction $function The function callback.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setPointToLayer($function)
|
||||
{
|
||||
return $this->setOption('pointToLayer', $function);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set on each feature function.
|
||||
*
|
||||
* @param Expression|AnonymousFunction $function The function callback.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setOnEachFeature($function)
|
||||
{
|
||||
return $this->setOption('onEachFeature', $function);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the minZoom.
|
||||
*
|
||||
* @param int $minZoom MinZoom.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setMinZoom($minZoom)
|
||||
{
|
||||
return $this->setOption('minZoom', (int) $minZoom);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get minZoom.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getMinZoom()
|
||||
{
|
||||
return $this->getOption('minZoom', 15);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function encode(Encoder $encoder, $flags = null)
|
||||
{
|
||||
$buffer = sprintf(
|
||||
'%s = new L.OverPassLayer(%s)%s',
|
||||
$encoder->encodeReference($this),
|
||||
$encoder->encodeArray($this->getOptions(), JSON_FORCE_OBJECT),
|
||||
$encoder->close($flags)
|
||||
);
|
||||
|
||||
$buffer .= $this->encodeMethodCalls($this->getMethodCalls(), $encoder, $flags);
|
||||
|
||||
return $buffer;
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2015 netzmacht creative David Molineus
|
||||
* @copyright 2014-2016 netzmacht David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2015 netzmacht creative David Molineus
|
||||
* @copyright 2014-2016 netzmacht David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package netzmacht
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2016 netzmacht David Molineus. All rights reserved.
|
||||
* @filesource
|
||||
*
|
||||
*/
|
||||
|
||||
namespace Netzmacht\Contao\Leaflet\DependencyInjection;
|
||||
|
||||
use Doctrine\Common\Cache\Cache;
|
||||
use Netzmacht\Contao\Leaflet\Boot;
|
||||
use Netzmacht\Contao\Leaflet\Frontend\ValueFilter;
|
||||
use Netzmacht\Contao\Leaflet\Mapper\DefinitionMapper;
|
||||
use Netzmacht\Contao\Leaflet\MapProvider;
|
||||
use Netzmacht\Contao\Toolkit\Data\Alias\AliasGenerator;
|
||||
use Netzmacht\LeafletPHP\Assets;
|
||||
use Netzmacht\LeafletPHP\Leaflet;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||
|
||||
/**
|
||||
* Class LeafletServices describes services provided by the leaflet package.
|
||||
*
|
||||
* @package Netzmacht\Contao\Leaflet\DependencyInjection
|
||||
*/
|
||||
class LeafletServices
|
||||
{
|
||||
/**
|
||||
* Service name for the alias generator which creates valid js aliases.
|
||||
*
|
||||
* @return AliasGenerator
|
||||
*/
|
||||
const ALIAS_GENERATOR = 'leaflet.alias-generator.default';
|
||||
|
||||
/**
|
||||
* Service name of the boot handler.
|
||||
*
|
||||
* @return Boot
|
||||
*/
|
||||
const BOOT = 'leaflet.boot';
|
||||
|
||||
/**
|
||||
* Leaflet cache
|
||||
*
|
||||
* @return Cache
|
||||
*/
|
||||
const CACHE = 'leaflet.cache';
|
||||
|
||||
/**
|
||||
* Service name of the definition builder.
|
||||
*
|
||||
* @return Leaflet
|
||||
*/
|
||||
const DEFINITION_BUILDER = 'leaflet.definition.builder';
|
||||
|
||||
/**
|
||||
* Service name of the encoder factory used inside of the definition builder.
|
||||
*
|
||||
* @return \callable
|
||||
*/
|
||||
const DEFINITION_ENCODER_FACTORY = 'leaflet.definition.builder.encoder-factory';
|
||||
|
||||
/**
|
||||
* Service name of the internal used event dispatcher of the definition builder.
|
||||
*
|
||||
* @return EventDispatcherInterface
|
||||
*/
|
||||
const DEFINITION_BUILDER_EVENT_DISPATCHER = 'leaflet.definition.builder.event-dispatcher';
|
||||
|
||||
/**
|
||||
* Service name of the definition mapper.
|
||||
*
|
||||
* @return DefinitionMapper
|
||||
*/
|
||||
const DEFINITION_MAPPER = 'leaflet.definition.mapper';
|
||||
|
||||
/**
|
||||
* Service name of the leaflet map provider.
|
||||
*
|
||||
* @return MapProvider
|
||||
*/
|
||||
const MAP_PROVIDER = 'leaflet.map.provider';
|
||||
|
||||
/**
|
||||
* Service name of the map assets handler.
|
||||
*
|
||||
* @return Assets
|
||||
*/
|
||||
const MAP_ASSETS = 'leaflet.map.assets';
|
||||
|
||||
/**
|
||||
* Service name of the frontend value filter.
|
||||
*
|
||||
* @return ValueFilter
|
||||
*/
|
||||
const FRONTEND_VALUE_FILTER = 'leaflet.frontend.value-filter';
|
||||
|
||||
/**
|
||||
* Service name for the alias generator uses for rows being unique in the pid.
|
||||
*
|
||||
* @return AliasGenerator
|
||||
*/
|
||||
const PARENT_ALIAS_GENERATOR = 'leaflet.alias-generator.parent';
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2014 netzmacht creative David Molineus
|
||||
* @copyright 2014-2016 netzmacht David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2015 netzmacht creative David Molineus
|
||||
* @copyright 2014-2016 netzmacht David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2015 netzmacht creative David Molineus
|
||||
* @copyright 2014-2016 netzmacht David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2014 netzmacht creative David Molineus
|
||||
* @copyright 2014-2016 netzmacht David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2014 netzmacht creative David Molineus
|
||||
* @copyright 2014-2016 netzmacht David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2014 netzmacht creative David Molineus
|
||||
* @copyright 2014-2016 netzmacht David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2014 netzmacht creative David Molineus
|
||||
* @copyright 2014-2016 netzmacht David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2015 netzmacht creative David Molineus
|
||||
* @copyright 2014-2016 netzmacht David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2015 netzmacht creative David Molineus
|
||||
* @copyright 2014-2016 netzmacht David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2015 netzmacht creative David Molineus
|
||||
* @copyright 2014-2016 netzmacht David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
|
||||
150
src/Netzmacht/Contao/Leaflet/Frontend/AbstractMapHybrid.php
Normal file
150
src/Netzmacht/Contao/Leaflet/Frontend/AbstractMapHybrid.php
Normal file
@@ -0,0 +1,150 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2014-2016 netzmacht David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
*/
|
||||
|
||||
namespace Netzmacht\Contao\Leaflet\Frontend;
|
||||
|
||||
use ContaoCommunityAlliance\Translator\TranslatorInterface as Translator;
|
||||
use Database\Result;
|
||||
use Model\Collection;
|
||||
use Netzmacht\Contao\Leaflet\MapProvider;
|
||||
use Netzmacht\Contao\Leaflet\Model\MapModel;
|
||||
use Netzmacht\Contao\Toolkit\Component\Hybrid\AbstractHybrid;
|
||||
use Netzmacht\Contao\Toolkit\View\Template\TemplateFactory;
|
||||
|
||||
/**
|
||||
* Class HybridTrait provides method required by the frontend module and content element the same time.
|
||||
*
|
||||
* @package Netzmacht\Contao\Leaflet\Frontend
|
||||
*/
|
||||
abstract class AbstractMapHybrid extends AbstractHybrid
|
||||
{
|
||||
/**
|
||||
* The map provider.
|
||||
*
|
||||
* @var MapProvider
|
||||
*/
|
||||
private $mapProvider;
|
||||
|
||||
/**
|
||||
* The user input.
|
||||
*
|
||||
* @var \Input
|
||||
*/
|
||||
private $input;
|
||||
|
||||
/**
|
||||
* The Contao config.
|
||||
*
|
||||
* @var \Config
|
||||
*/
|
||||
private $config;
|
||||
|
||||
/**
|
||||
* HybridTrait constructor.
|
||||
*
|
||||
* @param Result|\Model|Collection $model Component model.
|
||||
* @param TemplateFactory $templateFactory Template factory.
|
||||
* @param Translator $translator Translator.
|
||||
* @param MapProvider $mapProvider Map provider.
|
||||
* @param \Input $input Request Input.
|
||||
* @param \Config $config Config.
|
||||
* @param string $column Column in which the element appears.
|
||||
*/
|
||||
public function __construct(
|
||||
$model,
|
||||
TemplateFactory $templateFactory,
|
||||
Translator $translator,
|
||||
MapProvider $mapProvider,
|
||||
\Input $input,
|
||||
\Config $config,
|
||||
$column = null
|
||||
) {
|
||||
parent::__construct($model, $templateFactory, $translator, $column);
|
||||
|
||||
$this->mapProvider = $mapProvider;
|
||||
$this->input = $input;
|
||||
$this->config = $config;
|
||||
}
|
||||
|
||||
/**
|
||||
* Do the frontend integration generation.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function generate()
|
||||
{
|
||||
$this->mapProvider->handleAjaxRequest($this->getIdentifier());
|
||||
|
||||
if (TL_MODE === 'BE') {
|
||||
$model = MapModel::findByPk($this->get('leaflet_map'));
|
||||
|
||||
$template = $this->getTemplateFactory()->createBackendTemplate('be_wildcard');
|
||||
|
||||
if ($model) {
|
||||
$href = 'contao/main.php?do=leaflet&table=tl_leaflet_map&act=edit&id=' . $model->id;
|
||||
|
||||
$template->set('wildcard', '### LEAFLET MAP ' . $model->title . ' ###');
|
||||
$template->set('title', $this->get('headline'));
|
||||
$template->set('id', $model->id);
|
||||
$template->set('link', $model->title);
|
||||
$template->set('href', $href);
|
||||
}
|
||||
|
||||
return $template->parse();
|
||||
}
|
||||
|
||||
return parent::generate();
|
||||
}
|
||||
|
||||
/**
|
||||
* Do the frontend integration compiling.
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @throws \Exception If the map could not be created.
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.Superglobals)
|
||||
*/
|
||||
protected function compile()
|
||||
{
|
||||
try {
|
||||
$template = $this->get('leaflet_template') ?: 'leaflet_map_js';
|
||||
$mapId = $this->getIdentifier();
|
||||
$map = $this->mapProvider->generate($this->get('leaflet_map'), null, $mapId, $template);
|
||||
|
||||
$this->template->set('javascript', $map);
|
||||
$this->template->set('mapId', $mapId);
|
||||
|
||||
$style = '';
|
||||
$height = deserialize($this->get('leaflet_height'), true);
|
||||
$width = deserialize($this->get('leaflet_width'), true);
|
||||
|
||||
if (!empty($width['value'])) {
|
||||
$style .= 'width:' . $width['value'] . $width['unit'] . ';';
|
||||
}
|
||||
|
||||
if (!empty($height['value'])) {
|
||||
$style .= 'height:' . $height['value'] . $height['unit'] . ';';
|
||||
}
|
||||
|
||||
$this->template->set('mapStyle', $style);
|
||||
} catch (\Exception $e) {
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the component identifier which is used as unique name.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
abstract protected function getIdentifier();
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2015 netzmacht creative David Molineus
|
||||
* @copyright 2014-2016 netzmacht David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
@@ -12,7 +12,7 @@
|
||||
namespace Netzmacht\Contao\Leaflet\Frontend;
|
||||
|
||||
use Netzmacht\Contao\Leaflet\Filter\Filter;
|
||||
use Netzmacht\Contao\Leaflet\MapService;
|
||||
use Netzmacht\Contao\Leaflet\MapProvider;
|
||||
|
||||
/**
|
||||
* The data controller handles ajax request for sub data.
|
||||
@@ -22,11 +22,11 @@ use Netzmacht\Contao\Leaflet\MapService;
|
||||
class DataController
|
||||
{
|
||||
/**
|
||||
* The map service.
|
||||
* The map provider.
|
||||
*
|
||||
* @var MapService
|
||||
* @var MapProvider
|
||||
*/
|
||||
private $mapService;
|
||||
private $mapProvider;
|
||||
|
||||
/**
|
||||
* The user input data.
|
||||
@@ -40,39 +40,59 @@ class DataController
|
||||
'filter' => null,
|
||||
'values' => null
|
||||
);
|
||||
|
||||
/**
|
||||
* Filters configuration.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private $filters;
|
||||
|
||||
/**
|
||||
* Display errors.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
private $displayErrors;
|
||||
|
||||
/**
|
||||
* Construct.
|
||||
*
|
||||
* @param MapService $mapService The map service.
|
||||
* @param array $input The user input as array.
|
||||
* @param MapProvider $mapProvider The map provider.
|
||||
* @param array $filters Filters configuration.
|
||||
* @param bool $displayErrors Display errors.
|
||||
*/
|
||||
public function __construct(MapService $mapService, $input)
|
||||
public function __construct(MapProvider $mapProvider, array $filters, $displayErrors)
|
||||
{
|
||||
$this->mapService = $mapService;
|
||||
$this->input = array_merge($this->input, $input);
|
||||
$this->mapProvider = $mapProvider;
|
||||
$this->filters = $filters;
|
||||
$this->displayErrors = $displayErrors;
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the controller and create the data response.
|
||||
*
|
||||
* @param array $input The user input as array.
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @throws \Exception If anything went wrong.
|
||||
*/
|
||||
public function execute()
|
||||
public function execute(array $input)
|
||||
{
|
||||
$input = array_merge($this->input, $input);
|
||||
|
||||
try {
|
||||
if ($this->input['filter']) {
|
||||
$filter = $this->createFilter();
|
||||
if ($input['filter']) {
|
||||
$filter = $this->createFilter($input);
|
||||
} else {
|
||||
$filter = null;
|
||||
}
|
||||
|
||||
list($data, $error) = $this->loadData($this->input['type'], $this->input['id'], $filter);
|
||||
$this->encodeData($this->input['format'], $data);
|
||||
list($data, $error) = $this->loadData($input['type'], $input['id'], $filter);
|
||||
$this->encodeData($input['format'], $data);
|
||||
} catch (\Exception $e) {
|
||||
if (\Config::get('debugMode') || \Config::get('displayErrors')) {
|
||||
if ($this->displayErrors) {
|
||||
throw $e;
|
||||
}
|
||||
$error = true;
|
||||
@@ -120,7 +140,7 @@ class DataController
|
||||
|
||||
switch ($type) {
|
||||
case 'layer':
|
||||
$data = $this->mapService->getFeatureCollection($dataId, $filter);
|
||||
$data = $this->mapProvider->getFeatureCollection($dataId, $filter);
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -135,20 +155,22 @@ class DataController
|
||||
/**
|
||||
* Create a filter.
|
||||
*
|
||||
* @param array $input The user input as array.
|
||||
*
|
||||
* @return Filter
|
||||
* @throws \RuntimeException If the filter is not defined.
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.Superglobals)
|
||||
*/
|
||||
private function createFilter()
|
||||
private function createFilter($input)
|
||||
{
|
||||
if (!isset($GLOBALS['LEAFLET_FILTERS'][$this->input['filter']])) {
|
||||
throw new \RuntimeException(sprintf('Undefined filter "%s".', $this->input['filter']));
|
||||
if (!isset($this->filters[$input['filter']])) {
|
||||
throw new \RuntimeException(sprintf('Undefined filter "%s".', $input['filter']));
|
||||
}
|
||||
|
||||
/** @var Filter $filter */
|
||||
$filter = $GLOBALS['LEAFLET_FILTERS'][$this->input['filter']];
|
||||
$filter = $this->filters[$input['filter']];
|
||||
|
||||
return $filter::fromRequest($this->input['values']);
|
||||
return $filter::fromRequest($input['values']);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,129 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2015 netzmacht creative David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
*/
|
||||
|
||||
namespace Netzmacht\Contao\Leaflet\Frontend;
|
||||
|
||||
use Netzmacht\Contao\Leaflet\MapService;
|
||||
use Netzmacht\Contao\Leaflet\Model\MapModel;
|
||||
|
||||
/**
|
||||
* Class HybridTrait provides method required by the frontend module and content element the same time.
|
||||
*
|
||||
* @package Netzmacht\Contao\Leaflet\Frontend
|
||||
*/
|
||||
trait HybridTrait
|
||||
{
|
||||
/**
|
||||
* The map service.
|
||||
*
|
||||
* @var MapService
|
||||
*/
|
||||
private $mapService;
|
||||
|
||||
/**
|
||||
* The user input.
|
||||
*
|
||||
* @var \Input
|
||||
*/
|
||||
private $input;
|
||||
|
||||
/**
|
||||
* The Contao config.
|
||||
*
|
||||
* @var \Config
|
||||
*/
|
||||
private $config;
|
||||
|
||||
/**
|
||||
* Construct.
|
||||
*
|
||||
* @param \ContentModel $objElement Content element model.
|
||||
* @param string $strColumn Layout column.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function construct($objElement, $strColumn = 'main')
|
||||
{
|
||||
parent::__construct($objElement, $strColumn);
|
||||
|
||||
$this->mapService = static::getService('leaflet.map.service');
|
||||
$this->input = static::getService('input');
|
||||
$this->config = static::getService('config');
|
||||
}
|
||||
|
||||
/**
|
||||
* Do the frontend integration generation.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function generate()
|
||||
{
|
||||
$this->mapService->handleAjaxRequest($this->getIdentifier());
|
||||
|
||||
if (TL_MODE === 'BE') {
|
||||
$model = MapModel::findByPK($this->leaflet_map);
|
||||
|
||||
$template = new \BackendTemplate('be_wildcard');
|
||||
|
||||
if ($model) {
|
||||
$href = 'contao/main.php?do=leaflet&table=tl_leaflet_map&act=edit&id=' . $model->id;
|
||||
|
||||
$template->wildcard = '### LEAFLET MAP ' . $model->title . ' ###';
|
||||
$template->title = $this->headline;
|
||||
$template->id = $model->id;
|
||||
$template->link = $model->title;
|
||||
$template->href = $href;
|
||||
}
|
||||
|
||||
return $template->parse();
|
||||
}
|
||||
|
||||
return parent::generate();
|
||||
}
|
||||
|
||||
/**
|
||||
* Do the frontend integration compiling.
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @throws \Exception If the map could not be created.
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.Superglobals)
|
||||
*/
|
||||
protected function compile()
|
||||
{
|
||||
try {
|
||||
$template = $this->leaflet_template ?: 'leaflet_map_js';
|
||||
$mapId = $this->getIdentifier();
|
||||
$map = $this->mapService->generate($this->leaflet_map, null, $mapId, $template);
|
||||
|
||||
$GLOBALS['TL_BODY'][] = '<script>' . $map .'</script>';
|
||||
|
||||
$this->Template->mapId = $mapId;
|
||||
|
||||
$style = '';
|
||||
$height = deserialize($this->leaflet_height, true);
|
||||
$width = deserialize($this->leaflet_width, true);
|
||||
|
||||
if (!empty($width['value'])) {
|
||||
$style .= 'width:' . $width['value'] . $width['unit'] . ';';
|
||||
}
|
||||
|
||||
if (!empty($height['value'])) {
|
||||
$style .= 'height:' . $height['value'] . $height['unit'] . ';';
|
||||
}
|
||||
|
||||
$this->Template->mapStyle = $style;
|
||||
} catch (\Exception $e) {
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2015 netzmacht creative David Molineus
|
||||
* @copyright 2014-2016 netzmacht David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
namespace Netzmacht\Contao\Leaflet\Frontend\InsertTag;
|
||||
|
||||
use Netzmacht\Contao\Leaflet\MapService;
|
||||
use Netzmacht\Contao\Leaflet\MapProvider;
|
||||
use Netzmacht\Contao\Toolkit\InsertTag\Parser;
|
||||
|
||||
/**
|
||||
@@ -31,9 +31,9 @@ class LeafletInsertTagParser implements Parser
|
||||
/**
|
||||
* The map service.
|
||||
*
|
||||
* @var MapService
|
||||
* @var MapProvider
|
||||
*/
|
||||
private $mapService;
|
||||
private $mapProvider;
|
||||
|
||||
/**
|
||||
* Debug mode.
|
||||
@@ -45,13 +45,13 @@ class LeafletInsertTagParser implements Parser
|
||||
/**
|
||||
* LeafletInsertTagParser constructor.
|
||||
*
|
||||
* @param MapService $mapService Map service.
|
||||
* @param bool $debugMode Debug mode.
|
||||
* @param MapProvider $mapProvider Map provider.
|
||||
* @param bool $debugMode Debug mode.
|
||||
*/
|
||||
public function __construct(MapService $mapService, $debugMode)
|
||||
public function __construct(MapProvider $mapProvider, $debugMode)
|
||||
{
|
||||
$this->mapService = $mapService;
|
||||
$this->debugMode = $debugMode;
|
||||
$this->mapProvider = $mapProvider;
|
||||
$this->debugMode = $debugMode;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -101,7 +101,7 @@ class LeafletInsertTagParser implements Parser
|
||||
private function generateMap($mapId, $template, $style)
|
||||
{
|
||||
try {
|
||||
return $this->mapService->generate($mapId, null, $mapId, $template, $style);
|
||||
return $this->mapProvider->generate($mapId, null, $mapId, $template, $style);
|
||||
} catch (\Exception $e) {
|
||||
if ($this->debugMode) {
|
||||
throw $e;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2014 netzmacht creative David Molineus
|
||||
* @copyright 2014-2016 netzmacht David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
@@ -11,34 +11,19 @@
|
||||
|
||||
namespace Netzmacht\Contao\Leaflet\Frontend;
|
||||
|
||||
use ContentElement;
|
||||
use Netzmacht\Contao\Toolkit\ServiceContainerTrait;
|
||||
use Netzmacht\Contao\Leaflet\MapService;
|
||||
|
||||
/**
|
||||
* The content element for the leaflet map.
|
||||
*
|
||||
* @property int leaflet_map
|
||||
*/
|
||||
class MapElement extends \ContentElement
|
||||
class MapElement extends AbstractMapHybrid
|
||||
{
|
||||
use ServiceContainerTrait;
|
||||
use HybridTrait;
|
||||
|
||||
/**
|
||||
* Template name.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $strTemplate = 'ce_leaflet_map';
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function __construct($objElement, $strColumn = 'main')
|
||||
{
|
||||
$this->construct($objElement, $strColumn);
|
||||
}
|
||||
protected $templateName = 'ce_leaflet_map';
|
||||
|
||||
/**
|
||||
* Get the identifier.
|
||||
@@ -47,14 +32,14 @@ class MapElement extends \ContentElement
|
||||
*/
|
||||
protected function getIdentifier()
|
||||
{
|
||||
if ($this->leaflet_mapId) {
|
||||
return $this->leaflet_mapId;
|
||||
if ($this->get('leaflet_mapId')) {
|
||||
return $this->get('leaflet_mapId');
|
||||
}
|
||||
|
||||
if ($this->cssID[0]) {
|
||||
return 'map_' . $this->cssID[0];
|
||||
if ($this->get('cssID')[0]) {
|
||||
return 'map_' . $this->get('cssID')[0];
|
||||
}
|
||||
|
||||
return 'map_ce_' . $this->id;
|
||||
return 'map_ce_' . $this->get('id');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2015 netzmacht creative David Molineus
|
||||
* @copyright 2014-2016 netzmacht David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
@@ -11,33 +11,19 @@
|
||||
|
||||
namespace Netzmacht\Contao\Leaflet\Frontend;
|
||||
|
||||
use Netzmacht\Contao\Toolkit\ServiceContainerTrait;
|
||||
use Netzmacht\Contao\Leaflet\MapService;
|
||||
|
||||
/**
|
||||
* The frontend module for the Leaflet map.
|
||||
*
|
||||
* @package Netzmacht\Contao\Leaflet\Frontend
|
||||
*/
|
||||
class MapModule extends \Module
|
||||
class MapModule extends AbstractMapHybrid
|
||||
{
|
||||
use ServiceContainerTrait;
|
||||
use HybridTrait;
|
||||
|
||||
/**
|
||||
* Template name.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $strTemplate = 'mod_leaflet_map';
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function __construct($objElement, $strColumn = 'main')
|
||||
{
|
||||
$this->construct($objElement, $strColumn);
|
||||
}
|
||||
protected $templateName = 'mod_leaflet_map';
|
||||
|
||||
/**
|
||||
* Get the identifier.
|
||||
@@ -46,14 +32,14 @@ class MapModule extends \Module
|
||||
*/
|
||||
protected function getIdentifier()
|
||||
{
|
||||
if ($this->leaflet_mapId) {
|
||||
return $this->leaflet_mapId;
|
||||
if ($this->get('leaflet_mapId')) {
|
||||
return $this->get('leaflet_mapId');
|
||||
}
|
||||
|
||||
if ($this->cssID[0]) {
|
||||
return 'map_' . $this->cssID[0];
|
||||
if ($this->get('cssID')[0]) {
|
||||
return 'map_' . $this->get('cssID')[0];
|
||||
}
|
||||
|
||||
return 'map_mod_' . $this->id;
|
||||
return 'map_mod_' . $this->get('id');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2015 netzmacht creative David Molineus
|
||||
* @copyright 2014-2016 netzmacht David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2015 netzmacht creative David Molineus
|
||||
* @copyright 2014-2016 netzmacht David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2014 netzmacht creative David Molineus
|
||||
* @copyright 2014-2016 netzmacht David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
namespace Netzmacht\Contao\Leaflet;
|
||||
|
||||
use Doctrine\Common\Cache\Cache;
|
||||
use Netzmacht\Contao\Leaflet\Event\GetJavascriptEvent;
|
||||
use Netzmacht\Contao\Leaflet\Filter\Filter;
|
||||
use Netzmacht\Contao\Leaflet\Frontend\DataController;
|
||||
@@ -18,18 +19,17 @@ use Netzmacht\Contao\Leaflet\Frontend\RequestUrl;
|
||||
use Netzmacht\Contao\Leaflet\Mapper\DefinitionMapper;
|
||||
use Netzmacht\Contao\Leaflet\Model\LayerModel;
|
||||
use Netzmacht\Contao\Leaflet\Model\MapModel;
|
||||
use Netzmacht\LeafletPHP\Assets;
|
||||
use Netzmacht\LeafletPHP\Value\GeoJson\FeatureCollection;
|
||||
use Netzmacht\LeafletPHP\Definition\Map;
|
||||
use Netzmacht\LeafletPHP\Leaflet;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcherInterface as EventDispatcher;
|
||||
|
||||
/**
|
||||
* Class MapService.
|
||||
* Class MapProvider.
|
||||
*
|
||||
* @package Netzmacht\Contao\Leaflet
|
||||
*/
|
||||
class MapService
|
||||
class MapProvider
|
||||
{
|
||||
/**
|
||||
* The definition mapper.
|
||||
@@ -62,10 +62,31 @@ class MapService
|
||||
/**
|
||||
* Map assets collector.
|
||||
*
|
||||
* @var Assets
|
||||
* @var ContaoAssets
|
||||
*/
|
||||
private $assets;
|
||||
|
||||
/**
|
||||
* Request filters configuration.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private $filters;
|
||||
|
||||
/**
|
||||
* Display errors setting.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
private $displayErrors;
|
||||
|
||||
/**
|
||||
* Cache.
|
||||
*
|
||||
* @var Cache
|
||||
*/
|
||||
private $cache;
|
||||
|
||||
/**
|
||||
* Construct.
|
||||
*
|
||||
@@ -73,20 +94,29 @@ class MapService
|
||||
* @param Leaflet $leaflet The Leaflet instance.
|
||||
* @param EventDispatcher $eventDispatcher The Contao event dispatcher.
|
||||
* @param \Input $input Thw request input.
|
||||
* @param Assets $assets Assets handler.
|
||||
* @param ContaoAssets $assets Assets handler.
|
||||
* @param Cache $cache Cache.
|
||||
* @param array $filters Request filters configuration.
|
||||
* @param bool $displayErrors Display errors setting.
|
||||
*/
|
||||
public function __construct(
|
||||
DefinitionMapper $mapper,
|
||||
Leaflet $leaflet,
|
||||
EventDispatcher $eventDispatcher,
|
||||
\Input $input,
|
||||
Assets $assets
|
||||
ContaoAssets $assets,
|
||||
Cache $cache,
|
||||
array $filters,
|
||||
$displayErrors
|
||||
) {
|
||||
$this->mapper = $mapper;
|
||||
$this->leaflet = $leaflet;
|
||||
$this->eventDispatcher = $eventDispatcher;
|
||||
$this->input = $input;
|
||||
$this->assets = $assets;
|
||||
$this->filters = $filters;
|
||||
$this->displayErrors = $displayErrors;
|
||||
$this->cache = $cache;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -145,9 +175,6 @@ class MapService
|
||||
*
|
||||
* @return string
|
||||
* @throws \Exception If generating went wrong.
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
|
||||
* @SuppressWarnings(PHPMD.UnusedLocalVariable)
|
||||
*/
|
||||
public function generate(
|
||||
$mapId,
|
||||
@@ -156,23 +183,38 @@ class MapService
|
||||
$template = 'leaflet_map_js',
|
||||
$style = ''
|
||||
) {
|
||||
$definition = $this->getDefinition($mapId, $filter, $elementId);
|
||||
$template = \Controller::getTemplate($template);
|
||||
if ($mapId instanceof MapModel) {
|
||||
$model = $mapId;
|
||||
$mapId = $mapId->id;
|
||||
} else {
|
||||
$model = $this->getModel($mapId);
|
||||
}
|
||||
|
||||
// @codingStandardsIgnoreStart - Set for the template.
|
||||
$javascript = $this->leaflet->build($definition, $this->assets);
|
||||
$mapId = $definition->getId();
|
||||
// @codingStandardsIgnoreEnd
|
||||
if ($model->cache) {
|
||||
$cacheKey = $this->getCacheKey($mapId, $filter, $elementId, $template, $style);
|
||||
|
||||
ob_start();
|
||||
include $template;
|
||||
$content = ob_get_contents();
|
||||
ob_end_clean();
|
||||
if ($this->cache->contains($cacheKey)) {
|
||||
$cached = $this->cache->fetch($cacheKey);
|
||||
$this->assets->fromArray($cached['assets']);
|
||||
|
||||
$event = new GetJavascriptEvent($definition, $content);
|
||||
$this->eventDispatcher->dispatch($event::NAME, $event);
|
||||
return $cached['javascript'];
|
||||
}
|
||||
}
|
||||
|
||||
return $event->getJavascript();
|
||||
$buffer = $this->doGenerate($mapId, $filter, $elementId, $template, $model, $style);
|
||||
|
||||
if ($model->cache) {
|
||||
$this->cache->save(
|
||||
$cacheKey,
|
||||
[
|
||||
'assets' => $this->assets->toArray(),
|
||||
'javascript' => $buffer
|
||||
],
|
||||
(int) $model->cacheLifeTime
|
||||
);
|
||||
}
|
||||
|
||||
return $buffer;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -197,7 +239,23 @@ class MapService
|
||||
throw new \InvalidArgumentException(sprintf('Could not find layer "%s"', $layerId));
|
||||
}
|
||||
|
||||
return $this->mapper->handleGeoJson($model, $filter);
|
||||
if (!$model->cache) {
|
||||
return $this->mapper->handleGeoJson($model, $filter);
|
||||
}
|
||||
|
||||
$cacheKey = 'feature_layer_' . $model->id;
|
||||
if ($filter) {
|
||||
$cacheKey .= '.filter_' . md5($filter->toRequest());
|
||||
}
|
||||
|
||||
if ($this->cache->contains($cacheKey)) {
|
||||
return $this->cache->fetch($cacheKey);
|
||||
}
|
||||
|
||||
$collection = $this->mapper->handleGeoJson($model, $filter);
|
||||
$this->cache->save($cacheKey, $collection, $model->cacheLifeTime);
|
||||
|
||||
return $collection;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -232,12 +290,83 @@ class MapService
|
||||
return;
|
||||
}
|
||||
|
||||
$controller = new DataController($this, $data);
|
||||
$controller->execute();
|
||||
$controller = new DataController($this, $this->filters, $this->displayErrors);
|
||||
$controller->execute($data);
|
||||
|
||||
if ($exit) {
|
||||
exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the cache key.
|
||||
*
|
||||
* @param int $mapId The map database id.
|
||||
* @param Filter|null $filter Optional request filter.
|
||||
* @param string $elementId Optional element id. If none given the mapId or alias is used.
|
||||
* @param string $template The template being used for generating.
|
||||
* @param string $style Optional style attributes.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function getCacheKey($mapId, $filter, $elementId, $template, $style)
|
||||
{
|
||||
$cacheKey = 'map_' . $mapId;
|
||||
|
||||
if ($filter) {
|
||||
$cacheKey .= '.filter_' . md5($filter->toRequest());
|
||||
}
|
||||
|
||||
if ($elementId) {
|
||||
$cacheKey .= '.element_' . $elementId;
|
||||
}
|
||||
|
||||
$cacheKey .= '.template_' . $template;
|
||||
|
||||
if ($style) {
|
||||
$cacheKey .= '.style_' . md5($style);
|
||||
|
||||
return $cacheKey;
|
||||
}
|
||||
|
||||
return $cacheKey;
|
||||
}
|
||||
|
||||
/**
|
||||
* Do the generating of the map.
|
||||
*
|
||||
* @param MapModel $model Map model.
|
||||
* @param Filter|null $filter Optional request filter.
|
||||
* @param string $elementId Optional element id. If none given the mapId or alias is used.
|
||||
* @param string $template The template being used for generating.
|
||||
* @param string $style Optional style attributes.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
|
||||
* @SuppressWarnings(PHPMD.UnusedLocalVariable)
|
||||
*/
|
||||
protected function doGenerate($model, $filter, $elementId, $template, $style)
|
||||
{
|
||||
$definition = $this->getDefinition($model, $filter, $elementId);
|
||||
$template = \Controller::getTemplate($template);
|
||||
|
||||
// @codingStandardsIgnoreStart - Set for the template.
|
||||
$javascript = $this->leaflet->build($definition, $this->assets);
|
||||
$mapId = $definition->getId();
|
||||
// @codingStandardsIgnoreEnd
|
||||
|
||||
ob_start();
|
||||
include $template;
|
||||
$content = ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
$event = new GetJavascriptEvent($definition, $content);
|
||||
$this->eventDispatcher->dispatch($event::NAME, $event);
|
||||
|
||||
$buffer = $event->getJavascript();
|
||||
|
||||
return $buffer;
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2014 netzmacht creative David Molineus
|
||||
* @copyright 2014-2016 netzmacht David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2014 netzmacht creative David Molineus
|
||||
* @copyright 2014-2016 netzmacht David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2015 netzmacht creative David Molineus
|
||||
* @copyright 2014-2016 netzmacht David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2015 netzmacht creative David Molineus
|
||||
* @copyright 2014-2016 netzmacht David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2015 netzmacht creative David Molineus
|
||||
* @copyright 2014-2016 netzmacht David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2015 netzmacht creative David Molineus
|
||||
* @copyright 2014-2016 netzmacht David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2015 netzmacht creative David Molineus
|
||||
* @copyright 2014-2016 netzmacht David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2015 netzmacht creative David Molineus
|
||||
* @copyright 2014-2016 netzmacht David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2015 netzmacht creative David Molineus
|
||||
* @copyright 2014-2016 netzmacht David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2014 netzmacht creative David Molineus
|
||||
* @copyright 2014-2016 netzmacht David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2015 netzmacht creative David Molineus
|
||||
* @copyright 2014-2016 netzmacht David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2015 netzmacht creative David Molineus
|
||||
* @copyright 2014-2016 netzmacht David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2015 netzmacht creative David Molineus
|
||||
* @copyright 2014-2016 netzmacht David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2015 netzmacht creative David Molineus
|
||||
* @copyright 2014-2016 netzmacht David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
@@ -11,9 +11,11 @@
|
||||
|
||||
namespace Netzmacht\Contao\Leaflet\Mapper\Layer;
|
||||
|
||||
use Netzmacht\Contao\Leaflet\ContaoAssets;
|
||||
use Netzmacht\Contao\Leaflet\Filter\Filter;
|
||||
use Netzmacht\Contao\Leaflet\Mapper\DefinitionMapper;
|
||||
use Netzmacht\Contao\Leaflet\Model\LayerModel;
|
||||
use Netzmacht\Contao\Toolkit\View\Assets\AssetsManager;
|
||||
use Netzmacht\JavascriptBuilder\Type\AnonymousFunction;
|
||||
use Netzmacht\JavascriptBuilder\Type\Expression;
|
||||
use Netzmacht\LeafletPHP\Definition;
|
||||
@@ -42,6 +44,25 @@ class MarkerClusterLayerMapper extends AbstractLayerMapper
|
||||
*/
|
||||
protected static $type = 'markercluster';
|
||||
|
||||
/**
|
||||
* Assets manager.
|
||||
*
|
||||
* @var ContaoAssets
|
||||
*/
|
||||
private $assets;
|
||||
|
||||
/**
|
||||
* MarkerClusterLayerMapper constructor.
|
||||
*
|
||||
* @param ContaoAssets $assets Assets manager.
|
||||
*/
|
||||
public function __construct(ContaoAssets $assets)
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
$this->assets = $assets;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
@@ -61,7 +82,6 @@ class MarkerClusterLayerMapper extends AbstractLayerMapper
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @SuppressWarnings(PHPMD.Superglobals)
|
||||
*/
|
||||
protected function build(
|
||||
Definition $definition,
|
||||
@@ -83,7 +103,7 @@ class MarkerClusterLayerMapper extends AbstractLayerMapper
|
||||
}
|
||||
|
||||
if (!$model->disableDefaultStyle) {
|
||||
$GLOBALS['TL_CSS'][] = 'assets/leaflet/libs/leaflet-markercluster/MarkerCluster.Default.css||static';
|
||||
$this->assets->addStylesheet('assets/leaflet/libs/leaflet-markercluster/MarkerCluster.Default.css');
|
||||
}
|
||||
|
||||
$collection = LayerModel::findBy(
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2015 netzmacht creative David Molineus
|
||||
* @copyright 2014-2016 netzmacht David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
|
||||
@@ -0,0 +1,139 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package netzmacht
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2016 netzmacht David Molineus. All rights reserved.
|
||||
* @filesource
|
||||
*
|
||||
*/
|
||||
|
||||
namespace Netzmacht\Contao\Leaflet\Mapper\Layer;
|
||||
|
||||
use Model;
|
||||
use Netzmacht\Contao\Leaflet\Definition\Layer\OverpassLayer;
|
||||
use Netzmacht\Contao\Leaflet\Filter\Filter;
|
||||
use Netzmacht\Contao\Leaflet\Mapper\DefinitionMapper;
|
||||
use Netzmacht\Contao\Leaflet\Model\IconModel;
|
||||
use Netzmacht\JavascriptBuilder\Type\Expression;
|
||||
use Netzmacht\LeafletPHP\Definition;
|
||||
|
||||
/**
|
||||
* Class OverpassLayerMapper.
|
||||
*
|
||||
* @package Netzmacht\Contao\Leaflet\Mapper\Layer
|
||||
*/
|
||||
class OverpassLayerMapper extends AbstractLayerMapper
|
||||
{
|
||||
/**
|
||||
* The definition type.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $type = 'overpass';
|
||||
|
||||
/**
|
||||
* The definition class.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $definitionClass = 'Netzmacht\Contao\Leaflet\Definition\Layer\OverpassLayer';
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function initialize()
|
||||
{
|
||||
parent::initialize();
|
||||
|
||||
$this->optionsBuilder
|
||||
->addOption('query', 'overpassQuery')
|
||||
->addOption('minZoom')
|
||||
->addOption('boundsMode')
|
||||
->addOption('overpassEndpoint', 'endpoint');
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function build(
|
||||
Definition $definition,
|
||||
Model $model,
|
||||
DefinitionMapper $mapper,
|
||||
Filter $filter = null,
|
||||
Definition $parent = null
|
||||
) {
|
||||
if (!$definition instanceof OverpassLayer) {
|
||||
return;
|
||||
}
|
||||
|
||||
$amenityIconsMap = $this->buildAmenityIconsMap($model);
|
||||
$definition->setOption('amenityIcons', $amenityIconsMap);
|
||||
|
||||
if ($model->pointToLayer) {
|
||||
$definition->setPointToLayer(new Expression($model->pointToLayer));
|
||||
}
|
||||
|
||||
if ($model->onEachFeature) {
|
||||
$definition->setOnEachFeature(new Expression($model->onEachFeature));
|
||||
}
|
||||
|
||||
if ($model->overpassPopup) {
|
||||
$definition->setOption('overpassPopup', new Expression($model->overpassPopup));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the amenity icons map.
|
||||
*
|
||||
* @param Model $model Definition model.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function buildAmenityIconsMap(Model $model)
|
||||
{
|
||||
$amenityIconsMap = $this->filterAmenityIconsConfig($model->amenityIcons);
|
||||
|
||||
if ($amenityIconsMap) {
|
||||
$collection = IconModel::findMultipleByIds(array_unique($amenityIconsMap));
|
||||
$icons = [];
|
||||
|
||||
if ($collection) {
|
||||
foreach ($collection as $iconModel) {
|
||||
$icons[$iconModel->id] = $iconModel->alias ?: $iconModel->id;
|
||||
}
|
||||
|
||||
foreach ($amenityIconsMap as $amenity => $iconId) {
|
||||
if (isset($icons[$iconId])) {
|
||||
$amenityIconsMap[$amenity] = $icons[$iconId];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $amenityIconsMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the amenity icons config.
|
||||
*
|
||||
* @param mixed $amenityIconsConfig Raw config from the db.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
private function filterAmenityIconsConfig($amenityIconsConfig)
|
||||
{
|
||||
$amenityIconsConfig = deserialize($amenityIconsConfig, true);
|
||||
$amenityIconsMap = [];
|
||||
|
||||
foreach ($amenityIconsConfig as $config) {
|
||||
if (!$config['amenity'] || !$config['icon']) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$amenityIconsMap[$config['amenity']] = $config['icon'];
|
||||
}
|
||||
|
||||
return $amenityIconsMap;
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user