25 |
--------------------------------------------------------------------------------
/languages/fa/tl_user.xlf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Allowed maps
6 | نقشههای مجاز
7 |
8 |
9 | Here you can grant access to one or more maps.
10 | اینجا میتوانید دسترسی به یک یا چند نقشه را بدهید.
11 |
12 |
13 | Map rights
14 | قوانین نقشه
15 |
16 |
17 | Here you can set map rights.
18 | اینجا میتوانید قوانین نقشه را تنظیم نمایید.
19 |
20 |
21 | Google Maps rights
22 | قوانین نقشههای گوگل
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/languages/de/tl_user.xlf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Allowed maps
6 | Erlaubte Karten
7 |
8 |
9 | Here you can grant access to one or more maps.
10 | Hier können Sie den Zugriff auf eine oder mehrere Karten erlauben.
11 |
12 |
13 | Map rights
14 | Kartenrechte
15 |
16 |
17 | Here you can set map rights.
18 | Hier können Sie die Kartenrechte festlegen.
19 |
20 |
21 | Google Maps rights
22 | Google Maps Rechte
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/languages/cs/tl_user_group.xlf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Allowed maps
6 | Povolené mapy
7 |
8 |
9 | Here you can grant access to one or more maps.
10 | Zde můžete udělit přístup k jedné nebo více map.
11 |
12 |
13 | Map rights
14 | Práva mapy
15 |
16 |
17 | Here you can set map rights.
18 | Zde můžete nastavit mapové práva.
19 |
20 |
21 | Google Maps rights
22 | Google Maps práva
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/languages/fa/tl_user_group.xlf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Allowed maps
6 | نقشههای مجاز
7 |
8 |
9 | Here you can grant access to one or more maps.
10 | اینجا میتوانید به یک یا چند نقشه اجازه دسترسی بدهید.
11 |
12 |
13 | Map rights
14 | قوانین نقشه
15 |
16 |
17 | Here you can set map rights.
18 | اینجا میتوانید قوانین نقشه را تنظیم نمایید.
19 |
20 |
21 | Google Maps rights
22 | قوانین نقشههای گوگل
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "delahaye/dlh_googlemaps",
3 | "description":"Google maps module for Contao",
4 | "keywords":["contao", "googlemaps", "geo", "map"],
5 | "type": "contao-module",
6 | "homepage":"https://github.com/delahaye/dlh_googlemaps",
7 | "license":"LGPL-3.0-or-later",
8 | "authors":[
9 | {
10 | "name":"Christian de la Haye",
11 | "email":"service@delahaye.de",
12 | "homepage":"http://www.delahaye.de",
13 | "role":"Developer"
14 | }
15 | ],
16 | "support":{
17 | "issues":"https://github.com/delahaye/dlh_googlemaps/issues"
18 | },
19 | "require": {
20 | "php": ">=5.3",
21 | "contao/core-bundle": "^3.5.1 || ~4.2",
22 | "contao-community-alliance/composer-plugin": "~2.4 || ~3.0",
23 | "delahaye/dlh_geocode": ">=1.1.2"
24 | },
25 | "autoload": {
26 | "classmap": [""]
27 | },
28 | "replace": {
29 | "contao-legacy/dlh_googlemaps": "*"
30 | },
31 | "extra": {
32 | "contao": {
33 | "sources": {
34 | "": "system/modules/dlh_googlemaps"
35 | },
36 | "runonce": [
37 | "system/modules/dlh_googlemaps/config/runonce.php"
38 | ]
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/languages/de/tl_user_group.xlf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Allowed maps
6 | Erlaubte Karten
7 |
8 |
9 | Here you can grant access to one or more maps.
10 | Hier können Sie den Zugriff auf eine oder mehrere Karten erlauben.
11 |
12 |
13 | Map rights
14 | Kartenrechte
15 |
16 |
17 | Here you can set map rights.
18 | Hier können Sie die Kartenrechte festlegen.
19 |
20 |
21 | Google Maps rights
22 | Google Maps Rechte
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/assets/js-marker-clusterer-gh-pages/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | ## Contributing
2 |
3 | Want to help out? That's awesome!
4 | 
5 |
6 | The library is open source and lives on GitHub at:
7 | https://github.com/googlemaps/js-marker-clusterer
8 | Open an issue or fork the library and submit a pull request.
9 |
10 | Keep in mind that before we can accept any pull requests we have to jump
11 | through a couple of legal hurdles, primarily a Contributor License Agreement
12 | (CLA):
13 |
14 | - **If you are an individual writing original source code**
15 | and you're sure you own the intellectual property,
16 | then you'll need to sign an
17 | [individual CLA](https://developers.google.com/open-source/cla/individual).
18 | - **If you work for a company that wants to allow you to contribute your work**,
19 | then you'll need to sign a
20 | [corporate CLA](https://developers.google.com/open-source/cla/corporate)
21 |
22 | Follow either of the two links above to access the appropriate CLA and
23 | instructions for how to sign and return it.
24 |
25 | When preparing your code, make sure to update the AUTHORS and CONTRIBUTORS file
26 | to reflect your contribtion.
27 |
28 | Once we receive your CLA, we'll be able to review and accept your pull requests.
--------------------------------------------------------------------------------
/assets/backend.css:
--------------------------------------------------------------------------------
1 | .dlh_googlemaps_position #mapTypeControlPos_1_4,
2 | .dlh_googlemaps_position #mapTypeControlPos_2_7,
3 | .dlh_googlemaps_position #mapTypeControlPos_3_10,
4 | .dlh_googlemaps_position #zoomControlPos_1_4,
5 | .dlh_googlemaps_position #zoomControlPos_2_7,
6 | .dlh_googlemaps_position #zoomControlPos_3_10,
7 | .dlh_googlemaps_position #rotateControlPos_1_4,
8 | .dlh_googlemaps_position #rotateControlPos_2_7,
9 | .dlh_googlemaps_position #rotateControlPos_3_10,
10 | .dlh_googlemaps_position #panControlPos_1_4,
11 | .dlh_googlemaps_position #panControlPos_2_7,
12 | .dlh_googlemaps_position #panControlPos_3_10,
13 | .dlh_googlemaps_position #scaleControlPos_1_4,
14 | .dlh_googlemaps_position #scaleControlPos_2_7,
15 | .dlh_googlemaps_position #scaleControlPos_3_10,
16 | .dlh_googlemaps_position #streetViewControlPos_1_4,
17 | .dlh_googlemaps_position #streetViewControlPos_2_7,
18 | .dlh_googlemaps_position #streetViewControlPos_3_10
19 | {
20 | display:none;
21 | }
22 | .dlh_googlemaps_position #ctrl_mapTypeControlPos td,
23 | .dlh_googlemaps_position #ctrl_zoomControlPos td,
24 | .dlh_googlemaps_position #ctrl_panControlPos td,
25 | .dlh_googlemaps_position #ctrl_rotateControlPos td,
26 | .dlh_googlemaps_position #ctrl_scaleControlPos td,
27 | .dlh_googlemaps_position #ctrl_streetViewControlPos td
28 | {
29 | border:1px solid #ffffff;
30 | background-color: #99B3CC;
31 | padding:5px 40px 5px 40px;
32 | }
--------------------------------------------------------------------------------
/docs/en/Description.md:
--------------------------------------------------------------------------------
1 | Google Maps module for Contao
2 | =====
3 |
4 | Extends the list of the featured contents by the module "Google Maps". An unrestricted amount of maps is possible that can be integrated within the content at various positions. Fot this the extension provides beside the module a content element for normal maps and one for static maps.
5 |
6 | Main features:
7 |
8 | - Handle as many maps as you want.
9 | - As many elements per map as needed:
10 |
11 | >- Simple markings
12 | - Complex markings with icon and shadow
13 | - Infowindows
14 | - Ground overlays
15 | - (Poly)lines
16 | - Polygones
17 | - Circles
18 | - Rectangles
19 | - KML-Layer
20 |
21 | - Linking of the Google Maps route planner from the infowindow of a marker
22 | - Direct linking of pages and urls from markers
23 | - Geo-coding of addresses
24 | - Module for use in Contao layouts
25 | - Content element for use in articles
26 | - Content element for use as a static map (png)
27 | - Dynamic markings and modifications while running
28 | - No more use of the Google Maps API Key by use of the Google Maps API V3
29 | - StreetView
30 | - Translations via Transifex
31 |
32 | Dynamic elements kan be integrated by using Html-/Javascript blocks or customized (MetaModels-)templates. For using this feature no change of themplate is needed anymore. The file TL_ROOT/system/modules/dlh_googlemaps/docs/en/Dynamic_markers.md explains how a map can be pimped up by dynamic elements.
--------------------------------------------------------------------------------
/docs/de/Beschreibung.md:
--------------------------------------------------------------------------------
1 | Google Maps Modul für Contao
2 | =====
3 |
4 | Erweitert die Liste der vorhandenen Inhaltsarten um das Modul "Google Maps". Es sind beliebig viele Maps möglich, die an beliebigen Stellen in den Content eingebunden werden können. Hierfür steht nebem dem Modul auch je ein Content-Element für normale bzw. statische Maps zur Verfügung.
5 |
6 | Haupt-Features:
7 |
8 | - Beliebig viele Maps verwaltbar.
9 | - Beliebig viele Elemente zu jeder Map definierbar:
10 |
11 | >- Einfache Markierungen
12 | - Komplexe Markierungen mit Icons und Schatten
13 | - Infoblasen
14 | - Grafik-Überlagerungen
15 | - (Poly-)Linien
16 | - Polygone
17 | - Kreise
18 | - Rechtecke
19 | - KML-Layer
20 |
21 | - Ansteuerung des Google Maps Routenplaners aus der Infoblase einer Markierung
22 | - Direkte (Seiten-)Verlinkung von Markierungen, Polygonen etc.
23 | - Geocoding von Adressen
24 | - Modul zur Einbindung in Layouts
25 | - Content-Element zur Einbindung in Artikel
26 | - Content-Element zur Einbindung als Statische Map (PNG)
27 | - Dynamische Markierungen und Verhaltensänderungen zur Laufzeit
28 | - Wegfall des Google Maps API Keys durch Verwendung der Google Maps API V3
29 | - Street View
30 | - Übersetzungen via Transifex
31 |
32 | Dynamische Map-Elemente lassen sich durch Html-/Javascript-Blöcke oder angepasste (Metamodels-)Templates nutzen. Hierfür ist kein Wechsel des Modul-Templates mehr nötig. Die Datei TL_ROOT/system/modules/dlh_googlemaps/docs/de/Dynamische_Markierungen.md erläutert - auch anhand eines konkreten Beispiels -, wie eine Map durch dynamische Elemente angereichert werden kann.
--------------------------------------------------------------------------------
/dca/tl_user_group.php:
--------------------------------------------------------------------------------
1 | &$GLOBALS['TL_LANG']['tl_user']['dlh_googlemapss'],
28 | 'exclude' => true,
29 | 'inputType' => 'checkbox',
30 | 'foreignKey' => 'tl_dlh_googlemaps.title',
31 | 'eval' => array('multiple'=>true),
32 | 'sql' => "blob NULL"
33 | );
34 |
35 | $GLOBALS['TL_DCA']['tl_user_group']['fields']['dlh_googlemapsp'] = array
36 | (
37 | 'label' => &$GLOBALS['TL_LANG']['tl_user']['dlh_googlemapsp'],
38 | 'exclude' => true,
39 | 'inputType' => 'checkbox',
40 | 'options' => array('create', 'delete'),
41 | 'reference' => &$GLOBALS['TL_LANG']['MSC'],
42 | 'eval' => array('multiple'=>true),
43 | 'sql' => "blob NULL"
44 | );
--------------------------------------------------------------------------------
/dca/tl_user.php:
--------------------------------------------------------------------------------
1 | &$GLOBALS['TL_LANG']['tl_user']['dlh_googlemapss'],
29 | 'exclude' => true,
30 | 'inputType' => 'checkbox',
31 | 'foreignKey' => 'tl_dlh_googlemaps.title',
32 | 'eval' => array('multiple'=>true),
33 | 'sql' => "blob NULL"
34 | );
35 |
36 | $GLOBALS['TL_DCA']['tl_user']['fields']['dlh_googlemapsp'] = array
37 | (
38 | 'label' => &$GLOBALS['TL_LANG']['tl_user']['dlh_googlemapsp'],
39 | 'exclude' => true,
40 | 'inputType' => 'checkbox',
41 | 'options' => array('create', 'delete'),
42 | 'reference' => &$GLOBALS['TL_LANG']['MSC'],
43 | 'eval' => array('multiple'=>true),
44 | 'sql' => "blob NULL"
45 | );
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # Changelog
2 | All notable changes to this project will be documented in this file.
3 |
4 | ## [2.4.1] - 2018-05-09
5 |
6 | ### Fixed
7 | - composer fixed license
8 |
9 | ### Changed
10 | - set data-protection default off
11 |
12 |
13 | ## [2.4.0] - 2018-05-02
14 |
15 | ### Fixed
16 | - composer-plugin wrong versions
17 | - minor bugfixes, see github issues
18 |
19 | ### Changed
20 | - added a data-protection confirmation to prevent data transfer to google w/o permission (optional)
21 |
22 |
23 | ## [2.3.2] - 2017-09-19
24 |
25 | ### Fixed
26 | - `contao 4.x` compatibility
27 | - minor fixes in pull request conflicts
28 | - minor dca fixes
29 | - version compare for BE maps
30 | - added api key in CE and MOD
31 | - fixed clusterer img path
32 |
33 | ### Changed
34 | - map size uses `box` or `proportional` now. `box` works with dimension like `100px`, `20em`, `50%` etc., `proportional` defines an aspect ratio like `16:9` and full width of the container
35 | - https for api calls
36 | - smaller static map
37 | - adjust composer.json
38 | - modified upgrade handler
39 | - added svg as icon image
40 | - changed map styles in templates for new map sizes, enhane overwriting of styles
41 | - skipped versions for compatibility with fork heimrichhannot (thanks for pull requests)
42 |
43 | ## [2.3.1] - 2017-07-18
44 |
45 | ### Fixed
46 | - `gmap*_markers is not defined` js error
47 |
48 | ## [2.3.0] - 2017-07-18
49 |
50 | ### Fixed
51 | - `contao 4.x` compatibility
52 |
53 | ### Changed
54 |
55 | - `imgSize` now always uses `box` option. For full with add % or pcnt to with dimension
56 | - make always usage of api key, global api key can now added to `tl_settings.dlh_googlemaps_apikey`, required for pageless context
57 | - requires now `heimrichhannot/dlh_geocode` and created independent `composer` package within namespace `heimrichhannot/dlh_googlemaps`
58 |
--------------------------------------------------------------------------------
/languages/en/default.xlf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Google Maps
6 |
7 |
8 | Here you can administrate your Google Maps.
9 |
10 |
11 | Google Map
12 |
13 |
14 | Integrate a Google Map.
15 |
16 |
17 | Google Map
18 |
19 |
20 | Integrate a Google Map.
21 |
22 |
23 | Google Map
24 |
25 |
26 | Routing
27 |
28 |
29 | ? from your Address:
30 |
31 |
32 | ok
33 |
34 |
35 | This website uses Google Maps - click here to permanently activate it. I agree with the transfer of ma data to Google. Notice: You can withdraw your confirmation at any time for the future by deleting he cookie dlh_googlemaps. In our privacy policy You'll find further information about our way to deal with user data.
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/templates/elements/dlh_ground_overlay.html5:
--------------------------------------------------------------------------------
1 | element['bounds'][0] && $this->element['bounds'][1] && $this->element['overlaySRC']) : ?>
2 | var gmapelement['id']; ?>_overlay = new google.maps.GroundOverlay(
3 | "element['overlaySRC']; ?>"
4 | , new google.maps.LatLngBounds(
5 | new google.maps.LatLng(element['bounds'][0]; ?>),
6 | new google.maps.LatLng(element['bounds'][1]; ?>)
7 | )
8 | element['parameter']) : ?>
9 | , element['parameter']; ?>
10 |
11 | );
12 | gmapelement['id']; ?>_overlay.setMap(gmapmap; ?>);
13 | element['markerAction'] == 'INFO') : ?>
14 | var gmapelement['id']; ?>_infowindow = new google.maps.InfoWindow({
15 | position: new google.maps.LatLng(element['bounds'][2]; ?>),
16 | element['infoWindowAnchor'][0]!=0 || $this->element['infoWindowAnchor'][1]!=0) : ?>
17 | pixelOffset: new google.maps.Size(element['infoWindowAnchor'][0].','.$this->element['infoWindowAnchor'][1]; ?>),
18 |
19 | content: '
'
20 | });
21 | google.maps.event.addListener(gmapelement['id']; ?>_overlay, 'click', function(event) {
22 | gmapelement['id']; ?>_infowindow.setPosition(event.latLng);
23 | gmapelement['id']; ?>_infowindow.open(gmapmap; ?>);
24 | });
25 | element['popupInfoWindow']) : ?>
26 | gmapelement['id']; ?>_infowindow.open(gmapmap; ?>);
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/config/config.php:
--------------------------------------------------------------------------------
1 | array
21 | (
22 | 'tables' => array('tl_dlh_googlemaps', 'tl_dlh_googlemaps_elements'),
23 | 'icon' => 'system/modules/dlh_googlemaps/assets/icon.gif',
24 | 'stylesheet' => 'system/modules/dlh_googlemaps/assets/backend.css',
25 | 'list' => array('dlhCoordsWizard', 'importList')
26 | )
27 | ));
28 |
29 |
30 | /**
31 | * Add modules
32 | */
33 |
34 | array_insert($GLOBALS['FE_MOD']['miscellaneous'], sizeof($GLOBALS['FE_MOD']['miscellaneous']), array
35 | (
36 | 'dlh_googlemaps' => 'delahaye\googlemaps\ModuleMap'
37 | ));
38 |
39 |
40 | /**
41 | * Add content elements
42 | */
43 |
44 | array_insert($GLOBALS['TL_CTE']['media'], sizeof($GLOBALS['TL_CTE']['media']), array
45 | (
46 | 'dlh_googlemaps' => 'delahaye\googlemaps\ContentMap',
47 | ));
48 |
49 | /**
50 | * Backend form fields
51 | */
52 | $GLOBALS['BE_FFL']['mapSize'] = 'delahaye\googlemaps\MapSizeWidget';
53 |
54 | /**
55 | * Register models
56 | */
57 |
58 | $GLOBALS['TL_MODELS']['tl_dlh_googlemaps'] = '\\delahaye\\googlemaps\\MapModel';
59 | $GLOBALS['TL_MODELS']['tl_dlh_googlemaps_elements'] = '\\delahaye\\googlemaps\\ElementModel';
60 |
61 |
62 | /**
63 | * Add permissions
64 | */
65 | $GLOBALS['TL_PERMISSIONS'][] = 'dlh_googlemapss';
66 | $GLOBALS['TL_PERMISSIONS'][] = 'dlh_googlemapsp';
67 |
68 |
69 | /**
70 | * Refreshing
71 | */
72 | $GLOBALS['TL_CONFIG']['dlh_googlemaps']['refresh'] = array('toggler', 'tabs');
73 |
74 |
75 | /**
76 | * cookie days
77 | */
78 | $GLOBALS['TL_CONFIG']['dlh_googlemaps']['cookiedays'] = 365 * 86400; // days * sec/day
--------------------------------------------------------------------------------
/languages/cs/default.xlf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Google Maps
6 | Google Mapa
7 |
8 |
9 | Here you can administrate your Google Maps.
10 | Zde můžete spravovat své Google Mapy.
11 |
12 |
13 | Google Map
14 | Google Mapa
15 |
16 |
17 | Integrate a Google Map.
18 | Integrovat Google Mapu.
19 |
20 |
21 | Google Map
22 | Google Mapa
23 |
24 |
25 | Integrate a Google Map.
26 | Integrovat Google Mapu.
27 |
28 |
29 | Google Map
30 | Google Mapa
31 |
32 |
33 | Routing
34 | Plánování
35 |
36 |
37 | ? from your Address:
38 | ? z vaší adresy:
39 |
40 |
41 | ok
42 | ok
43 |
44 |
45 | This website uses Google Maps - click here to permanently activate it. I agree with the transfer of ma data to Google. Notice: You can withdraw your confirmation at any time for the future by deleting he cookie dlh_googlemaps. In our privacy policy You'll find further information about our way to deal with user data.
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/languages/fa/default.xlf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Google Maps
6 | نقشههای گوگل
7 |
8 |
9 | Here you can administrate your Google Maps.
10 | اینجا میتوانید نقشههای گوگل خود را مدیریت نمایید.
11 |
12 |
13 | Google Map
14 | نقشه گوگل
15 |
16 |
17 | Integrate a Google Map.
18 | درج یک نقشه گوگل
19 |
20 |
21 | Google Map
22 | نقشه گوگل
23 |
24 |
25 | Integrate a Google Map.
26 | درج یک نقشه گوگل
27 |
28 |
29 | Google Map
30 | نقشه گوگل
31 |
32 |
33 | Routing
34 | مسیریابی
35 |
36 |
37 | ? from your Address:
38 | ? از نشانی شما:
39 |
40 |
41 | ok
42 | بسیارخوب
43 |
44 |
45 | This website uses Google Maps - click here to permanently activate it. I agree with the transfer of ma data to Google. Notice: You can withdraw your confirmation at any time for the future by deleting he cookie dlh_googlemaps. In our privacy policy You'll find further information about our way to deal with user data.
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/languages/it/default.xlf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Google Maps
6 | Google Maps
7 |
8 |
9 | Here you can administrate your Google Maps.
10 | Qui è possibile gestire le Google Maps.
11 |
12 |
13 | Google Map
14 | Google Map
15 |
16 |
17 | Integrate a Google Map.
18 | Integra una mappa di Google.
19 |
20 |
21 | Google Map
22 | Google Map
23 |
24 |
25 | Integrate a Google Map.
26 | Integra una mappa di Google.
27 |
28 |
29 | Google Map
30 | Google Map
31 |
32 |
33 | Routing
34 | Routing
35 |
36 |
37 | ? from your Address:
38 | dal tuo indirizzo:
39 |
40 |
41 | ok
42 | ok
43 |
44 |
45 | This website uses Google Maps - click here to permanently activate it. I agree with the transfer of ma data to Google. Notice: You can withdraw your confirmation at any time for the future by deleting he cookie dlh_googlemaps. In our privacy policy You'll find further information about our way to deal with user data.
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/languages/fr/default.xlf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Google Maps
6 | Google Maps
7 |
8 |
9 | Here you can administrate your Google Maps.
10 | Ici vous pouvez administrer vos Google Maps.
11 |
12 |
13 | Google Map
14 | Google Map
15 |
16 |
17 | Integrate a Google Map.
18 | Integrer une Google Map.
19 |
20 |
21 | Google Map
22 | Google Map
23 |
24 |
25 | Integrate a Google Map.
26 | Integrer une Google Map.
27 |
28 |
29 | Google Map
30 | Google Map
31 |
32 |
33 | Routing
34 | Itinéraire
35 |
36 |
37 | ? from your Address:
38 | ? depuis votre adresse:
39 |
40 |
41 | ok
42 | ok
43 |
44 |
45 | This website uses Google Maps - click here to permanently activate it. I agree with the transfer of ma data to Google. Notice: You can withdraw your confirmation at any time for the future by deleting he cookie dlh_googlemaps. In our privacy policy You'll find further information about our way to deal with user data.
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/assets/js-marker-clusterer-gh-pages/examples/simple_example.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | MarkerClusterer v3 Simple Example
6 |
28 |
29 |
30 |
31 |
32 |
33 |
57 |
68 |
69 |
70 |
A simple example of MarkerClusterer (100 markers)
71 |
72 |
73 |
74 |
--------------------------------------------------------------------------------
/languages/de/default.xlf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Google Maps
6 | Google Maps
7 |
8 |
9 | Here you can administrate your Google Maps.
10 | Hier können Sie Ihre Google Maps verwalten
11 |
12 |
13 | Google Map
14 | Google Map
15 |
16 |
17 | Integrate a Google Map.
18 | Eine Google Map einbinden.
19 |
20 |
21 | Google Map
22 | Google Map
23 |
24 |
25 | Integrate a Google Map.
26 | Eine Google Map einbinden.
27 |
28 |
29 | Google Map
30 | Google Map
31 |
32 |
33 | Routing
34 | Routenplanung
35 |
36 |
37 | ? from your Address:
38 | ? von Ihrer Adresse:
39 |
40 |
41 | ok
42 | ok
43 |
44 |
45 | This website uses Google Maps - click here to permanently activate it. I agree with the transfer of ma data to Google. Notice: You can withdraw your confirmation at any time for the future by deleting he cookie dlh_googlemaps. In our privacy policy You'll find further information about our way to deal with user data.
46 | Diese Website nutzt Google Maps - klicken Sie hier, um es permanent zu aktivieren. Ich stimme zu, dass mit der Nutzung Daten an Google übertragen werden. Hinweis: Sie können Ihre Einwilligung jederzeit für die Zukunft widerrufen, indem Sie den Cookie dlh_googlemaps löschen. Detaillierte Informationen zum Umgang mit Nutzerdaten finden Sie in unserer Datenschutzerklärung.
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/docs/en/Release.md:
--------------------------------------------------------------------------------
1 | 2016-07-21, 2.2.0 stable
2 | ----------
3 | New feature: resize, thanks to marcobiedermann
4 | New feature: marker clusterer https://googlemaps.github.io/js-marker-clusterer
5 | Added API key, removed sensor, bugfixes.
6 |
7 |
8 | 2015-05-26, 2.1.1 stable
9 | ----------
10 | sorry, the async loading of the javascript didn't work.
11 |
12 |
13 | 2015-05-25, 2.1.0 stable
14 | ----------
15 | changed the html5 templates, bugfixes
16 |
17 |
18 | 2014-06-25, 2.0.9 stable
19 | ----------
20 | https-support for markers, KML-Urls with inserttags, Contao 3.3.3
21 |
22 |
23 | 2014-05-08, 2.0.8 stable
24 | ----------
25 | IT extended, bugfixes
26 |
27 |
28 | 2014-02-04, 2.0.7 stable
29 | ----------
30 | Added IT language, thanks to Paolo Brunelli. Updated CS, thanks to Tomáš Petrlík. Updated FA, thanks to Hamid Abbaszadeh. Fixes a bug with composer.
31 |
32 |
33 | 2014-02-04, 2.0.6 stable
34 | ----------
35 | Fixes some bugs, removes old files on update and comes with the languages FR, CS, and FA
36 |
37 |
38 | 2014-02-04, 2.0.5 stable
39 | ----------
40 | Was not published in the ER
41 |
42 |
43 | 2014-02-04, 2.0.4 stable
44 | ----------
45 | Fixes some bugs and enables maps in jQuery accordions
46 |
47 |
48 | 2014-02-07, 2.0.3 stable
49 | ----------
50 | Hopefully solves the problem at least. sorry.
51 |
52 |
53 | 2014-02-07, 2.0.2 stable
54 | ----------
55 | Fixes a bug which let updates fail
56 |
57 |
58 | 2014-02-05, 2.0.1 stable
59 | ----------
60 | Fixes some bugs
61 |
62 |
63 | 2014-02-04, 2.0.0 stable
64 | ----------
65 |
66 | The version 2.0.0 is designed to work with Contao 3.2.x. Older versions of Contao are not supported!
67 |
68 | Update:
69 | - delete old files from /system/modules/dlh_googlemaps
70 | - up new files
71 | - update the database
72 | - re-save all maps and elements
73 |
74 | Changes:
75 | - for Contao 3.2-fit, all recoded
76 | - translations via Transifex
77 | - geo-coding separated in an own extension
78 | - coordinates for a marker are pre-set to the map center
79 | - coordinates for a marker can be calculated from the address
80 | - redesign coordinate import
81 | - maps are linked directly in backend CE-view
82 | - seperate templates per CE-/module use
83 | - seperate templates per element type
84 | - integrated into the Contao rights management
85 | - markers are also possible in ststic maps (even >5)
86 | - fixed pan-/zoom control
87 | - added rotate control
88 | - added overview control
89 | - StreetView control positionable
90 | - de-/activation of CSS
91 | - pack CSS
92 | - JS and CSS are only loaded when needed
93 | - additional parameters outside the options
94 | - custom colors for the standard markers
95 | - maps in accordions and/or tabs are reloaded dynamically
96 | - addedc KML-layer elements
97 | - and some bug fixes of course
--------------------------------------------------------------------------------
/config/autoload.php:
--------------------------------------------------------------------------------
1 | 'system/modules/dlh_googlemaps/models/MapModel.php',
32 | 'delahaye\googlemaps\ElementModel' => 'system/modules/dlh_googlemaps/models/ElementModel.php',
33 |
34 | // Classes
35 | 'delahaye\googlemaps\Googlemap' => 'system/modules/dlh_googlemaps/classes/Googlemap.php',
36 | 'delahaye\googlemaps\UpgradeHandler' => 'system/modules/dlh_googlemaps/classes/UpgradeHandler.php',
37 | 'Contao\dlhCoordsWizard' => 'system/modules/dlh_googlemaps/widgets/dlhCoordsWizard.php',
38 |
39 | // Elements
40 | 'delahaye\googlemaps\ContentMap' => 'system/modules/dlh_googlemaps/elements/ContentMap.php',
41 |
42 | // Modules
43 | 'delahaye\googlemaps\ModuleMap' => 'system/modules/dlh_googlemaps/modules/ModuleMap.php',
44 |
45 | // Widgets
46 | 'delahaye\googlemaps\MapSizeWidget' => 'system/modules/dlh_googlemaps/widgets/MapSizeWidget.php',
47 |
48 | ));
49 |
50 |
51 | /**
52 | * Register the templates
53 | */
54 | TemplateLoader::addFiles(array
55 | (
56 | 'mod_dlh_googlemaps_default' => 'system/modules/dlh_googlemaps/templates/frontend',
57 | 'mod_dlh_googlemapsstatic' => 'system/modules/dlh_googlemaps/templates/frontend',
58 | 'ce_dlh_googlemaps_default' => 'system/modules/dlh_googlemaps/templates/frontend',
59 | 'ce_dlh_googlemapsstatic' => 'system/modules/dlh_googlemaps/templates/frontend',
60 | 'dlh_circle' => 'system/modules/dlh_googlemaps/templates/elements',
61 | 'dlh_ground_overlay' => 'system/modules/dlh_googlemaps/templates/elements',
62 | 'dlh_infowindow' => 'system/modules/dlh_googlemaps/templates/elements',
63 | 'dlh_marker' => 'system/modules/dlh_googlemaps/templates/elements',
64 | 'dlh_polygon' => 'system/modules/dlh_googlemaps/templates/elements',
65 | 'dlh_polyline' => 'system/modules/dlh_googlemaps/templates/elements',
66 | 'dlh_rectangle' => 'system/modules/dlh_googlemaps/templates/elements',
67 | 'dlh_kml' => 'system/modules/dlh_googlemaps/templates/elements',
68 | ));
--------------------------------------------------------------------------------
/templates/elements/dlh_circle.html5:
--------------------------------------------------------------------------------
1 | element['singleCoords'] && $this->element['strokeColor'] && $this->element['strokeOpacity'] && $this->element['strokeWeight']['value']) : ?>
2 | var gmapelement['id']; ?>_circle = new google.maps.Circle({
3 | center: new google.maps.LatLng(element['singleCoords']; ?>)
4 | , radius: element['radius']['value']; ?>
5 | , strokeColor: "#element['strokeColor']; ?>"
6 | , strokeWeight: element['strokeWeight']['value']; ?>
7 | , strokeOpacity: element['strokeOpacity']; ?>
8 | element['fillColor'] && $this->element['fillOpacity']) : ?>
9 | , fillColor: "#element['fillColor']; ?>"
10 | , fillOpacity: element['fillOpacity']; ?>
11 |
12 | element['zIndex']) : ?>
13 | , zIndex: element['zIndex']; ?>
14 |
15 | element['parameter']) : ?>
16 | , element['parameter']; ?>
17 |
18 | });
19 | gmapelement['id']; ?>_circle.setMap(gmapmap; ?>);
20 | element['markerAction'] == 'INFO') : ?>
21 | var gmapelement['id']; ?>_infowindow = new google.maps.InfoWindow({
22 | position: new google.maps.LatLng(element['singleCoords']; ?>),
23 | element['infoWindowAnchor'][0]!=0 || $this->element['infoWindowAnchor'][1]!=0) : ?>
24 | pixelOffset: new google.maps.Size(element['infoWindowAnchor'][0].','.$this->element['infoWindowAnchor'][1]; ?>),
25 |
26 | content: '
'
29 | });
30 | google.maps.event.addListener(gmapelement['id']; ?>_rectangle, 'click', function(event) {
31 | gmapelement['id']; ?>_infowindow.setPosition(event.latLng);
32 | gmapelement['id']; ?>_infowindow.open(gmapmap; ?>);
33 | });
34 | element['popupInfoWindow']) : ?>
35 | gmapelement['id']; ?>_infowindow.open(gmapmap; ?>);
36 |
37 | element['markerAction'] == 'LINK') : ?>
38 | google.maps.event.addListener(gmapelement['id']; ?>_rectangle, 'click', function() {
39 | element['target']) : ?>
40 | window.open('element['url']; ?>','_blank','resizable=yes,scrollbars=yes,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes');
41 |
42 | window.location.href='element['url']; ?>';
43 |
44 | });
45 |
46 |
47 |
--------------------------------------------------------------------------------
/languages/en/tl_module.xlf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Google Map
6 |
7 |
8 | Please select a Google Map.
9 |
10 |
11 | Zoom-Factor
12 |
13 |
14 | Here you can override the zoom factor set in the module for just this implementation.
15 |
16 |
17 | Dimensions width x height
18 |
19 |
20 | Here you can override the map dimensions set in the module for just this implementation.
21 |
22 |
23 | Use static map
24 |
25 |
26 | Instead of a normal Google-Map a (resticted) static map can be shown.
27 |
28 |
29 | Link address
30 |
31 |
32 | Please enter a web address (http://...) or an insert-tag.
33 |
34 |
35 | Template
36 |
37 |
38 | Select a front end template.
39 |
40 |
41 | Discard CSS
42 |
43 |
44 | The extension provides some own CSS.
45 |
46 |
47 | Map is shown in Tabs or Accordion
48 |
49 |
50 | This option refreshes the map when changing a tab or accordion. Made for the extension Tabcontrol.
51 |
52 |
53 | Map has data protection
54 |
55 |
56 | Prevents the data transfer to Google until confirmation.
57 |
58 |
59 | Data protection notice
60 |
61 |
62 | Overwrites the default message. Insert-Tags are supported.
63 |
64 |
65 | Map data
66 |
67 |
68 |
69 |
--------------------------------------------------------------------------------
/classes/UpgradeHandler.php:
--------------------------------------------------------------------------------
1 | =') && $objDatabase->tableExists($strTable))
42 | {
43 | // convert file fields
44 | foreach ($objDatabase->listFields($strTable) as $arrField)
45 | {
46 | foreach($arrNames as $strName)
47 | {
48 | if ($arrField['name'] == $strName && $arrField['type'] != 'binary')
49 | {
50 | \Database\Updater::convertSingleField($strTable, $strName);
51 | }
52 | }
53 | }
54 | }
55 |
56 | // upgrade to responsive map sizes
57 | foreach(array('tl_dlh_googlemaps','tl_content','tl_module') as $tmpTable){
58 | switch($tmpTable){
59 | case 'tl_dlh_googlemaps':
60 | if ($objDatabase->tableExists($tmpTable))
61 | {
62 | $objList = $objDatabase->prepare("select * from ".$tmpTable)->execute();
63 | self::upGradeMapSize($objDatabase, $objList, $tmpTable, 'mapSize');
64 | }
65 | break;
66 |
67 | default:
68 | if ($objDatabase->fieldExists('dlh_googlemap_size',$tmpTable))
69 | {
70 | $objList = $objDatabase->prepare("select * from ".$tmpTable." where type=? and dlh_googlemap_size!=?")->execute('dlh_googlemaps','');
71 | self::upGradeMapSize($objDatabase, $objList, $tmpTable, 'dlh_googlemap_size');
72 | }
73 | break;
74 | }
75 | }
76 |
77 |
78 | return;
79 | }
80 |
81 |
82 | private static function upGradeMapSize($objDatabase, $objList, $strTable, $strField){
83 | while($objList->next()){
84 | $tmpOld = deserialize($objList->$strField);
85 | $tmpNew = array();
86 | if($tmpOld[2] != 'box' && $tmpOld[2] != 'proportional'){
87 | $tmpOld[2] = str_replace('pcnt','%',$tmpOld[2]);
88 | $tmpNew[0] = $tmpOld[0] > 0 ? $tmpOld[0].$tmpOld[2] : '';
89 | $tmpNew[1] = $tmpOld[1] > 0 ? $tmpOld[1].$tmpOld[2] : '';
90 | $tmpNew[2] = 'box';
91 |
92 | $objDatabase->prepare("update ".$strTable." set ".$strField."=? where id=?")->execute(serialize($tmpNew), $objList->id);
93 | }
94 | }
95 |
96 | return;
97 | }
98 |
99 |
100 | }
101 |
--------------------------------------------------------------------------------
/languages/en/tl_content.xlf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Google Map
6 |
7 |
8 | Please select a Google Map.
9 |
10 |
11 | Zoom-Factor
12 |
13 |
14 | Here you can override the zoom factor set in the module for just this implementation.
15 |
16 |
17 | Dimensions width x height
18 |
19 |
20 | Here you can override the map dimensions set in the module for just this implementation.
21 |
22 |
23 | Use static map
24 |
25 |
26 | Instead of a normal Google-Map a (resticted) static map can be shown.
27 |
28 |
29 | Link address
30 |
31 |
32 | Please enter a web address (http://...) or an insert-tag.
33 |
34 |
35 | Template
36 |
37 |
38 | Select a front end template.
39 |
40 |
41 | Discard CSS
42 |
43 |
44 | The extension provides some own CSS.
45 |
46 |
47 | Map is shown in Tabs or Accordion
48 |
49 |
50 | This option refreshes the map when changing a tab or accordion. Made for the extension Tabcontrol.
51 |
52 |
53 | Map has data protection
54 |
55 |
56 | Prevents the data transfer to Google until confirmation.
57 |
58 |
59 | Data protection notice
60 |
61 |
62 | Overwrites the default message. Insert-Tags are supported.
63 |
64 |
65 | Map data
66 |
67 |
68 |
69 |
--------------------------------------------------------------------------------
/languages/it/tl_module.xlf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Google Map
6 |
7 |
8 | Please select a Google Map.
9 |
10 |
11 | Zoom-Factor
12 |
13 |
14 | Here you can override the zoom factor set in the module for just this implementation.
15 |
16 |
17 | Dimensions width x height
18 |
19 |
20 | Here you can override the map dimensions set in the module for just this implementation.
21 |
22 |
23 | Use static map
24 |
25 |
26 | Instead of a normal Google-Map a (resticted) static map can be shown.
27 |
28 |
29 | Link address
30 |
31 |
32 | Please enter a web address (http://...) or an insert-tag.
33 |
34 |
35 | Template
36 |
37 |
38 | Select a front end template.
39 |
40 |
41 | Discard CSS
42 |
43 |
44 | The extension provides some own CSS.
45 |
46 |
47 | Map is shown in Tabs or Accordion
48 |
49 |
50 | This option refreshes the map when changing a tab or accordion. Made for the extension Tabcontrol.
51 |
52 |
53 | Map has data protection
54 |
55 |
56 | Prevents the data transfer to Google until confirmation.
57 |
58 |
59 | Data protection notice
60 |
61 |
62 | Overwrites the default message. Insert-Tags are supported.
63 |
64 |
65 | Map data
66 |
67 |
68 |
69 |
--------------------------------------------------------------------------------
/assets/js-marker-clusterer-gh-pages/examples/speed_test_example.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | MarkerClusterer v3 Speed Test Example
6 |
7 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
78 |
89 |
90 |
91 |
92 |
93 |
An example of MarkerClusterer v3
94 |
95 |
96 |
97 | Use MarkerClusterer
98 |
99 |
100 |
101 | Markers:
102 |
109 |
110 | Time used: ms
111 |
112 |
113 | Marker List
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
--------------------------------------------------------------------------------
/languages/fa/tl_module.xlf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Google Map
6 | نقشه گوگل
7 |
8 |
9 | Please select a Google Map.
10 | لطفا یک نقشه گوگل انتخاب کنید.
11 |
12 |
13 | Zoom-Factor
14 | ضریب-بزرگنمایی
15 |
16 |
17 | Here you can override the zoom factor set in the module for just this implementation.
18 |
19 |
20 | Dimensions width x height
21 | ابعاد عرض x ارتفاع
22 |
23 |
24 | Here you can override the map dimensions set in the module for just this implementation.
25 |
26 |
27 | Use static map
28 | استفاده از نقشه ایستا
29 |
30 |
31 | Instead of a normal Google-Map a (resticted) static map can be shown.
32 |
33 |
34 | Link address
35 | نشانی پیوند
36 |
37 |
38 | Please enter a web address (http://...) or an insert-tag.
39 |
40 |
41 | Template
42 | قالب
43 |
44 |
45 | Select a front end template.
46 | یک قالب فرانت-اند انتخاب کنید.
47 |
48 |
49 | Discard CSS
50 | کنار گذاشتن CSS
51 |
52 |
53 | The extension provides some own CSS.
54 |
55 |
56 | Map is shown in Tabs or Accordion
57 |
58 |
59 | This option refreshes the map when changing a tab or accordion. Made for the extension Tabcontrol.
60 |
61 |
62 | Map has data protection
63 |
64 |
65 | Prevents the data transfer to Google until confirmation.
66 |
67 |
68 | Data protection notice
69 |
70 |
71 | Overwrites the default message. Insert-Tags are supported.
72 |
73 |
74 | Map data
75 |
76 |
77 |
78 |
--------------------------------------------------------------------------------
/languages/fa/tl_content.xlf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Google Map
6 | نقشه گوگل
7 |
8 |
9 | Please select a Google Map.
10 | لطفا یک نقشه گوگل انتخاب کنید.
11 |
12 |
13 | Zoom-Factor
14 | ضریب-بزرگنمایی
15 |
16 |
17 | Here you can override the zoom factor set in the module for just this implementation.
18 |
19 |
20 | Dimensions width x height
21 | ابعاد عرض x ارتفاع
22 |
23 |
24 | Here you can override the map dimensions set in the module for just this implementation.
25 |
26 |
27 | Use static map
28 | استفاده از نقشه ایستا
29 |
30 |
31 | Instead of a normal Google-Map a (resticted) static map can be shown.
32 |
33 |
34 | Link address
35 | نشانی پیوند
36 |
37 |
38 | Please enter a web address (http://...) or an insert-tag.
39 |
40 |
41 | Template
42 | قالب
43 |
44 |
45 | Select a front end template.
46 | یک قالب فرانت-اند انتخاب کنید.
47 |
48 |
49 | Discard CSS
50 | کنار گذاشتن CSS
51 |
52 |
53 | The extension provides some own CSS.
54 |
55 |
56 | Map is shown in Tabs or Accordion
57 |
58 |
59 | This option refreshes the map when changing a tab or accordion. Made for the extension Tabcontrol.
60 |
61 |
62 | Map has data protection
63 |
64 |
65 | Prevents the data transfer to Google until confirmation.
66 |
67 |
68 | Data protection notice
69 |
70 |
71 | Overwrites the default message. Insert-Tags are supported.
72 |
73 |
74 | Map data
75 |
76 |
77 |
78 |
--------------------------------------------------------------------------------
/elements/ContentMap.php:
--------------------------------------------------------------------------------
1 | dlh_googlemap);
52 |
53 | return '
' . $objMap->title . '
';
54 | }
55 |
56 | return parent::generate();
57 | }
58 |
59 |
60 | /**
61 | * Generate the content element
62 | */
63 | protected function compile()
64 | {
65 | global $objPage;
66 |
67 | $key = null;
68 |
69 | if (($objRootPage = \PageModel::findByPk($objPage->rootId)) !== null)
70 | {
71 | $key = $objRootPage->dlh_googlemaps_apikey;
72 | }
73 |
74 | if (!$key)
75 | {
76 | $key = \Config::get('dlh_googlemaps_apikey');
77 | }
78 |
79 | // Contao framework sets images to max-width 100%, which collides with Google's CSS
80 | if (!$this->dlh_googlemap_nocss)
81 | {
82 | \delahaye\googlemaps\Googlemap::CssInjection();
83 | }
84 |
85 | // get the map data
86 | $arrParams = [
87 | 'mapSize' => deserialize($this->dlh_googlemap_size),
88 | 'zoom' => $this->dlh_googlemap_zoom,
89 | 'protected' => $this->dlh_googlemap_protected,
90 | 'privacy' => $this->dlh_googlemap_privacy
91 | ];
92 |
93 | $arrMap = \delahaye\googlemaps\Googlemap::getMapData($this->dlh_googlemap, $objPage->outputFormat, $arrParams);
94 |
95 | // static map
96 | if ($this->dlh_googlemap_static)
97 | {
98 | $this->Template = new \FrontendTemplate('ce_dlh_googlemapsstatic');
99 |
100 | if ($this->dlh_googlemap_url)
101 | {
102 | $arrMap['staticMap'] =
103 | 'rel ? ($objPage->outputFormat == 'html5' ? ' data-lightbox="' : ' rel="') . $this->rel . '"' : '')
104 | . ' title="' . addslashes($this->linkTitle) . '"' . ($this->target ? ' onclick="window.open(this.href); return false;"' : '') . '>' . $arrMap['staticMap']
105 | . '';
106 | }
107 | }
108 | // dynamic map
109 | else
110 | {
111 | if ($this->dlh_googlemap_template && $this->dlh_googlemap_template != 'ce_dlh_googlemaps_default')
112 | {
113 | $this->Template = new \FrontendTemplate($this->dlh_googlemap_template);
114 | }
115 |
116 | if ($arrMap['useClusterer'])
117 | {
118 | $GLOBALS['TL_JAVASCRIPT'][] = 'system/modules/dlh_googlemaps/assets/js-marker-clusterer-gh-pages/src/markerclusterer.js';
119 | $arrMap['clusterImg'] = $arrMap['clustererImg'] ? $arrMap['clustererImg'] : 'system/modules/dlh_googlemaps/assets/js-marker-clusterer-gh-pages/images';
120 | }
121 | }
122 |
123 | $this->Template->map = $arrMap;
124 | $this->Template->tabs = $this->dlh_googlemap_tabs;
125 |
126 | $this->Template->labels = $GLOBALS['TL_LANG']['dlh_googlemaps']['labels'];
127 | }
128 | }
--------------------------------------------------------------------------------
/languages/fr/tl_content.xlf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Google Map
6 | Google Map
7 |
8 |
9 | Please select a Google Map.
10 | Veuillez choisir une Google Map.
11 |
12 |
13 | Zoom-Factor
14 | Niveau de zoom
15 |
16 |
17 | Here you can override the zoom factor set in the module for just this implementation.
18 | Ici vous pouvez redéfinir le niveau de zoom qui sera utilisé uniquement par l'implémentation du module.
19 |
20 |
21 | Dimensions width x height
22 | Dimensions largeur x hauteur
23 |
24 |
25 | Here you can override the map dimensions set in the module for just this implementation.
26 | Ici vous pouvez redéfinir les dimensions de la carte qui seront utilisées uniquement par l'implémentation du module.
27 |
28 |
29 | Use static map
30 | Utiliser une carte statique
31 |
32 |
33 | Instead of a normal Google-Map a (resticted) static map can be shown.
34 | A la place d'une Google-Map standard, une carte statique peut être affichée.
35 |
36 |
37 | Link address
38 | Adresse du lien
39 |
40 |
41 | Please enter a web address (http://...) or an insert-tag.
42 | Veuillez saisir une adresse web (http://...) ou un tag d'insertion.
43 |
44 |
45 | Template
46 |
47 |
48 | Select a front end template.
49 |
50 |
51 | Discard CSS
52 |
53 |
54 | The extension provides some own CSS.
55 |
56 |
57 | Map is shown in Tabs or Accordion
58 |
59 |
60 | This option refreshes the map when changing a tab or accordion. Made for the extension Tabcontrol.
61 |
62 |
63 | Map has data protection
64 |
65 |
66 | Prevents the data transfer to Google until confirmation.
67 |
68 |
69 | Data protection notice
70 |
71 |
72 | Overwrites the default message. Insert-Tags are supported.
73 |
74 |
75 | Map data
76 |
77 |
78 |
79 |
--------------------------------------------------------------------------------
/languages/fr/tl_module.xlf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Google Map
6 | Google Map
7 |
8 |
9 | Please select a Google Map.
10 | Veuillez choisir une Google Map.
11 |
12 |
13 | Zoom-Factor
14 | Niveau de zoom.
15 |
16 |
17 | Here you can override the zoom factor set in the module for just this implementation.
18 | Ici vous pouvez redéfinir le niveau de zoom du module qui sera utilisé uniquement par cette implémentation.
19 |
20 |
21 | Dimensions width x height
22 | Dimensions largeur x hauteur
23 |
24 |
25 | Here you can override the map dimensions set in the module for just this implementation.
26 | Ici vous pouvez redéfinir les dimensions de la carte du module, qui seront utilisées uniquement par cette implémentation.
27 |
28 |
29 | Use static map
30 | Utiliser une carte statique
31 |
32 |
33 | Instead of a normal Google-Map a (resticted) static map can be shown.
34 | A la place d'une Google Map standard, une carte statique (restreinte) peut être affichée.
35 |
36 |
37 | Link address
38 | Adresse du lien
39 |
40 |
41 | Please enter a web address (http://...) or an insert-tag.
42 | Veuillez saisir une adresse web (http://...) ou un tag d'insertion.
43 |
44 |
45 | Template
46 |
47 |
48 | Select a front end template.
49 |
50 |
51 | Discard CSS
52 |
53 |
54 | The extension provides some own CSS.
55 |
56 |
57 | Map is shown in Tabs or Accordion
58 |
59 |
60 | This option refreshes the map when changing a tab or accordion. Made for the extension Tabcontrol.
61 |
62 |
63 | Map has data protection
64 |
65 |
66 | Prevents the data transfer to Google until confirmation.
67 |
68 |
69 | Data protection notice
70 |
71 |
72 | Overwrites the default message. Insert-Tags are supported.
73 |
74 |
75 | Map data
76 |
77 |
78 |
79 |
--------------------------------------------------------------------------------
/modules/ModuleMap.php:
--------------------------------------------------------------------------------
1 | dlh_googlemap);
48 |
49 | $objTemplate = new \BackendTemplate('be_wildcard');
50 |
51 | $objTemplate->wildcard = '### ' . utf8_strtoupper($GLOBALS['TL_LANG']['FMD']['dlh_googlemaps'][0]) . ' ###';
52 | $objTemplate->title = $this->headline;
53 | $objTemplate->id = $this->dlh_googlemap;
54 | $objTemplate->link = $objMap->title;
55 | $objTemplate->href = 'contao/main.php?do=themes&table=tl_module&act=edit&id=' . $this->id;
56 |
57 | return $objTemplate->parse();
58 | }
59 |
60 | return parent::generate();
61 | }
62 |
63 |
64 | /**
65 | * Generate the module
66 | */
67 | protected function compile()
68 | {
69 | global $objPage;
70 |
71 | $key = null;
72 |
73 | if (($objRootPage = \PageModel::findByPk($objPage->rootId)) !== null)
74 | {
75 | $key = $objRootPage->dlh_googlemaps_apikey;
76 | }
77 |
78 | if (!$key)
79 | {
80 | $key = \Config::get('dlh_googlemaps_apikey');
81 | }
82 |
83 | // Contao framework sets images to max-width 100%, which collides with Google's CSS
84 | if(!$this->dlh_googlemap_nocss)
85 | {
86 | \delahaye\googlemaps\Googlemap::CssInjection();
87 | }
88 |
89 | // get the map data
90 | $arrParams = array
91 | (
92 | 'mapSize' => deserialize($this->dlh_googlemap_size),
93 | 'zoom' => $this->dlh_googlemap_zoom,
94 | 'protected' => $this->dlh_googlemap_protected,
95 | 'privacy' => $this->dlh_googlemap_privacy
96 | );
97 |
98 | $arrMap = \delahaye\googlemaps\Googlemap::getMapData($this->dlh_googlemap, $objPage->outputFormat, $arrParams);
99 |
100 | // static map
101 | if($this->dlh_googlemap_static)
102 | {
103 | $this->Template = new \FrontendTemplate('mod_dlh_googlemapsstatic');
104 |
105 | if($this->dlh_googlemap_url)
106 | {
107 | $arrMap['staticMap'] = 'dlh_googlemap_rel ? ($objPage->outputFormat == 'html5' ? ' data-lightbox="' : ' rel="').$this->dlh_googlemap_rel.'"' : '') .' title="'.addslashes($this->dlh_googlemap_linkTitle).'"'.($this->dlh_googlemap_target ? ' onclick="window.open(this.href); return false;"' : '') .'>'.$arrMap['staticMap'].'';
108 | }
109 | }
110 | // dynamic map
111 | else
112 | {
113 | if($this->dlh_googlemap_template && $this->dlh_googlemap_template != 'mod_dlh_googlemaps_default')
114 | {
115 | $this->Template = new \FrontendTemplate($this->dlh_googlemap_template);
116 | }
117 |
118 | if($arrMap['useClusterer']){
119 | $GLOBALS['TL_JAVASCRIPT'][] = 'system/modules/dlh_googlemaps/assets/js-marker-clusterer-gh-pages/src/markerclusterer.js';
120 | $arrMap['clusterImg'] = $arrMap['clustererImg'] ? $arrMap['clustererImg'] : 'system/modules/dlh_googlemaps/assets/js-marker-clusterer-gh-pages/images';
121 | }
122 | }
123 |
124 | $this->Template->map = $arrMap;
125 | $this->Template->tabs = $this->dlh_googlemap_tabs;
126 |
127 | $this->Template->labels = $GLOBALS['TL_LANG']['dlh_googlemaps']['labels'];
128 |
129 | }
130 | }
--------------------------------------------------------------------------------
/languages/cs/tl_content.xlf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Google Map
6 | Google Mapa
7 |
8 |
9 | Please select a Google Map.
10 | Prosím, vyberte Google Mapu.
11 |
12 |
13 | Zoom-Factor
14 | Přiblížení
15 |
16 |
17 | Here you can override the zoom factor set in the module for just this implementation.
18 | Prosím, zadejte přiblížení mapy.
19 |
20 |
21 | Dimensions width x height
22 | Zadejte šířku a výšku
23 |
24 |
25 | Here you can override the map dimensions set in the module for just this implementation.
26 | Prosím, zadejte šířku a výšku mapy.
27 |
28 |
29 | Use static map
30 | Použít statickou mapu
31 |
32 |
33 | Instead of a normal Google-Map a (resticted) static map can be shown.
34 | Namísto normální Google mapy, zobrazit statickou mapu.
35 |
36 |
37 | Link address
38 | Adresu odkazu
39 |
40 |
41 | Please enter a web address (http://...) or an insert-tag.
42 | Zadejte prosím webovou adresu (http:// ...), nebo vložte tag.
43 |
44 |
45 | Template
46 | Šablona
47 |
48 |
49 | Select a front end template.
50 | Vyberte frontend šablonu.
51 |
52 |
53 | Discard CSS
54 | Vypnout CSS
55 |
56 |
57 | The extension provides some own CSS.
58 | Rozšíření poskytuje některé vlastní CSS.
59 |
60 |
61 | Map is shown in Tabs or Accordion
62 | Mapa je zobrazena v záložkách nebo akordeonu
63 |
64 |
65 | This option refreshes the map when changing a tab or accordion. Made for the extension Tabcontrol.
66 | Tato volba aktualizuje mapy při změně záložky nebo akordeonu. Připraveno pro rozšíření TabControl.
67 |
68 |
69 | Map has data protection
70 |
71 |
72 | Prevents the data transfer to Google until confirmation.
73 |
74 |
75 | Data protection notice
76 |
77 |
78 | Overwrites the default message. Insert-Tags are supported.
79 |
80 |
81 | Map data
82 |
83 |
84 |
85 |
--------------------------------------------------------------------------------
/languages/cs/tl_module.xlf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Google Map
6 | Google mapa
7 |
8 |
9 | Please select a Google Map.
10 | Vybete si prosím Google mapu
11 |
12 |
13 | Zoom-Factor
14 | Přiblížení
15 |
16 |
17 | Here you can override the zoom factor set in the module for just this implementation.
18 | Prosím, zadejte přiblížení mapy.
19 |
20 |
21 | Dimensions width x height
22 | Rozměry šířka x výška
23 |
24 |
25 | Here you can override the map dimensions set in the module for just this implementation.
26 | Zde můžete změnit nastavení rozměrů mapy.
27 |
28 |
29 | Use static map
30 | Použít nepohyblivou mapu
31 |
32 |
33 | Instead of a normal Google-Map a (resticted) static map can be shown.
34 | Místo normální Google mapy se zobrazi omezená (statická)mapa.
35 |
36 |
37 | Link address
38 | Adresa odkazu
39 |
40 |
41 | Please enter a web address (http://...) or an insert-tag.
42 | Zadejte prosím adresu webu (včetně http://...) nebo vložte tag.
43 |
44 |
45 | Template
46 | Šablona
47 |
48 |
49 | Select a front end template.
50 | Vyberte frontend šablonu.
51 |
52 |
53 | Discard CSS
54 | Vypnout CSS
55 |
56 |
57 | The extension provides some own CSS.
58 | Rozšíření poskytuje některé vlastní CSS.
59 |
60 |
61 | Map is shown in Tabs or Accordion
62 | Mapa je zobrazena v záložkách nebo akordeonu
63 |
64 |
65 | This option refreshes the map when changing a tab or accordion. Made for the extension Tabcontrol.
66 | Tato volba aktualizuje mapy při změně záložky nebo akordeonu. Připraveno pro rozšíření TabControl.
67 |
68 |
69 | Map has data protection
70 |
71 |
72 | Prevents the data transfer to Google until confirmation.
73 |
74 |
75 | Data protection notice
76 |
77 |
78 | Overwrites the default message. Insert-Tags are supported.
79 |
80 |
81 | Map data
82 |
83 |
84 |
85 |
--------------------------------------------------------------------------------
/languages/it/tl_content.xlf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Google Map
6 | Google Map
7 |
8 |
9 | Please select a Google Map.
10 | Seleziona una Google Map.
11 |
12 |
13 | Zoom-Factor
14 | Fattore di zoom
15 |
16 |
17 | Here you can override the zoom factor set in the module for just this implementation.
18 | Qui è possibile sovrascrivere il fattore di zoom impostato nel modulo, solo per questo elemento.
19 |
20 |
21 | Dimensions width x height
22 | Dimensioni, larghezza ed altezza
23 |
24 |
25 | Here you can override the map dimensions set in the module for just this implementation.
26 | Qui è possibile sovrascrivere le dimensioni impostate dal modulo, solo per questo elemento.
27 |
28 |
29 | Use static map
30 | Usa una mappa statica
31 |
32 |
33 | Instead of a normal Google-Map a (resticted) static map can be shown.
34 | Invece di un normale Google Map può essere visualizzata a mappa statica.
35 |
36 |
37 | Link address
38 | Link
39 |
40 |
41 | Please enter a web address (http://...) or an insert-tag.
42 | Inserire un indirizzo web (http://...) oppure un insert-tag.
43 |
44 |
45 | Template
46 | Template
47 |
48 |
49 | Select a front end template.
50 | Seleziona un template.
51 |
52 |
53 | Discard CSS
54 | Non includere il CSS
55 |
56 |
57 | The extension provides some own CSS.
58 | L'estensione ha alcuni CSS propri.
59 |
60 |
61 | Map is shown in Tabs or Accordion
62 | La mappa è mostrata in un Tabs o Elemento fisarmonica
63 |
64 |
65 | This option refreshes the map when changing a tab or accordion. Made for the extension Tabcontrol.
66 | Questa opzione aggiorna la mappa quando si cambia una scheda o si apre un elemento fisarmonica.
67 | Realizzato per l'estensione TabControl.
68 |
69 |
70 | Map has data protection
71 |
72 |
73 | Prevents the data transfer to Google until confirmation.
74 |
75 |
76 | Data protection notice
77 |
78 |
79 | Overwrites the default message. Insert-Tags are supported.
80 |
81 |
82 | Map data
83 |
84 |
85 |
86 |
--------------------------------------------------------------------------------
/assets/js-marker-clusterer-gh-pages/examples/speed_test.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileoverview This demo is used for MarkerClusterer. It will show 100 markers
3 | * using MarkerClusterer and count the time to show the difference between using
4 | * MarkerClusterer and without MarkerClusterer.
5 | * @author Luke Mahe (v2 author: Xiaoxi Wu)
6 | */
7 |
8 | function $(element) {
9 | return document.getElementById(element);
10 | }
11 |
12 | var speedTest = {};
13 |
14 | speedTest.pics = null;
15 | speedTest.map = null;
16 | speedTest.markerClusterer = null;
17 | speedTest.markers = [];
18 | speedTest.infoWindow = null;
19 |
20 | speedTest.init = function() {
21 | var latlng = new google.maps.LatLng(39.91, 116.38);
22 | var options = {
23 | 'zoom': 2,
24 | 'center': latlng,
25 | 'mapTypeId': google.maps.MapTypeId.ROADMAP
26 | };
27 |
28 | speedTest.map = new google.maps.Map($('map'), options);
29 | speedTest.pics = data.photos;
30 |
31 | var useGmm = document.getElementById('usegmm');
32 | google.maps.event.addDomListener(useGmm, 'click', speedTest.change);
33 |
34 | var numMarkers = document.getElementById('nummarkers');
35 | google.maps.event.addDomListener(numMarkers, 'change', speedTest.change);
36 |
37 | speedTest.infoWindow = new google.maps.InfoWindow();
38 |
39 | speedTest.showMarkers();
40 | };
41 |
42 | speedTest.showMarkers = function() {
43 | speedTest.markers = [];
44 |
45 | var type = 1;
46 | if ($('usegmm').checked) {
47 | type = 0;
48 | }
49 |
50 | if (speedTest.markerClusterer) {
51 | speedTest.markerClusterer.clearMarkers();
52 | }
53 |
54 | var panel = $('markerlist');
55 | panel.innerHTML = '';
56 | var numMarkers = $('nummarkers').value;
57 |
58 | for (var i = 0; i < numMarkers; i++) {
59 | var titleText = speedTest.pics[i].photo_title;
60 | if (titleText === '') {
61 | titleText = 'No title';
62 | }
63 |
64 | var item = document.createElement('DIV');
65 | var title = document.createElement('A');
66 | title.href = '#';
67 | title.className = 'title';
68 | title.innerHTML = titleText;
69 |
70 | item.appendChild(title);
71 | panel.appendChild(item);
72 |
73 |
74 | var latLng = new google.maps.LatLng(speedTest.pics[i].latitude,
75 | speedTest.pics[i].longitude);
76 |
77 | var imageUrl = 'http://chart.apis.google.com/chart?cht=mm&chs=24x32&chco=' +
78 | 'FFFFFF,008CFF,000000&ext=.png';
79 | var markerImage = new google.maps.MarkerImage(imageUrl,
80 | new google.maps.Size(24, 32));
81 |
82 | var marker = new google.maps.Marker({
83 | 'position': latLng,
84 | 'icon': markerImage
85 | });
86 |
87 | var fn = speedTest.markerClickFunction(speedTest.pics[i], latLng);
88 | google.maps.event.addListener(marker, 'click', fn);
89 | google.maps.event.addDomListener(title, 'click', fn);
90 | speedTest.markers.push(marker);
91 | }
92 |
93 | window.setTimeout(speedTest.time, 0);
94 | };
95 |
96 | speedTest.markerClickFunction = function(pic, latlng) {
97 | return function(e) {
98 | e.cancelBubble = true;
99 | e.returnValue = false;
100 | if (e.stopPropagation) {
101 | e.stopPropagation();
102 | e.preventDefault();
103 | }
104 | var title = pic.photo_title;
105 | var url = pic.photo_url;
106 | var fileurl = pic.photo_file_url;
107 |
108 | var infoHtml = '
To use a marker clusterer, create a MarkerClusterer object.
25 | In the simplest case, just pass a map to it.
26 |
27 | var center = new google.maps.LatLng(37.4419, -122.1419);
28 | var options = {
29 | 'zoom': 13,
30 | 'center': center,
31 | 'mapTypeId': google.maps.MapTypeId.ROADMAP
32 | };
33 |
34 | var map = new google.maps.Map(document.getElementById("map"), options);
35 | var mc = new MarkerClusterer(map);
36 |
37 |
38 |
39 | You may also specify a number of options to fine-tune the marker
40 | manager's performance. These options are passed via a object.
41 |
42 |
43 | The imagePath option needs to be set to the location of your local marker images.
44 |
45 |
46 |
47 | var center = new google.maps.LatLng(37.4419, -122.1419);
48 | var options = {
49 | 'zoom': 13,
50 | 'center': center,
51 | 'mapTypeId': google.maps.MapTypeId.ROADMAP
52 | };
53 |
54 | var map = new google.maps.Map(document.getElementById("map"), options);
55 |
56 | var mcOptions = {gridSize: 50, maxZoom: 15, imagePath: 'images/m'};
57 | var mc = new MarkerClusterer(map, [], mcOptions);
58 |
59 |
60 |
Once you create a marker cluster, you will want to add markers to it.
61 | MarkerClusterer supports adding markers using the
62 | addMarker() and addMarkers()method or by
63 | providing a array of markers to the constructor:
64 |
65 | var center = new google.maps.LatLng(37.4419, -122.1419);
66 | var options = {
67 | 'zoom': 13,
68 | 'center': center,
69 | 'mapTypeId': google.maps.MapTypeId.ROADMAP
70 | };
71 |
72 | var map = new google.maps.Map(document.getElementById("map"), options);
73 |
74 | var mcOptions = {gridSize: 50, maxZoom: 15, imagePath: 'images/m'};
75 | var markers = [...]; // Create the markers you want to add and collect them into a array.
76 | var mc = new MarkerClusterer(map, markers, mcOptions);
77 |
78 |
79 |
A Simple MarkerClusterer Example:
80 |
81 |
This example will show 100 markers on map.
82 |
83 |
84 | var center = new google.maps.LatLng(37.4419, -122.1419);
85 | var options = {
86 | 'zoom': 13,
87 | 'center': center,
88 | 'mapTypeId': google.maps.MapTypeId.ROADMAP
89 | };
90 |
91 | var map = new google.maps.Map(document.getElementById("map"), options);
92 |
93 | var markers = [];
94 | for (var i = 0; i < 100; i++) {
95 | var latLng = new google.maps.LatLng(data.photos[i].latitude,
96 | data.photos[i].longitude);
97 | var marker = new google.maps.Marker({'position': latLng});
98 | markers.push(marker);
99 | }
100 | var markerCluster = new MarkerClusterer(map, markers, {imagePath: 'images/m'});
101 |
123 |
124 |
125 |
--------------------------------------------------------------------------------
/languages/de/tl_module.xlf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Google Map
6 | Google Map
7 |
8 |
9 | Please select a Google Map.
10 | Wählen Sie die gewünschte Google Map aus.
11 |
12 |
13 | Zoom-Factor
14 | Zoom-Faktor
15 |
16 |
17 | Here you can override the zoom factor set in the module for just this implementation.
18 | Hier können Sie den im Modul festgelegten Zoom-Faktor für diese Einbindung überschreiben.
19 |
20 |
21 | Dimensions width x height
22 | Anzeigemaße Breite x Höhe
23 |
24 |
25 | Here you can override the map dimensions set in the module for just this implementation.
26 | Hier können Sie die im Modul festgelegten Anzeigemaße für diese Einbindung überschreiben.
27 |
28 |
29 | Use static map
30 | Statische Karte verwenden
31 |
32 |
33 | Instead of a normal Google-Map a (resticted) static map can be shown.
34 | Anstelle einer normalen Google-Map kann eine (eingeschränkte) statische Karte eingebunden werden.
35 |
36 |
37 | Link address
38 | Link-Adresse
39 |
40 |
41 | Please enter a web address (http://...) or an insert-tag.
42 | Geben Sie eine Web-Adresse (http://...) oder ein Insert-Tag ein.
43 |
44 |
45 | Template
46 | Template
47 |
48 |
49 | Select a front end template.
50 | Wählen Sie das Template für diese Kartendarstellung aus.
51 |
52 |
53 | Discard CSS
54 | CSS weglassen
55 |
56 |
57 | The extension provides some own CSS.
58 | Die Erweiterung lädt standardmäßig ein wenig eigenes CSS.
59 |
60 |
61 | Map is shown in Tabs or Accordion
62 | Karte in Tabs oder Accordion
63 |
64 |
65 | This option refreshes the map when changing a tab or accordion. Made for the extension Tabcontrol.
66 | Die Option lädt die Karte bei einem Tab- oder Accordionwechsel dynamisch neu. Ausgelegt für die Erweiterung Tabcontrol.
67 |
68 |
69 | Map has data protection
70 | Karte hat Datenschutz-Bestätigung
71 |
72 |
73 | Prevents the data transfer to Google until confirmation.
74 | Verhindert den Datentransfer zu Google bis zur Bestätigung.
75 |
76 |
77 | Data protection notice
78 | Datenschutzhinweis
79 |
80 |
81 | Overwrites the default message. Insert-Tags are supported.
82 | Überschreibt den Standard-Hinweis. Insert-Tags werden unterstützt.
83 |
84 |
85 | Map data
86 | Kartendaten
87 |
88 |
89 |
90 |
--------------------------------------------------------------------------------
/languages/de/tl_content.xlf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Google Map
6 | Google Map
7 |
8 |
9 | Please select a Google Map.
10 | Wählen Sie die gewünschte Google Map aus.
11 |
12 |
13 | Zoom-Factor
14 | Zoom-Faktor
15 |
16 |
17 | Here you can override the zoom factor set in the module for just this implementation.
18 | Hier können Sie den im Modul festgelegten Zoom-Faktor für diese Einbindung überschreiben.
19 |
20 |
21 | Dimensions width x height
22 | Anzeigemaße Breite x Höhe
23 |
24 |
25 | Here you can override the map dimensions set in the module for just this implementation.
26 | Hier können Sie die im Modul festgelegten Anzeigemaße für diese Einbindung überschreiben.
27 |
28 |
29 | Use static map
30 | Statische Karte verwenden
31 |
32 |
33 | Instead of a normal Google-Map a (resticted) static map can be shown.
34 | Anstelle einer normalen Google-Map kann eine (eingeschränkte) statische Karte eingebunden werden.
35 |
36 |
37 | Link address
38 | Link-Adresse
39 |
40 |
41 | Please enter a web address (http://...) or an insert-tag.
42 | Geben Sie eine Web-Adresse (http://...) oder ein Insert-Tag ein.
43 |
44 |
45 | Template
46 | Template
47 |
48 |
49 | Select a front end template.
50 | Wählen Sie das Template für diese Kartendarstellung aus.
51 |
52 |
53 | Discard CSS
54 | CSS weglassen
55 |
56 |
57 | The extension provides some own CSS.
58 | Die Erweiterung lädt standardmäßig ein wenig eigenes CSS.
59 |
60 |
61 | Map is shown in Tabs or Accordion
62 | Karte in Tabs oder Accordion
63 |
64 |
65 | This option refreshes the map when changing a tab or accordion. Made for the extension Tabcontrol.
66 | Die Option lädt die Karte bei einem Tab- oder Accordionwechsel dynamisch neu. Ausgelegt für die Erweiterung Tabcontrol.
67 |
68 |
69 | Map has data protection
70 | Karte hat Datenschutz-Bestätigung
71 |
72 |
73 | Prevents the data transfer to Google until confirmation.
74 | Verhindert den Datentransfer zu Google bis zur Bestätigung.
75 |
76 |
77 | Data protection notice
78 | Datenschutz-Hinweis
79 |
80 |
81 | Overwrites the default message. Insert-Tags are supported.
82 | Überschreibt den Standard-Hinweis. Insert-Tags werden unterstützt.
83 |
84 |
85 | Map data
86 | Kartendaten
87 |
88 |
89 |
90 |
--------------------------------------------------------------------------------
/docs/en/Dynamic_markers.md:
--------------------------------------------------------------------------------
1 | Dynamic maps with the Contao module "dlh_googlemaps"
2 | =====
3 |
4 | To integrate dynamic markings into maps, a javascript block is needed at any other position within the rendered XHTML of the page. The function is called after the initialisation of the javascript map, so it should not matter if this block appears before the map or after withing the code. The following example shows variable parts marked as ** which have to be replaced by the actual values in a real matter:
5 |
6 | *ID* = Id of the Google Map
7 |
8 | *LATLNG* = Pair of coordinates
9 |
10 | *IMG* = Name of the image file
11 |
12 | Element names must build a unique alias in the variable names. I recommend counting numers as they are used for the automatically generated elements.
13 |
14 | ```javascript
15 |
16 | function gmap*ID*_dynmap(gmap*ID*) {
17 |
18 | // Move map center
19 |
20 | gmap*ID*.center = new google.maps.LatLng(*LATLNG*);
21 | // Zoom
22 | gmap*ID*.zoom = 14;
23 |
24 |
25 | // Simple marking
26 |
27 | var gmap*ID*_1_marker = new google.maps.Marker({
28 | position: new google.maps.LatLng(*LATLNG*),
29 | map: gmap*ID*
30 | });
31 |
32 |
33 | // Complex marking with auto-popup infowindow
34 |
35 | var gmap*ID*_2_marker = new google.maps.Marker({
36 | position: new google.maps.LatLng(*LATLNG*),
37 | map: gmap*ID*,
38 | title:"Hello World!",
39 | icon: new google.maps.MarkerImage(
40 | 'tl_files/*IMG*',
41 | new google.maps.Size(20, 20),
42 | new google.maps.Point(0,0),
43 | new google.maps.Point(20,0)
44 | ),
45 | shadow: new google.maps.MarkerImage(
46 | 'tl_files/*IMG*',
47 | new google.maps.Size(30,30),
48 | new google.maps.Point(0,0),
49 | new google.maps.Point(10,5)
50 | )
51 | });
52 | var gmap*ID*_2_infowindow = new google.maps.InfoWindow({
53 | content: 'Hallo Welt! Wie geht\'s?'
54 | });
55 | google.maps.event.addListener(gmap*ID*_2_marker, 'click', function() {
56 | gmap*ID*_2_infowindow.open(gmap*ID*,gmap*ID*_2_marker);
57 | });
58 | gmap*ID*_2_infowindow.open(gmap*ID*,gmap*ID*_2_marker);
59 |
60 |
61 |
62 | // Poly line
63 |
64 | var gmap*ID*_3_path = new google.maps.Polyline({
65 | path: [
66 | new google.maps.LatLng(*LATLNG*),
67 | new google.maps.LatLng(*LATLNG*),
68 | new google.maps.LatLng(*LATLNG*),
69 | new google.maps.LatLng(*LATLNG*)
70 | ],
71 | strokeColor: "#FF0000",
72 | strokeOpacity: 0.5,
73 | strokeWeight: 3
74 | });
75 | gmap*ID*_3_path.setMap(gmap*ID*);
76 |
77 |
78 | // Closed polygon
79 |
80 | var gmap*ID*_4_polygon = new google.maps.Polygon({
81 | path: [
82 | new google.maps.LatLng(*LATLNG*),
83 | new google.maps.LatLng(*LATLNG*),
84 | new google.maps.LatLng(*LATLNG*)
85 | ],
86 | strokeColor: "#FF00ff",
87 | strokeOpacity: 0.5,
88 | strokeWeight: 3,
89 | fillColor: "#FF0000",
90 | fillOpacity: 0.35
91 | });
92 | gmap*ID*_4_polygon.setMap(gmap*ID*);
93 | // A click on the polygon moves the map center
94 | google.maps.event.addListener(gmap*ID*_4_polygon, 'click', function(event) {
95 | gmap*ID*.setCenter(event.latLng);
96 | });
97 |
98 |
99 | // Infowindow (auto-popup)
100 |
101 | var gmap*ID*_5_infowindow = new google.maps.InfoWindow({
102 | position: new google.maps.LatLng(*LATLNG*),
103 | content: 'Hallo Welt!'
104 | });
105 | gmap*ID*_5_infowindow.open(gmap*ID*);
106 |
107 |
108 | // Ground overlay
109 |
110 | var gmap*ID*_6_overlay = new google.maps.GroundOverlay(
111 | "tl_files/test.jpg",
112 | new google.maps.LatLngBounds(
113 | new google.maps.LatLng(*LATLNG*), // Koordinate Südwest
114 | new google.maps.LatLng(*LATLNG*) // Koordinate Nordost
115 | )
116 | );
117 | gmap*ID*_6_overlay.setMap(gmap*ID*);
118 |
119 | }
120 |
121 | ```
122 |
123 | Of course many more parameters can be changed dynamically. You'll find more info and many examples at http://code.google.com/intl/de-DE/apis/maps/documentation/javascript/examples/index.html.
124 |
125 | Working Example:
126 | -----
127 |
128 | The following script can be used 1:1 in an element of the type Html (with >script> tag allowed), It moved the center of the map with the ID 1 to Paris, switches to roadmap view, zooms to step 10 and marks the Eiffel-tower and the Louvre with a standard marker plus infowindow:
129 |
130 | ```javascript
131 |
132 | function gmap1_dynmap(gmap1) {
133 |
134 | // Move map center
135 | gmap1.center = new google.maps.LatLng(48.856846,2.351024);
136 | // Zoom
137 | gmap1.zoom = 12;
138 | gmap1.mapTypeId=google.maps.MapTypeId.ROADMAP;
139 |
140 |
141 | // Marker Eiffel-tower
142 | var gmap1_eiffel_marker = new google.maps.Marker({
143 | position: new google.maps.LatLng(48.858314,2.294462),
144 | map: gmap1
145 | });
146 | var gmap1_eiffel_infowindow = new google.maps.InfoWindow({
147 | content: 'Le Tour Eiffel',
148 | });
149 | google.maps.event.addListener(gmap1_eiffel_marker, 'click', function() {
150 | gmap1_eiffel_infowindow.open(gmap1,gmap1_eiffel_marker);
151 | });
152 |
153 | // Marker Louvre
154 | var gmap1_lvre_marker = new google.maps.Marker({
155 | position: new google.maps.LatLng(48.861053,2.335317),
156 | map: gmap1
157 | });
158 | var gmap1_lvre_infowindow = new google.maps.InfoWindow({
159 | content: 'Musee du Louvre'
160 | });
161 | google.maps.event.addListener(gmap1_lvre_marker, 'click', function() {
162 | gmap1_lvre_infowindow.open(gmap1,gmap1_lvre_marker);
163 | });
164 |
165 | }
166 |
167 | ```
168 |
169 | Feel free to experiment with other elements, modified MetaModels-templates, listings and so on. Have fun!
--------------------------------------------------------------------------------
/docs/de/Dynamische_Marker.md:
--------------------------------------------------------------------------------
1 | Dynamische Maps mit dem Contao-Modul "dlh_googlemaps"
2 | =====
3 |
4 | Um dynamische Markierungen und andere Elemente in eine Map einzufügen, wird ein Javascript-Funktionsblock an einer anderen Stelle der XHTML-Ausgabe benötigt. Da die entsprechende Funktion erst bei der Initialisierung der Map aufgerufen wird, ist es i.d.R. unerheblich, ob dieser Block im Quelltext vor oder nach dem Inhaltselement mit der Googlemap erscheint. Im folgenden Beispielcode ist sind variable Bestandteile durch ** gekennzeichnet und müssten in einer Einbindung durch die entsprechenden echten Werte ersetzt werden:
5 |
6 | *ID* = Id der gewünschten Googlemap
7 |
8 | *LATLNG* = Koordinatenpaar
9 |
10 | *IMG* = Name der gewünschten Grafik
11 |
12 | Elementnamen müssen zumindest in der Variablenbezeichnung eine eindeutige Kennung ergeben, ich empfehle eine fortlaufende Nummer, wie es das Modul auch bei automatisch erzeugten Elementen macht.
13 |
14 | ```javascript
15 |
16 | function gmap*ID*_dynmap(gmap*ID*) {
17 |
18 | // Kartenmitte verschieben
19 |
20 | gmap*ID*.center = new google.maps.LatLng(*LATLNG*);
21 | // Zoomstufe
22 | gmap*ID*.zoom = 14;
23 |
24 |
25 | // Einfache Markierung
26 |
27 | var gmap*ID*_1_marker = new google.maps.Marker({
28 | position: new google.maps.LatLng(*LATLNG*),
29 | map: gmap*ID*
30 | });
31 |
32 |
33 | // Komplexe Markierung mit selbstöffnender Infoblase
34 |
35 | var gmap*ID*_2_marker = new google.maps.Marker({
36 | position: new google.maps.LatLng(*LATLNG*),
37 | map: gmap*ID*,
38 | title:"Hello World!",
39 | icon: new google.maps.MarkerImage(
40 | 'tl_files/*IMG*',
41 | new google.maps.Size(20, 20),
42 | new google.maps.Point(0,0),
43 | new google.maps.Point(20,0)
44 | ),
45 | shadow: new google.maps.MarkerImage(
46 | 'tl_files/*IMG*',
47 | new google.maps.Size(30,30),
48 | new google.maps.Point(0,0),
49 | new google.maps.Point(10,5)
50 | )
51 | });
52 | var gmap*ID*_2_infowindow = new google.maps.InfoWindow({
53 | content: 'Hallo Welt! Wie geht\'s?'
54 | });
55 | google.maps.event.addListener(gmap*ID*_2_marker, 'click', function() {
56 | gmap*ID*_2_infowindow.open(gmap*ID*,gmap*ID*_2_marker);
57 | });
58 | gmap*ID*_2_infowindow.open(gmap*ID*,gmap*ID*_2_marker);
59 |
60 |
61 |
62 | // Poly-Linie
63 |
64 | var gmap*ID*_3_path = new google.maps.Polyline({
65 | path: [
66 | new google.maps.LatLng(*LATLNG*),
67 | new google.maps.LatLng(*LATLNG*),
68 | new google.maps.LatLng(*LATLNG*),
69 | new google.maps.LatLng(*LATLNG*)
70 | ],
71 | strokeColor: "#FF0000",
72 | strokeOpacity: 0.5,
73 | strokeWeight: 3
74 | });
75 | gmap*ID*_3_path.setMap(gmap*ID*);
76 |
77 |
78 | // Geschlossenes Polygon
79 |
80 | var gmap*ID*_4_polygon = new google.maps.Polygon({
81 | path: [
82 | new google.maps.LatLng(*LATLNG*),
83 | new google.maps.LatLng(*LATLNG*),
84 | new google.maps.LatLng(*LATLNG*)
85 | ],
86 | strokeColor: "#FF00ff",
87 | strokeOpacity: 0.5,
88 | strokeWeight: 3,
89 | fillColor: "#FF0000",
90 | fillOpacity: 0.35
91 | });
92 | gmap*ID*_4_polygon.setMap(gmap*ID*);
93 | // Ein Klick auf das Polygon verschiebt das Kartenzentrum
94 | google.maps.event.addListener(gmap*ID*_4_polygon, 'click', function(event) {
95 | gmap*ID*.setCenter(event.latLng);
96 | });
97 |
98 |
99 | // Infoblase (selbstöffnend)
100 |
101 | var gmap*ID*_5_infowindow = new google.maps.InfoWindow({
102 | position: new google.maps.LatLng(*LATLNG*),
103 | content: 'Hallo Welt!'
104 | });
105 | gmap*ID*_5_infowindow.open(gmap*ID*);
106 |
107 |
108 | // Overlay-Grafik
109 |
110 | var gmap*ID*_6_overlay = new google.maps.GroundOverlay(
111 | "tl_files/test.jpg",
112 | new google.maps.LatLngBounds(
113 | new google.maps.LatLng(*LATLNG*), // Koordinate Südwest
114 | new google.maps.LatLng(*LATLNG*) // Koordinate Nordost
115 | )
116 | );
117 | gmap*ID*_6_overlay.setMap(gmap*ID*);
118 |
119 | }
120 |
121 | ```
122 |
123 | Es können natürlich noch mehr Eigenschaften dynamisch verändert werden, eine nähere Erläuterung und Beispiele finden sich auf http://code.google.com/intl/de-DE/apis/maps/documentation/javascript/examples/index.html.
124 |
125 | Konkretes Beispiel:
126 | -------------------
127 |
128 | Das folgende Script kann 1:1 in ein Element vom Typ Html (mit erlaubtem Tag
152 |
153 |
154 |
--------------------------------------------------------------------------------