Administer your Leaflet layers through the Drupal UI and combine layers from multiple modules into bundles.
Why?
By default you can choose between the maps provided by different modules. But you cannot combine
maps from different providers without creating a module yourself.
With this module you get a interface for combining layers from different modules into a bundle
you can use in your map.
It is also possible to add a layer directly through this module.
Project link
https://www.drupal.org/project/leaflet_layers
Git instructions
git clone --branch 1.0.x git@git.drupal.org:project/leaflet_layers.git
Comments
Comment #2
drupal-ramesh commentedkindly fix below coding errors:
FILE: C:\wamp64\www\leaflet_layers\config\schema\map_layer.schema.yml
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
26 | ERROR | [x] Expected 1 newline at end of file; 2 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: C:\wamp64\www\leaflet_layers\leaflet_layers.module
----------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
----------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but
| | found "\r\n"
26 | ERROR | [x] Expected 1 blank line after function; 2 found
93 | ERROR | [ ] Inline doc block comments are not allowed; use "/*
| | Comment */" or "// Comment" instead
96 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: C:\wamp64\www\leaflet_layers\README.md
----------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
----------------------------------------------------------------------
3 | WARNING | Line exceeds 80 characters; contains 107 characters
8 | WARNING | Line exceeds 80 characters; contains 96 characters
11 | WARNING | Line exceeds 80 characters; contains 94 characters
----------------------------------------------------------------------
FILE: C:\wamp64\www\leaflet_layers\src\Entity\MapBundle.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but
| | found "\r\n"
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: C:\wamp64\www\leaflet_layers\src\Entity\MapBundleInterface.php
----------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
----------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n"
| | but found "\r\n"
12 | WARNING | [x] There must be no blank line following an inline
| | comment
----------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: C:\wamp64\www\leaflet_layers\src\Entity\MapLayer.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but
| | found "\r\n"
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: C:\wamp64\www\leaflet_layers\src\Entity\MapLayerInterface.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but
| | found "\r\n"
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: C:\wamp64\www\leaflet_layers\src\Form\MapBundleDeleteForm.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but
| | found "\r\n"
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: C:\wamp64\www\leaflet_layers\src\Form\MapBundleForm.php
----------------------------------------------------------------------
FOUND 2 ERRORS AND 5 WARNINGS AFFECTING 6 LINES
----------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n"
| | but found "\r\n"
112 | WARNING | [ ] Line exceeds 80 characters; contains 125
| | characters
112 | WARNING | [x] There must be no blank line following an inline
| | comment
256 | ERROR | [x] Expected 1 space after "=>"; 0 found
292 | WARNING | [ ] Avoid backslash escaping in translatable strings
| | when possible, use "" quotes instead
297 | WARNING | [ ] Avoid backslash escaping in translatable strings
| | when possible, use "" quotes instead
302 | WARNING | [ ] Avoid backslash escaping in translatable strings
| | when possible, use "" quotes instead
----------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: C:\wamp64\www\leaflet_layers\src\Form\MapLayerDeleteForm.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but
| | found "\r\n"
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: C:\wamp64\www\leaflet_layers\src\Form\MapLayerForm.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but
| | found "\r\n"
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: C:\wamp64\www\leaflet_layers\src\MapBundleHtmlRouteProvider.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but
| | found "\r\n"
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: C:\wamp64\www\leaflet_layers\src\MapBundleListBuilder.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but
| | found "\r\n"
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: C:\wamp64\www\leaflet_layers\src\MapLayerHtmlRouteProvider.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but
| | found "\r\n"
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: C:\wamp64\www\leaflet_layers\src\MapLayerListBuilder.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but
| | found "\r\n"
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
Comment #3
drupal-ramesh commentedComment #4
andeersg commentedThank you for your feedback. I have fixed all the errors now.
Not sure how does line ending errors got in there, but I could not find any now.
Comment #5
arshadkhan35 commentedHi @andeersg,
Below are review comment, please address them
Pareview
I still see below coding standard issue, please fix them
Manual Review
Comment #6
andeersg commentedThank you for reviewing my code.
I'm wondering what options you use to get those warnings in drupacs? When I use "phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml .", I don't get any of those warnings.
Anyway, I have fixed them and also added a composer.json, updated the package and removed the blank line in leaflet_layers.menu.yml.
I'm not sure the license file is necessary? My code is only dependent of the leaflet drupal module, not the actual map framework.
Comment #7
andeersg commentedComment #8
andeersg commented