Compare commits

...

89 Commits

Author SHA1 Message Date
Алексей Безбородов 166c8818b9 Merge pull request 'feature/128_toggle_trust_prop_checkbox' (#150) from feature/128_toggle_trust_prop_checkbox into dev_mirocod 3 years ago
Artur Galyamov aa6d260ca1 Отображение столбцов в поля структуры доверительных свойств сделано более явно #128 3 years ago
Artur Galyamov 1ef18757de Исправлен баг, ссылка на поиск доверительных свойств формируется динамически правильно #150 3 years ago
Artur Galyamov 6631cf0220 Реализовано переключение состояния флажков ресурсов #128 3 years ago
Artur Galyamov 4d2ebb1020 Добавляется ссылка найти, если флажок без галочки #128 3 years ago
Artur Galyamov 86fde45a52 Ссылка исчезает при установке галочки на checkbox #128 3 years ago
Artur Galyamov c3da3fd388 Включение/выключение компетенций работает корректно #128 3 years ago
Artur Galyamov c02f7bd41a Реализована точка доступа по обновлению компетенций проекта #128 3 years ago
Artur Galyamov 9ce84e08a4 Переиспользован js-скрипт для AJAX-запроса по установке/снятию галочки с флажка #128 3 years ago
Алексей Безбородов 9fc208802b Merge pull request 'project_requirements' (#120) from project_requirements into dev_mirocod 3 years ago
Artur Galyamov d8a9c5e12b Убрано ограничение при заполнении компетенций и ресурсов #65 #120 3 years ago
Artur Galyamov e7f050e1c8 Координаты проекта могут содержать множество значений #65 #120 3 years ago
Artur Galyamov f77d73c83a Теперь ссылки на поиск доверительных свойств открываются в отдельной вкладке #65 3 years ago
Artur Galyamov 05f5c04461 Добавлялось лишнего в строку описания ресурса #65 3 years ago
Artur Galyamov da59f8af8d Реализован более трудный случай, когда в названии доверительного свойства есть пробел #65 3 years ago
Artur Galyamov b76fbf7d15 Реализован вывод компетенций с возможностью искать их #65 3 years ago
Artur Galyamov c1c130ae34 Реализован вывод ресурсов со ссылкой на поиск лиц с данным ресурсом #65 3 years ago
Artur Galyamov ff3b56acd2 Реализован вывод сохранённых доверительных свойств на соответствующей вкладке проекта #65 3 years ago
Artur Galyamov 23e8063895 Выводятся вкладки компетенции и ресурсы для проекта #65 3 years ago
Artur Galyamov dc2e63eeef Реализована возможность менять координаты проекта #15 3 years ago
Artur Galyamov 1540f8c5ad При редактировании проекта возможно указывать необходимые ресурсы и компетенции #65 3 years ago
Artur Galyamov 3d4b6af70d Тест долго проходит, к тому же эту функциональность на платформе не используем 3 years ago
Алексей Безбородов d2c4d13988 Merge pull request 'search_trusted_props' (#118) from search_trusted_props into dev_mirocod 3 years ago
Artur Galyamov 1e6ee55b9f Исправлен поиск компетенций #106 3 years ago
Artur Galyamov 5388d7b1de Выводятся ресурсы и интересы там где нужно #106 3 years ago
Artur Galyamov ef0c047e99 Реализован поиск лиц по ресурсам и интересам #106 3 years ago
Artur Galyamov 024759873c Реализован поиск лиц по компетенциям #106 3 years ago
Artur Galyamov 0a6487b3d0 Во вкладке компетенции выводятся и сообщества тоже #106 3 years ago
Artur Galyamov 219cf41f12 Выводятся компетенции в форматированном виде #106 3 years ago
Artur Galyamov 179f874d6c Актуализированы тесты, которые сломались после перевода #88 3 years ago
Artur Galyamov bb9c8202d5 Исправлена небольшая опечатка в переводе сообщений для веб-хука #88 3 years ago
Артур Галямов 4ab7493aec Merge pull request 'Перевод текста сообщений, приходящих в телеграм бот #88' (#115) from sergey_aksenov-patch-1 into dev_mirocod 3 years ago
Артур Галямов 6453541728 Merge pull request 'Карта сообществ #20' (#114) from org_map into dev_mirocod 3 years ago
Алексей Безбородов 7bb71a8f74 Карта сообществ #20 3 years ago
Artur Galyamov f29b079f3c Выводятся личности, упорядоченные по алфавиту логинов #106 3 years ago
Artur Galyamov 04e65b7854 Выведен шаблон для поиска лиц по компетенциям #106 3 years ago
Artur Galyamov ed2c6571a8 Выведена вкладка компетенции и настроен маршрут для будущего поиска по компетенциям #106 3 years ago
Сергей Аксенов 49e4bc0229 #38 Не переводил все, связанное с Pull request 3 years ago
Артур Галямов 7a057e4a47 Merge pull request 'Поиск пользователей по полю 'О себе' #101' (#103) from user_search into dev_mirocod 3 years ago
Алексей Безбородов bf0ca4662a Merge pull request 'user_resources' (#100) from user_resources into dev_mirocod 3 years ago
Artur Galyamov 136bddbd9f Уменьшена вероятность конфликтов слияния #9 3 years ago
Artur Galyamov 0bcf3bdc65 Изменили порядок импортов для уменьшения числа конфликтов слияния #9 3 years ago
Артур Галямов 95264f5bae Merge pull request 'leaflet_lib #12' (#99) from leaflet_lib into dev_mirocod 3 years ago
Алексей Безбородов d867c68ad2 Убрана проверка на integrity для leaflet.css #12 3 years ago
Алексей Безбородов c4ac4f578b Главные файлы библиотеки leaflet #12 3 years ago
Алексей Безбородов 02a287c10b Поиск пользователей по полю 'О себе' #101 3 years ago
Artur Galyamov efdedf8314 Улучшено удобство использования при просмотре сообществ #9 3 years ago
Artur Galyamov b0cfcd4b6d Улучшено удобство использования при просмотре профиля пользователя #9 3 years ago
Artur Galyamov f894ff9305 Администратор может редактировать доверительные свойства и интересы личности #9 3 years ago
Artur Galyamov 265e8e6337 Добавлена возможность редактирования компетенций и ресурсов сообщества #9 3 years ago
Artur Galyamov 911317c4be Выводятся компетенции и ресурсы для сообщества #9 3 years ago
Artur Galyamov 42d952e180 Пользователь может редактировать информацию о компетенциях, ресурсах и интересах #9 3 years ago
Artur Galyamov c79bea9808 Выводятся поля компетенции, ресурсы и интересы в профиле пользователя #9 3 years ago
Artur Galyamov dad801abf0 Добавлены поля компетенций, ресурсов и интересов к пользователю #9 3 years ago
Алексей Безбородов 180bf87b9a Расширил карту на весь экран #12 3 years ago
Алексей Безбородов 7cfacefd42 Библиотека leaflet для работы с картами #12 #17 3 years ago
Артур Галямов 309bd22339 Merge pull request 'Изменилась стартовая вкладка с Кода на Вики #35' (#94) from wiki_start_page into dev_mirocod 3 years ago
Артур Галямов 5d79ca95d0 Merge pull request 'На карте пользователей отображаются только первые 20 человек #77' (#93) from user_map into dev_mirocod 3 years ago
Алексей Безбородов f9757ff909 изменена стартовая страница с "Кода" на "Вики" #35 3 years ago
Алексей Безбородов a1f7db70d1 Все пользователи видны на карте #77 3 years ago
Artur Galyamov c03d07ed1e Регулярное обновление js-пакета caniuse #86 3 years ago
Артур Галямов e8ee401c71 Merge pull request 'deploy' (#87) from deploy into dev_mirocod 3 years ago
Артур Галямов 98de629778 Merge pull request 'Более 10 пользователй на карте' (#78) from user_map into dev_mirocod 3 years ago
Artur Galyamov d87f41d080 Исправлено предупреждение caniuse-lite, в т.ч. мешало выкатыванию #86 3 years ago
Алексей Безбородов 950ac05db0 Исправлена ошибка. 3 years ago
Artur Galyamov 05d6ec6071 изменение в описании LFS 3 years ago
Алексей Безбородов 909ce74308 Merge pull request 'admin_desc_edit' (#71) from admin_desc_edit into dev_mirocod 3 years ago
Artur Galyamov 2b36ec2796 Увеличен размер О себе #4 3 years ago
Artur Galyamov 052d2440bd Исправлена ошибка, добавлялись лишние пробелы вначале описания #3 3 years ago
Artur Galyamov 373dfa54f8 Администратор может редактировать поле "О себе" для пользователя #3 3 years ago
Алексей Безбородов 26e7f410bb Merge pull request 'Изменил(а) на 'options/locale/locale_ru-RU.ini'' (#56) from gitea_rename into dev_mirocod 3 years ago
Николай Беляев 6fa16ff434 Изменил(а) на 'options/locale/locale_ru-RU.ini' 3 years ago
Алексей Безбородов d03c6c3e96 Merge pull request 'Переименовать организации в сообщества #10' (#48) from org_rename into dev_mirocod 3 years ago
Николай Беляев 4a5bca6a37 Изменил(а) на 'options/locale/locale_ru-RU.ini' 3 years ago
Николай Беляев 64322b35d7 Изменил(а) на 'options/locale/locale_ru-RU.ini' 3 years ago
Николай Беляев cdee07c87e Изменил(а) на 'options/locale/locale_ru-RU.ini' 3 years ago
Николай Беляев 8feba05aa0 Переименовать организации в сообщества #10 3 years ago
Алексей Безбородов 9cd6ddccc5 Revert "Изменилась стартовая вкладка с Кода на Вики #35" 3 years ago
Алексей Безбородов edc506a62d Merge pull request 'Gitea -> Мирокод' (#47) from nicolay-patch-1 into dev_mirocod 3 years ago
Николай Беляев 83fce4f774 Gitea -> Мирокод 3 years ago
Gitea c2b8b76f87 Hide navbar on map #1 3 years ago
Алексей Безбородов e02def6eeb Merge pull request 'Переименование из репозитория в проекты' (#38) from repo_rename into dev_mirocod 3 years ago
Алексей Безбородов 137432613d Изменилась стартовая вкладка с Кода на Вики #35 3 years ago
Алексей Безбородов 898cea5d3a Новые логотипы 1 и 2 #39 3 years ago
Алексей Безбородов 34c4519631 Изменение высоты логотипа проекта #39 3 years ago
Алексей Безбородов ce0123d587 Исправление описания проекта 3 years ago
Алексей Безбородов 5b9fef6e1f Изменение логотипа на логотип "Мирокод" 3 years ago
Gitea 7e2ead1c5e Merge branch 'dev_mirocod' of git.mirocod.ru:MIROCOD/Platform_Mirocod into dev_mirocod 3 years ago
Gitea 6def6d1b49 Исправлена работа с закрытыми задачами 3 years ago
  1. 130
      README.md
  2. 6
      models/migrations/migrations.go
  3. 28
      models/migrations/v211.go
  4. 28
      models/migrations/v212.go
  5. 28
      models/migrations/v213.go
  6. 3
      models/repo/repo.go
  7. 32
      models/user/search.go
  8. 26
      models/user/user.go
  9. 211
      options/locale/locale_ru-RU.ini
  10. 45
      package-lock.json
  11. BIN
      public/img/logo.png
  12. 108
      public/img/logo.svg
  13. 102
      public/img/logo1.svg
  14. 51
      public/img/logo2.svg
  15. 7
      public/lib/leaflet.markercluster/.gitignore
  16. 20
      public/lib/leaflet.markercluster/.travis.yml
  17. 242
      public/lib/leaflet.markercluster/CHANGELOG.md
  18. 70
      public/lib/leaflet.markercluster/CONTRIBUTING.md
  19. 23
      public/lib/leaflet.markercluster/ISSUE_TEMPLATE.md
  20. 86
      public/lib/leaflet.markercluster/Jakefile.js
  21. 20
      public/lib/leaflet.markercluster/MIT-LICENCE.txt
  22. 292
      public/lib/leaflet.markercluster/README.md
  23. 27
      public/lib/leaflet.markercluster/bower.json
  24. 37
      public/lib/leaflet.markercluster/build/hintrc.js
  25. 41
      public/lib/leaflet.markercluster/build/rollup-config.js
  26. 60
      public/lib/leaflet.markercluster/dist/MarkerCluster.Default.css
  27. 14
      public/lib/leaflet.markercluster/dist/MarkerCluster.css
  28. 5
      public/lib/leaflet.markercluster/dist/WhereAreTheJavascriptFiles.txt
  29. 2690
      public/lib/leaflet.markercluster/dist/leaflet.markercluster-src.js
  30. 1
      public/lib/leaflet.markercluster/dist/leaflet.markercluster-src.js.map
  31. 3
      public/lib/leaflet.markercluster/dist/leaflet.markercluster.js
  32. 1
      public/lib/leaflet.markercluster/dist/leaflet.markercluster.js.map
  33. 53
      public/lib/leaflet.markercluster/example/geojson-sample.js
  34. 54
      public/lib/leaflet.markercluster/example/geojson.html
  35. BIN
      public/lib/leaflet.markercluster/example/map.png
  36. 81
      public/lib/leaflet.markercluster/example/marker-clustering-convexhull.html
  37. 114
      public/lib/leaflet.markercluster/example/marker-clustering-custom.html
  38. 83
      public/lib/leaflet.markercluster/example/marker-clustering-dragging.html
  39. 80
      public/lib/leaflet.markercluster/example/marker-clustering-everything.html
  40. 70
      public/lib/leaflet.markercluster/example/marker-clustering-geojson.html
  41. 104
      public/lib/leaflet.markercluster/example/marker-clustering-pane.html
  42. 45
      public/lib/leaflet.markercluster/example/marker-clustering-realworld-maxzoom.388.html
  43. 44
      public/lib/leaflet.markercluster/example/marker-clustering-realworld-mobile.388.html
  44. 46
      public/lib/leaflet.markercluster/example/marker-clustering-realworld.10000.html
  45. 45
      public/lib/leaflet.markercluster/example/marker-clustering-realworld.388.html
  46. 78
      public/lib/leaflet.markercluster/example/marker-clustering-realworld.50000.html
  47. 60
      public/lib/leaflet.markercluster/example/marker-clustering-singlemarkermode.html
  48. 60
      public/lib/leaflet.markercluster/example/marker-clustering-spiderfier.html
  49. 60
      public/lib/leaflet.markercluster/example/marker-clustering-zoomtobounds.html
  50. 59
      public/lib/leaflet.markercluster/example/marker-clustering-zoomtoshowlayer.html
  51. 88
      public/lib/leaflet.markercluster/example/marker-clustering.html
  52. 6
      public/lib/leaflet.markercluster/example/mobile.css
  53. 83
      public/lib/leaflet.markercluster/example/old-bugs/add-1000-after.html
  54. 52
      public/lib/leaflet.markercluster/example/old-bugs/add-markers-offscreen.html
  55. 62
      public/lib/leaflet.markercluster/example/old-bugs/add-remove-before-addtomap.html
  56. 47
      public/lib/leaflet.markercluster/example/old-bugs/animationless-zoom.html
  57. 59
      public/lib/leaflet.markercluster/example/old-bugs/click-cluster-at-screen-edge.html
  58. 106
      public/lib/leaflet.markercluster/example/old-bugs/disappearing-marker-from-spider.html
  59. 69
      public/lib/leaflet.markercluster/example/old-bugs/doesnt-update-cluster-on-bottom-level.html
  60. 75
      public/lib/leaflet.markercluster/example/old-bugs/drag-with-spiderfying.html
  61. 74
      public/lib/leaflet.markercluster/example/old-bugs/remove-add-clustering.html
  62. 65
      public/lib/leaflet.markercluster/example/old-bugs/remove-when-spiderfied.html
  63. 69
      public/lib/leaflet.markercluster/example/old-bugs/removelayer-after-remove-from-map.html
  64. 69
      public/lib/leaflet.markercluster/example/old-bugs/setView-doesnt-remove.html
  65. 63
      public/lib/leaflet.markercluster/example/old-bugs/zoomtoshowlayer-doesnt-need-to-zoom.html
  66. 56
      public/lib/leaflet.markercluster/example/old-bugs/zoomtoshowlayer-doesnt-zoom-if-centered-on.html
  67. 10004
      public/lib/leaflet.markercluster/example/realworld.10000.js
  68. 393
      public/lib/leaflet.markercluster/example/realworld.388.js
  69. 25006
      public/lib/leaflet.markercluster/example/realworld.50000.1.js
  70. 25000
      public/lib/leaflet.markercluster/example/realworld.50000.2.js
  71. 83
      public/lib/leaflet.markercluster/example/remove-geoJSON-when-spiderfied.html
  72. 28
      public/lib/leaflet.markercluster/example/screen.css
  73. 43
      public/lib/leaflet.markercluster/package.json
  74. 2
      public/lib/leaflet.markercluster/spec/after.js
  75. 1253
      public/lib/leaflet.markercluster/spec/expect.js
  76. 76
      public/lib/leaflet.markercluster/spec/index.html
  77. 96
      public/lib/leaflet.markercluster/spec/karma.conf.js
  78. 4223
      public/lib/leaflet.markercluster/spec/sinon.js
  79. 125
      public/lib/leaflet.markercluster/spec/suites/AddLayer.MultipleSpec.js
  80. 118
      public/lib/leaflet.markercluster/spec/suites/AddLayer.SingleSpec.js
  81. 123
      public/lib/leaflet.markercluster/spec/suites/AddLayersSpec.js
  82. 56
      public/lib/leaflet.markercluster/spec/suites/ChildChangingIconSupportSpec.js
  83. 147
      public/lib/leaflet.markercluster/spec/suites/CircleMarkerSupportSpec.js
  84. 144
      public/lib/leaflet.markercluster/spec/suites/CircleSupportSpec.js
  85. 41
      public/lib/leaflet.markercluster/spec/suites/DistanceGridSpec.js
  86. 6
      public/lib/leaflet.markercluster/spec/suites/LeafletSpec.js
  87. 240
      public/lib/leaflet.markercluster/spec/suites/NonPointSpec.js
  88. 63
      public/lib/leaflet.markercluster/spec/suites/PaneSpec.js
  89. 52
      public/lib/leaflet.markercluster/spec/suites/QuickHullSpec.js
  90. 435
      public/lib/leaflet.markercluster/spec/suites/RefreshSpec.js
  91. 162
      public/lib/leaflet.markercluster/spec/suites/RememberOpacity.js
  92. 204
      public/lib/leaflet.markercluster/spec/suites/RemoveLayerSpec.js
  93. 30
      public/lib/leaflet.markercluster/spec/suites/SpecHelper.js
  94. 117
      public/lib/leaflet.markercluster/spec/suites/animateOptionSpec.js
  95. 54
      public/lib/leaflet.markercluster/spec/suites/clearLayersSpec.js
  96. 63
      public/lib/leaflet.markercluster/spec/suites/disableClusteringAtZoomSpec.js
  97. 65
      public/lib/leaflet.markercluster/spec/suites/eachLayerSpec.js
  98. 373
      public/lib/leaflet.markercluster/spec/suites/eventsSpec.js
  99. 128
      public/lib/leaflet.markercluster/spec/suites/getBoundsSpec.js
  100. 75
      public/lib/leaflet.markercluster/spec/suites/getLayersSpec.js
  101. Some files were not shown because too many files have changed in this diff Show More

130
README.md

@ -1,11 +1,13 @@
<p align="center">
<a href="https://gitea.io/">
<img alt="Gitea" src="https://raw.githubusercontent.com/go-gitea/gitea/main/public/img/gitea.svg" width="220"/>
<a href="http://git.mirocod.ru/MIROCOD/Platform_Mirocod/">
<img alt="Мирокод" src="http://git.mirocod.ru/MIROCOD/Platform_Mirocod/raw/branch/dev_mirocod/public/img/logo.svg" width="417"/>
</a>
</p>
<h1 align="center">Gitea - Git with a cup of tea</h1>
<h1 align="center">Платформа ЦРНП "Мирокод" для разработки проектов</h1>
<!--
<p align="center">
<a href="https://drone.gitea.io/go-gitea/gitea" title="Build Status">
<img src="https://drone.gitea.io/api/badges/go-gitea/gitea/status.svg?ref=refs/heads/main">
</a>
@ -47,114 +49,28 @@
<p align="center">
<a href="README_ZH.md">View the chinese version of this document</a>
</p>
## Purpose
The goal of this project is to make the easiest, fastest, and most
painless way of setting up a self-hosted Git service.
Using Go, this can be done with an independent binary distribution across
**all platforms** which Go supports, including Linux, macOS, and Windows
on x86, amd64, ARM and PowerPC architectures.
Want to try it before doing anything else?
Do it [with the online demo](https://try.gitea.io/)!
This project has been
-->
## Общее описание
Платформа "Мирокод" - необходимый инструмент для разработки народных проектов.
Разрабатывается на основе gitea, в перспективе планируется реализовать:
1. Карта пользователей (их ресурсы, компетенции и интересы), проектов, сообществ.
2. Дерево задач в каждом проекте
3. Дерево проектов
4. Проекты могут быть не только для разработки, но и любые общественные проекты
5. У пользователя можно будет указать ресурсы, компетенции, интересы
6. Объединяются в одном месте, люди, проекты, ресурсы и компетенции, а также инструменты ведения проектов и решения задач.
7. В перспективе самый простой модуль игроподобия, для того чтобы легко подбирать новые задачи из любых проектов
8. Метрика по проектам
Проект создан на основе:
[forked](https://blog.gitea.io/2016/12/welcome-to-gitea/) from
[Gogs](https://gogs.io) since 2016.11 but changed a lot.
## Building
From the root of the source tree, run:
TAGS="bindata" make build
or if SQLite support is required:
TAGS="bindata sqlite sqlite_unlock_notify" make build
The `build` target is split into two sub-targets:
- `make backend` which requires [Go 1.17](https://go.dev/dl/) or greater.
- `make frontend` which requires [Node.js LTS](https://nodejs.org/en/download/) or greater and Internet connectivity to download npm dependencies.
When building from the official source tarballs which include pre-built frontend files, the `frontend` target will not be triggered, making it possible to build without Node.js and Internet connectivity.
Parallelism (`make -j <num>`) is not supported.
More info: https://docs.gitea.io/en-us/install-from-source/
## Using
./gitea web
NOTE: If you're interested in using our APIs, we have experimental
support with [documentation](https://try.gitea.io/api/swagger).
## Contributing
Expected workflow is: Fork -> Patch -> Push -> Pull Request
NOTES:
1. **YOU MUST READ THE [CONTRIBUTORS GUIDE](CONTRIBUTING.md) BEFORE STARTING TO WORK ON A PULL REQUEST.**
2. If you have found a vulnerability in the project, please write privately to **security@gitea.io**. Thanks!
## Translating
Translations are done through Crowdin. If you want to translate to a new language ask one of the managers in the Crowdin project to add a new language there.
You can also just create an issue for adding a language or ask on discord on the #translation channel. If you need context or find some translation issues, you can leave a comment on the string or ask on Discord. For general translation questions there is a section in the docs. Currently a bit empty but we hope fo fill it as questions pop up.
https://docs.gitea.io/en-us/translation-guidelines/
[![Crowdin](https://badges.crowdin.net/gitea/localized.svg)](https://crowdin.com/project/gitea)
## Further information
For more information and instructions about how to install Gitea, please look at our [documentation](https://docs.gitea.io/en-us/).
If you have questions that are not covered by the documentation, you can get in contact with us on our [Discord server](https://discord.gg/Gitea) or create a post in the [discourse forum](https://discourse.gitea.io/).
We maintain a list of Gitea-related projects at [gitea/awesome-gitea](https://gitea.com/gitea/awesome-gitea).
The hugo-based documentation theme is hosted at [gitea/theme](https://gitea.com/gitea/theme).
The official Gitea CLI is developed at [gitea/tea](https://gitea.com/gitea/tea).
## Authors
* [Maintainers](https://github.com/orgs/go-gitea/people)
* [Contributors](https://github.com/go-gitea/gitea/graphs/contributors)
* [Translators](options/locale/TRANSLATORS)
## Backers
Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/gitea#backer)]
<a href="https://opencollective.com/gitea#backers" target="_blank"><img src="https://opencollective.com/gitea/backers.svg?width=890"></a>
## Sponsors
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/gitea#sponsor)]
<a href="https://opencollective.com/gitea/sponsor/0/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/0/avatar.svg"></a>
<a href="https://opencollective.com/gitea/sponsor/1/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/1/avatar.svg"></a>
<a href="https://opencollective.com/gitea/sponsor/2/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/2/avatar.svg"></a>
<a href="https://opencollective.com/gitea/sponsor/3/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/3/avatar.svg"></a>
<a href="https://opencollective.com/gitea/sponsor/4/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/4/avatar.svg"></a>
<a href="https://opencollective.com/gitea/sponsor/5/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/5/avatar.svg"></a>
<a href="https://opencollective.com/gitea/sponsor/6/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/6/avatar.svg"></a>
<a href="https://opencollective.com/gitea/sponsor/7/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/7/avatar.svg"></a>
<a href="https://opencollective.com/gitea/sponsor/8/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/8/avatar.svg"></a>
<a href="https://opencollective.com/gitea/sponsor/9/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/9/avatar.svg"></a>
## FAQ
**How do you pronounce Gitea?**
Gitea is pronounced [/ɡɪ’ti:/](https://youtu.be/EM71-2uDAoY) as in "gi-tea" with a hard g.
**Why is this not hosted on a Gitea instance?**
We're [working on it](https://github.com/go-gitea/gitea/issues/1029).
Подробное описание сборки и пр. - http://git.mirocod.ru/MIROCOD/Platform_Mirocod/wiki
## License
## Лицензия
This project is licensed under the MIT License.
See the [LICENSE](https://github.com/go-gitea/gitea/blob/main/LICENSE) file

6
models/migrations/migrations.go

@ -373,6 +373,12 @@ var migrations = []Migration{
NewMigration("Increase WebAuthentication CredentialID size to 410 - NO-OPED", increaseCredentialIDTo410),
// v210 -> v211
NewMigration("v208 was completely broken - remigrate", remigrateU2FCredentials),
// v211 -> v212
NewMigration("add competences, resources, interests to user tbl", addTrustedPropsToUser),
// v212 -> v213
NewMigration("add competences and resources to repo tbl", addTrustedPropsToRepo),
// v213 -> v214
NewMigration("add location_coordinate to repo tbl", addLocationCoordinateToRepo),
}
// GetCurrentDBVersion returns the current db version

28
models/migrations/v211.go

@ -0,0 +1,28 @@
package migrations
import (
"fmt"
"xorm.io/xorm"
"xorm.io/xorm/schemas"
)
func addTrustedPropsToUser(engine *xorm.Engine) error {
var err error
tableName := "user"
switch engine.Dialect().URI().DBType {
case schemas.POSTGRES:
addColsQuery := fmt.Sprintf("ALTER TABLE \"%s\" ADD COLUMN competences TEXT, ADD COLUMN resources TEXT, ADD COLUMN interests TEXT;", tableName)
_, err = engine.Exec(addColsQuery)
case schemas.SQLITE:
addColsQuery := fmt.Sprintf("ALTER TABLE \"%s\" ADD COLUMN competences TEXT;\nALTER TABLE \"%s\" ADD COLUMN resources TEXT;\nALTER TABLE \"%s\" ADD COLUMN interests TEXT;", tableName, tableName, tableName)
_, err = engine.Exec(addColsQuery)
case schemas.MYSQL:
addColsQuery := fmt.Sprintf("ALTER TABLE `%s` ADD COLUMN competences TEXT, ADD COLUMN resources TEXT, ADD COLUMN interests TEXT;", tableName)
_, err = engine.Exec(addColsQuery)
}
if err != nil {
return fmt.Errorf("Ошибка добавление колонок компетенций и тд: %v", err)
} else {
return nil
}
}

28
models/migrations/v212.go

@ -0,0 +1,28 @@
package migrations
import (
"fmt"
"xorm.io/xorm"
"xorm.io/xorm/schemas"
)
func addTrustedPropsToRepo(engine *xorm.Engine) error {
var err error
tableName := "repository"
switch engine.Dialect().URI().DBType {
case schemas.POSTGRES:
addColsQuery := fmt.Sprintf("ALTER TABLE \"%s\" ADD COLUMN competences TEXT, ADD COLUMN resources TEXT;", tableName)
_, err = engine.Exec(addColsQuery)
case schemas.SQLITE:
addColsQuery := fmt.Sprintf("ALTER TABLE \"%s\" ADD COLUMN competences TEXT;\nALTER TABLE \"%s\" ADD COLUMN resources TEXT;", tableName, tableName)
_, err = engine.Exec(addColsQuery)
case schemas.MYSQL:
addColsQuery := fmt.Sprintf("ALTER TABLE `%s` ADD COLUMN competences TEXT, ADD COLUMN resources TEXT;", tableName)
_, err = engine.Exec(addColsQuery)
}
if err != nil {
return fmt.Errorf("Ошибка добавления колонок компетенции и ресурсы в проект: %v", err)
} else {
return nil
}
}

28
models/migrations/v213.go

@ -0,0 +1,28 @@
package migrations
import (
"fmt"
"xorm.io/xorm"
"xorm.io/xorm/schemas"
)
func addLocationCoordinateToRepo(engine *xorm.Engine) error {
var err error
tableName := "repository"
switch engine.Dialect().URI().DBType {
case schemas.POSTGRES:
addColsQuery := fmt.Sprintf("ALTER TABLE \"%s\" ADD COLUMN location_coordinates VARCHAR(1024);", tableName)
_, err = engine.Exec(addColsQuery)
case schemas.SQLITE:
addColsQuery := fmt.Sprintf("ALTER TABLE \"%s\" ADD COLUMN location_coordinates TEXT;", tableName)
_, err = engine.Exec(addColsQuery)
case schemas.MYSQL:
addColsQuery := fmt.Sprintf("ALTER TABLE `%s` ADD COLUMN location_coordinates VARCHAR(1024);", tableName)
_, err = engine.Exec(addColsQuery)
}
if err != nil {
return fmt.Errorf("Ошибка добавления колонок компетенции и ресурсы в проект: %v", err)
} else {
return nil
}
}

3
models/repo/repo.go

@ -100,7 +100,10 @@ type Repository struct {
LowerName string `xorm:"UNIQUE(s) INDEX NOT NULL"`
Name string `xorm:"INDEX NOT NULL"`
Description string `xorm:"TEXT"`
Resources string `xorm:"TEXT"`
Competences string `xorm:"TEXT"`
Website string `xorm:"VARCHAR(2048)"`
LocationCoordinates string `xorm:"VARCHAR(1024)"`
OriginalServiceType api.GitServiceType `xorm:"index"`
OriginalURL string `xorm:"VARCHAR(2048)"`
DefaultBranch string

32
models/user/search.go

@ -17,6 +17,15 @@ import (
"xorm.io/xorm"
)
type SearchKind int64
const (
ByDescription SearchKind = iota
ByCompetence
ByResource
ByInterest
)
// SearchUserOptions contains the options for searching
type SearchUserOptions struct {
db.ListOptions
@ -28,6 +37,7 @@ type SearchUserOptions struct {
Visible []structs.VisibleType
Actor *User // The user doing the search
SearchByEmail bool // Search by email as well as username/full name
Kind SearchKind
IsActive util.OptionalBool
IsAdmin util.OptionalBool
@ -39,13 +49,33 @@ type SearchUserOptions struct {
}
func (opts *SearchUserOptions) toSearchQueryBase() *xorm.Session {
var cond builder.Cond = builder.Eq{"type": opts.Type}
var cond builder.Cond
if opts.Type == UserTypeIdentity {
cond = builder.Or(
builder.Eq{"type": UserTypeIndividual},
builder.Eq{"type": UserTypeOrganization},
)
} else {
cond = builder.Eq{"type": opts.Type}
}
if len(opts.Keyword) > 0 {
lowerKeyword := strings.ToLower(opts.Keyword)
keywordCond := builder.Or(
builder.Like{"lower_name", lowerKeyword},
builder.Like{"LOWER(full_name)", lowerKeyword},
)
switch opts.Kind {
case ByDescription:
keywordCond = builder.Or(builder.Like{"LOWER(description)", lowerKeyword})
case ByCompetence:
keywordCond = builder.Or(builder.Like{"LOWER(competences)", lowerKeyword})
case ByResource:
keywordCond = builder.Or(builder.Like{"LOWER(resources)", lowerKeyword})
case ByInterest:
keywordCond = builder.Or(builder.Like{"LOWER(interests)", lowerKeyword})
default:
keywordCond = builder.Or(builder.Like{"LOWER(description)", lowerKeyword})
}
if opts.SearchByEmail {
keywordCond = keywordCond.Or(builder.Like{"LOWER(email)", lowerKeyword})
}

26
models/user/user.go

@ -46,6 +46,9 @@ const (
// UserTypeOrganization defines an organization
UserTypeOrganization
// UserTypeIdentity defines individual + organization
UserTypeIdentity
)
const (
@ -89,17 +92,20 @@ type User struct {
// is to change his/her password after registration.
MustChangePassword bool `xorm:"NOT NULL DEFAULT false"`
LoginType auth.Type
LoginSource int64 `xorm:"NOT NULL DEFAULT 0"`
LoginName string
Type UserType
Location string
LoginType auth.Type
LoginSource int64 `xorm:"NOT NULL DEFAULT 0"`
LoginName string
Type UserType
Location string
LocationCoordinate string
Website string
Rands string `xorm:"VARCHAR(32)"`
Salt string `xorm:"VARCHAR(32)"`
Language string `xorm:"VARCHAR(5)"`
Description string
Website string
Rands string `xorm:"VARCHAR(32)"`
Salt string `xorm:"VARCHAR(32)"`
Language string `xorm:"VARCHAR(5)"`
Description string `xorm:"TEXT"`
Competences string `xorm:"TEXT"`
Resources string `xorm:"TEXT"`
Interests string `xorm:"TEXT"`
CreatedUnix timeutil.TimeStamp `xorm:"INDEX created"`
UpdatedUnix timeutil.TimeStamp `xorm:"INDEX updated"`

211
options/locale/locale_ru-RU.ini

@ -22,7 +22,7 @@ signed_in_as=Вы вошли как
enable_javascript=Пожалуйста, включите JavaScript.
toc=Содержание
licenses=Лицензии
return_to_gitea=Вернуться к Gitea
return_to_gitea=Вернуться к Мирокод
username=Имя пользователя
email=Адрес эл. почты
@ -47,16 +47,16 @@ webauthn_error_duplicated=Представленный ключ не подхо
webauthn_error_empty=Вы должны указать имя для этого ключа.
repository=Проект
organization=Организация
organization=Сообщество
mirror=Зеркало
new_repo=Новый проект
new_migrate=Новая миграция
new_mirror=Новое зеркало
new_fork=Новый форк проекта
new_org=Новая организация
new_org=Новое сообщество
new_project=Новое направление
new_project_board=Новая доска проекта
manage_org=Управление организациями
manage_org=Управление сообществами
admin_panel=Панель управления
account_settings=Настройки аккаунта
settings=Настройки
@ -111,17 +111,17 @@ app_desc=Удобный сервис собственного хостинга
install=Простой в установке
install_desc=Просто <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/install-from-binary/">запустите исполняемый файл</a> для вашей платформы, разверните через <a target="_blank" rel="noopener noreferrer" href="https://github.com/go-gitea/gitea/tree/master/docker">Docker</a>, или установите <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/install-from-package/">с помощью менеджера пакетов</a>.
platform=Кроссплатформенный
platform_desc=Gitea работает на любой операционной системе, которая может компилировать <a target="_blank" rel="noopener noreferrer" href="http://golang.org/">Go</a>: Windows, macOS, Linux, ARM и т. д. Выбирайте, что вам больше нравится!
platform_desc=Мирокод работает на любой операционной системе, которая может компилировать <a target="_blank" rel="noopener noreferrer" href="http://golang.org/">Go</a>: Windows, macOS, Linux, ARM и т. д. Выбирайте, что вам больше нравится!
lightweight=Легковесный
lightweight_desc=Gitea имеет низкие системные требования и может работать на недорогом Raspberry Pi. Экономьте энергию вашей машины!
lightweight_desc=Мирокод имеет низкие системные требования и может работать на недорогом Raspberry Pi. Экономьте энергию вашей машины!
license=Открытый исходный код
license_desc=Всё это на <a target="_blank" rel="noopener noreferrer" href="https://code.gitea.io/gitea">code.gitea.io/gitea</a>! Присоединяйтесь к нам, внося <a target="_blank" rel="noopener noreferrer" href="https://github.com/go-gitea/gitea">вклад</a>, чтобы сделать это направление ещё лучше. Не бойтесь помогать!
[install]
install=Установка
title=Начальная конфигурация
docker_helper=Если вы запускаете Gitea внутри Docker, пожалуйста внимательно прочтите <a target="_blank" rel="noopener noreferrer" href="%s">документацию</a> перед тем, как изменить любые настройки.
require_db_desc=Gitea требует MySQL, PostgreSQL, MSSQL, SQLite3 или TiDB (через протокол MySQL).
docker_helper=Если вы запускаете Мирокод внутри Docker, пожалуйста внимательно прочтите <a target="_blank" rel="noopener noreferrer" href="%s">документацию</a> перед тем, как изменить любые настройки.
require_db_desc=Мирокод требует MySQL, PostgreSQL, MSSQL, SQLite3 или TiDB (через протокол MySQL).
db_title=Настройки базы данных
db_type=Тип базы данных
host=Хост
@ -134,12 +134,12 @@ db_schema_helper=Оставьте пустым для значения по ум
ssl_mode=SSL
charset=Кодировка
path=Путь
sqlite_helper=Путь к файлу базы данных SQLite3.<br>Введите абсолютный путь, если вы запускаете Gitea как службу.
reinstall_error=Вы пытаетесь произвести установку в уже существующую базу данных Gitea
reinstall_confirm_message=Переустановка в уже существующую базу данных Gitea может вызвать несколько проблем. В большинстве случаев вы должны использовать существующий "app.ini" для запуска Gitea. Если вы понимаете, что вы делаете, подтвердите:
sqlite_helper=Путь к файлу базы данных SQLite3.<br>Введите абсолютный путь, если вы запускаете Мирокод как службу.
reinstall_error=Вы пытаетесь произвести установку в уже существующую базу данных Мирокод
reinstall_confirm_message=Переустановка в уже существующую базу данных Мирокод может вызвать несколько проблем. В большинстве случаев вы должны использовать существующий "app.ini" для запуска Мирокод. Если вы понимаете, что вы делаете, подтвердите:
reinstall_confirm_check_1=Данные, зашифрованные SECRET_KEY в приложении, могут быть потеряны: пользователи не смогут войти в систему с помощью 2FA/OTP & зеркала могут работать неправильно. Отметьте этот флажок, чтобы убедиться, что текущий файл app.ini содержит корректный SECRET_KEY.
reinstall_confirm_check_2=Репозитории и настройки могут понадобиться пересинхронизировать. Отметьте этот флажок, чтобы вручную синхронизировать хуки для репозиториев и authorized_keys. Вы подтверждаете, что настройки репозитория и зеркала верны.
reinstall_confirm_check_3=Вы подтверждаете, что полностью уверены, что этот Gitea запущен при коренном расположении app.ini и вы уверены, что вам нужна переустановка. Вы подтверждаете, что соглашаетесь с указанными выше рисками.
reinstall_confirm_check_3=Вы подтверждаете, что полностью уверены, что этот Мирокод запущен при коренном расположении app.ini и вы уверены, что вам нужна переустановка. Вы подтверждаете, что соглашаетесь с указанными выше рисками.
err_empty_db_path=Путь к базе данных SQLite3 не может быть пустым.
no_admin_and_disable_registration=Вы не можете отключить регистрацию до создания учётной записи администратора.
err_empty_admin_password=Пароль администратора не может быть пустым.
@ -156,14 +156,14 @@ repo_path_helper=Все удалённые Git репозитории будут
lfs_path=Корневой путь Git LFS
lfs_path_helper=В этой директории будут храниться файлы Git LFS. Оставьте пустым, чтобы отключить LFS.
run_user=Запуск от имени пользователя
run_user_helper=Введите имя пользователя операционной системы, под которым работает Gitea. Обратите внимание, что этот пользователь должен иметь доступ к корневому пути репозиториев.
run_user_helper=Введите имя пользователя операционной системы, под которым работает Мирокод. Обратите внимание, что этот пользователь должен иметь доступ к корневому пути репозиториев.
domain=Домен сервера
domain_helper=Домен или адрес хоста для сервера.
ssh_port=Порт SSH сервера
ssh_port_helper=Номер порта, который использует SSH сервер. Оставьте пустым, чтобы отключить SSH.
http_port=Gitea HTTP порт
http_port_helper=Номер порта, который будет прослушиваться Gitea веб-сервером.
app_url=Базовый URL-адрес Gitea
http_port=Мирокод HTTP порт
http_port_helper=Номер порта, который будет прослушиваться Мирокод веб-сервером.
app_url=Базовый URL-адрес Мирокод
app_url_helper=Этот параметр влияет на URL для клонирования по HTTP/HTTPS и на некоторые уведомления по электронной почте.
log_root_path=Путь к журналу
log_root_path_helper=Файлы журнала будут записываться в этот каталог.
@ -172,7 +172,7 @@ optional_title=Расширенные настройки
email_title=Настройки электронной почты
smtp_host=Узел SMTP
smtp_from=Отправить эл. почту как
smtp_from_helper=Адрес электронной почты, который будет использоваться Gitea. Введите обычный адрес электронной почты или используйте формат "Имя" <email@example.com>.
smtp_from_helper=Адрес электронной почты, который будет использоваться Мирокод. Введите обычный адрес электронной почты или используйте формат "Имя" <email@example.com>.
mailer_user=SMTP логин
mailer_password=SMTP пароль
register_confirm=Требовать подтверждение по электронной почте для регистрации
@ -201,9 +201,9 @@ admin_name=Логин администратора
admin_password=Пароль
confirm_password=Подтвердить пароль
admin_email=Адрес эл. почты
install_btn_confirm=Установить Gitea
install_btn_confirm=Установить Мирокод
test_git_failed=Не удалось проверить 'git' команду: %v
sqlite3_not_available=Эта версия Gitea не поддерживает SQLite3. Пожалуйста, загрузите официальную бинарную версию из %s (не 'go build' версия).
sqlite3_not_available=Эта версия Мирокод не поддерживает SQLite3. Пожалуйста, загрузите официальную бинарную версию из %s (не 'go build' версия).
invalid_db_setting=Некорректные настройки базы данных: %v
invalid_db_table=Таблица базы данных '%s' недействительна: %v
invalid_repo_path=Недопустимый путь к корню репозитория: %v
@ -213,12 +213,12 @@ internal_token_failed=Не удалось создать внутренний т
secret_key_failed=Не удалось создать секретный ключ: %v
save_config_failed=Не удалось сохранить конфигурацию: %v
invalid_admin_setting=Некорректные настройки учётной записи администратора: %v
install_success=Добро пожаловать! Благодарим вас за выбор Gitea, пользуйтесь с удовольствием!
install_success=Добро пожаловать! Благодарим вас за выбор Мирокод, пользуйтесь с удовольствием!
invalid_log_root_path=Недопустимый путь для логов: %v
default_keep_email_private=Скрывать адреса электронной почты по умолчанию
default_keep_email_private_popup=Скрывать адреса электронной почты новых учетных записей по умолчанию.
default_allow_create_organization=Разрешить создание организаций по умолчанию
default_allow_create_organization_popup=Разрешить новым учетным записям пользователей создавать организации по умолчанию.
default_allow_create_organization=Разрешить создание сообществ по умолчанию
default_allow_create_organization_popup=Разрешить новым учетным записям пользователей создавать сообщества по умолчанию.
default_enable_timetracking=Включить отслеживание времени по умолчанию
default_enable_timetracking_popup=Включить отслеживание времени для новых репозиториев по умолчанию.
no_reply_address=Скрытый почтовый домен
@ -233,7 +233,7 @@ switch_dashboard_context=Переключить контекст панели у
my_repos=Проекты
show_more_repos=Показать больше репозиториев…
collaborative_repos=Совместные проекты
my_orgs=Мои организации
my_orgs=Мои сообщества
my_mirrors=Мои зеркала
view_home=Показать %s
search_repos=Поиск проекта…
@ -256,14 +256,17 @@ issues.in_your_repos=В ваших проектах
[explore]
repos=Проекты
users=Пользователи
organizations=Организации
organizations=Сообщества
search=Поиск
code=Файлы
competences=Компетенции
resources=Ресурсы
interests=Интересы
search.fuzzy=Неточный
search.match=Соответствие
repo_no_results=Подходящие проекты не найдены.
user_no_results=Подходящие пользователи не найдены.
org_no_results=Подходящие организации не найдены.
org_no_results=Подходящие сообщества не найдены.
code_no_results=Соответствующий поисковому запросу исходный код не найден.
code_search_results=Результаты поиска для '%s'
code_last_indexed_at=Последний проиндексированный %s
@ -297,7 +300,7 @@ invalid_code=Код подтверждения недействителен ил
reset_password_helper=Восстановить аккаунт
reset_password_wrong_user=Вы вошли как %s, но ссылка для восстановления аккаунта %s
password_too_short=Пароль не может быть короче %d символов.
non_local_account=Нелокальные аккаунты не могут изменить пароль через Gitea.
non_local_account=Нелокальные аккаунты не могут изменить пароль через Мирокод.
verify=Проверить
scratch_code=Одноразовый пароль
use_scratch_code=Использовать scratch-код
@ -324,7 +327,7 @@ email_domain_blacklisted=С данным адресом электронной
authorize_application=Авторизация приложения
authorize_redirect_notice=Вы будете перенаправлены на %s, если вы авторизуете это приложение.
authorize_application_created_by=Это приложение было создано %s.
authorize_application_description=Если вы предоставите доступ, оно сможет получить доступ и редактировать любую информацию о вашей учётной записи, включая содержимое частных проектов и организаций.
authorize_application_description=Если вы предоставите доступ, оно сможет получить доступ и редактировать любую информацию о вашей учётной записи, включая содержимое частных проектов и сообществ.
authorize_title=Разрешить "%s" доступ к вашей учётной записи?
authorization_failed=Ошибка авторизации
authorization_failed_desc=Ошибка авторизации, обнаружен неверный запрос. Пожалуйста, свяжитесь с автором приложения, которое вы пытались авторизовать.
@ -346,7 +349,7 @@ activate_email=Подтвердите адрес своей электронно
activate_email.title=%s, пожалуйста, подтвердите ваш адрес электронной почты
activate_email.text=Пожалуйста, перейдите по ссылке, чтобы подтвердить ваш адрес электронной почты в течение <b>%s</b>:
register_notify=Добро пожаловать на Gitea
register_notify=Добро пожаловать на Мирокод
register_notify.title=%[1]s, добро пожаловать в %[2]s
register_notify.text_1=это письмо с вашим подтверждением регистрации в %s!
register_notify.text_2=Теперь вы можете войти через логин: %s.
@ -447,7 +450,7 @@ repository_files_already_exist.delete=Файлы уже существуют д
repository_files_already_exist.adopt_or_delete=Файлы уже существуют для этого проекта. Или принять их или удалить их.
visit_rate_limit=Удалённый вход отклонён в связи с ограничением количества попыток в секунду.
2fa_auth_required=Удалённый вход требует двух-факторную аутентификацию.
org_name_been_taken=Название организации уже занято.
org_name_been_taken=Название сообщества уже занято.
team_name_been_taken=Название команды уже занято.
team_no_units_error=Разрешите доступ хотя бы к одному разделу проекта.
email_been_used=Этот адрес электронной почты уже используется.
@ -460,13 +463,13 @@ password_uppercase_one=Как минимум один заглавный сим
password_digit_one=По крайней мере одна цифра
password_special_one=По крайней мере один специальный символ (знаки пунктуации, скобки, кавычки и т. д.)
enterred_invalid_repo_name=Введённое вами название проекта неверно.
enterred_invalid_org_name=Введённое вам название организации некорректно.
enterred_invalid_org_name=Введённое вам название сообщества некорректно.
enterred_invalid_owner_name=Имя нового владельца некорректно.
enterred_invalid_password=Введённый пароль неверен.
user_not_exist=Пользователь не существует.
team_not_exist=Команда не существует.
last_org_owner=Вы не можете удалить последнего пользователя из команды 'Владельцы'. Для организации должен быть хотя бы один владелец.
cannot_add_org_to_team=Организацию нельзя добавить в качестве члена команды.
last_org_owner=Вы не можете удалить последнего пользователя из команды 'Владельцы'. Для сообщества должен быть хотя бы один владелец.
cannot_add_org_to_team=Сообщество нельзя добавить в качестве члена команды.
invalid_ssh_key=Не удается проверить SSH ключ: %s
invalid_gpg_key=Не удается проверить GPG ключ: %s
@ -475,8 +478,8 @@ unable_verify_ssh_key=Не удаётся проверить ключ SSH; пе
auth_failed=Ошибка аутентификации: %v
still_own_repo=Ваша учётная запись владеет одним или несколькими репозиториями; сначала удалите или перенесите их.
still_has_org=Ваша учётная запись является членом одной или нескольких организаций; сначала выйдите из них.
org_still_own_repo=Эта организация по-прежнему владеет одним или несколькими репозиториями; сначала удалите или перенесите их.
still_has_org=Ваша учётная запись является членом одной или нескольких сообществ; сначала выйдите из них.
org_still_own_repo=Эта сообщество по-прежнему владеет одним или несколькими репозиториями; сначала удалите или перенесите их.
target_branch_not_exist=Целевая ветка не существует.
@ -494,6 +497,9 @@ follow=Подписаться
unfollow=Отписаться
heatmap.loading=Загрузка тепловой карты…
user_bio=О себе
user_competences=Компетенции
user_resources=Ресурсы
user_interests=Интересы
disabled_public_activity=Этот пользователь отключил публичную видимость активности.
form.name_reserved=Имя пользователя '%s' зарезервировано.
@ -510,12 +516,12 @@ avatar=Аватар
ssh_gpg_keys=SSH / GPG ключи
social=Учётные записи в соцсетях
applications=Приложения
orgs=Управление организациями
orgs=Управление сообществами
repos=Проекты
delete=Удалить аккаунт
twofa=Двухфакторная аутентификация
account_link=Привязанные аккаунты
organization=Организации
organization=Сообщества
uid=UID
public_profile=Открытый профиль
@ -560,7 +566,7 @@ new_password=Новый пароль
retype_new_password=Подтверждение нового пароля
password_incorrect=Текущий пароль неправильный.
change_password_success=Ваш пароль был изменён. С этого момента необходимо использовать новый пароль для входа.
password_change_disabled=Нелокальные аккаунты не могут изменить пароль через Gitea.
password_change_disabled=Нелокальные аккаунты не могут изменить пароль через Мирокод.
emails=Email адреса
manage_emails=Управление адресами электронной почты
@ -671,13 +677,13 @@ hide_openid=Скрыть из профиля
ssh_disabled=SSH отключён
ssh_externally_managed=Этот SSH ключ управляется извне для этого пользователя
manage_social=Управление привязанными учетными записями в соцсетях
social_desc=Эти социальные сети связаны с вашим аккаунтом Gitea. Их можно использовать для входа в учетную запись Gitea, поэтому необходимо быть уверенным в том, что никаких посторонних аккаунтов не подключено.
social_desc=Эти социальные сети связаны с вашим аккаунтом Мирокод. Их можно использовать для входа в учетную запись Мирокод, поэтому необходимо быть уверенным в том, что никаких посторонних аккаунтов не подключено.
unbind=Удалить связь
unbind_success=Связанная внешняя учётная запись была удалена.
manage_access_token=Управление токенами
generate_new_token=Создать новый токен
tokens_desc=Эти токены предоставляют доступ к вашей учетной записи с помощью Gitea API.
tokens_desc=Эти токены предоставляют доступ к вашей учетной записи с помощью Мирокод API.
new_token_desc=Приложения, использующие токен, имеют полный доступ к вашей учетной записи.
token_name=Имя токена
generate_token=Генерировать токен
@ -690,7 +696,7 @@ delete_token_success=Токен удалён. Приложения, исполь
manage_oauth2_applications=Управление приложениями OAuth2
edit_oauth2_application=Изменить OAuth2 приложение
oauth2_applications_desc=Приложения OAuth2 позволяет стороннему приложению к безопасно аутентифицировать пользователей данной установки Gitea.
oauth2_applications_desc=Приложения OAuth2 позволяет стороннему приложению к безопасно аутентифицировать пользователей данной установки Мирокод.
remove_oauth2_application=Удалить OAuth2 приложение
remove_oauth2_application_desc=Удаление приложения OAuth2 отменит доступ ко всем подписанным токенам доступа. Продолжить?
remove_oauth2_application_success=Приложение было удалено.
@ -714,7 +720,7 @@ oauth2_application_create_description=Приложения OAuth2 предост
oauth2_application_remove_description=Удаление приложения OAuth2 приведёт к отмене его доступа к авторизованным учётным записям пользователей в данном экземпляре. Продолжить?
authorized_oauth2_applications=Авторизованные приложения OAuth2
authorized_oauth2_applications_description=Вы предоставили доступ к вашему персональному аккаунту Gitea этим сторонним приложениям. Пожалуйста, отзовите доступ у приложений, которые больше не используются.
authorized_oauth2_applications_description=Вы предоставили доступ к вашему персональному аккаунту Мирокод этим сторонним приложениям. Пожалуйста, отзовите доступ у приложений, которые больше не используются.
revoke_key=Отозвать
revoke_oauth2_grant=Отозвать доступ
revoke_oauth2_grant_description=Отзыв доступа у этого стороннего приложения не позволит ему получать доступ к вашим данным. Вы уверены?
@ -741,13 +747,13 @@ twofa_failed_get_secret=Не удалось получить ключ.
webauthn_desc=Ключи безопасности - это аппаратные устройства, содержащие криптографические ключи. Они могут использоваться для двухфакторной аутентификации. Ключи безопасности должны поддерживать стандарт <a rel="noreferrer" target="_blank" href="https://w3c.github.io/webauthn/#webauthn-authenticator">WebAuthn Authenticator</a>.
manage_account_links=Управление привязанными аккаунтами
manage_account_links_desc=Эти внешние аккаунты привязаны к вашему аккаунту Gitea.
account_links_not_available=В настоящее время нет внешних аккаунтов, привязанных к вашему аккаунту Gitea.
manage_account_links_desc=Эти внешние аккаунты привязаны к вашему аккаунту Мирокод.
account_links_not_available=В настоящее время нет внешних аккаунтов, привязанных к вашему аккаунту Мирокод.
remove_account_link=Удалить привязанный аккаунт
remove_account_link_desc=Удаление привязанной учетной записи отменит её доступ к вашей учетной записи Gitea. Продолжить?
remove_account_link_desc=Удаление привязанной учетной записи отменит её доступ к вашей учетной записи Мирокод. Продолжить?
remove_account_link_success=Привязанная учетная запись удалена.
orgs_none=Вы не состоите ни в одной организации.
orgs_none=Вы не состоите ни в одной сообщества.
repos_none=Вы не владеете проектами
delete_account=Удалить свой аккаунт
@ -768,12 +774,12 @@ visibility.public_tooltip=Видимый для всех пользовател
visibility.limited=Ограниченный
visibility.limited_tooltip=Видимый только авторизованным пользователям
visibility.private=Приватный
visibility.private_tooltip=Видимый только членам организации
visibility.private_tooltip=Видимый только членам сообщества
[repo]
new_repo_helper=Репозиторий содержит все файлы проекта, включая историю ревизии. Уже есть где-то еще? <a href="%s">Мигрировать репозиторий.</a>
owner=Владелец
owner_helper=Некоторые организации могут не отображаться в раскрывающемся списке из-за максимального ограничения количества проектов.
owner_helper=Некоторые сообщества могут не отображаться в раскрывающемся списке из-за максимального ограничения количества проектов.
repo_name=Название проекта
repo_name_helper=Лучшие названия репозиториев состоят из коротких, легко запоминаемых и уникальных ключевых слов.
repo_size=Размер проекта
@ -782,7 +788,7 @@ template_select=Выбрать шаблон.
template_helper=Сделать проект шаблоном
template_description=Шаблонные проекты дают возможность пользователям создавать новые проекты с той же структурой каталогов, файлами и дополнительными настройками.
visibility=Видимость
visibility_description=Только владелец или члены организации, при наличии прав, смогут увидеть это.
visibility_description=Только владелец или члены сообщества, при наличии прав, смогут увидеть это.
visibility_helper=Сделать проект частным
visibility_helper_forced=Администратор сайта настроил параметр видимости новых проектов. Проект приватный по умолчанию.
visibility_fork_helper=(Изменение этого повлияет на все форки.)
@ -798,6 +804,8 @@ download_bundle=Скачать BUNDLE
generate_repo=Создать проект
generate_from=Создать из
repo_desc=Описание
resources=Ресурсы
competences=Компетенции
repo_desc_helper=Добавьте краткое описание (необязательно)
repo_lang=Язык
repo_gitignore_helper=Выберите шаблон .gitignore.
@ -925,7 +933,7 @@ migrate.migrating_failed.error=Ошибка: %s
migrate.migrating_failed_no_addr=Миграция не удалась.
migrate.git.description=Перенести только репозиторий из любого Git сервиса.
migrate.gitlab.description=Перенести данные с gitlab.com или других экземпляров GitLab.
migrate.gitea.description=Перенести данные с gitea.com или других экземпляров Gitea.
migrate.gitea.description=Перенести данные с gitea.com или других экземпляров Мирокод.
migrate.gogs.description=Перенести данные с notabug.org или других экземпляров Gogs.
migrate.onedev.description=Перенести данные с code.onedev.io или других экземпляров OneDev.
migrate.codebase.description=Перенос данных с codebasehq.com.
@ -972,7 +980,7 @@ issues=Задачи
pulls=Запросы на слияние
project_board=Направления
labels=Метки
org_labels_desc=Метки уровня организации, которые можно использовать с <strong>всеми репозиториями< / strong> в этой организации
org_labels_desc=Метки уровня сообщества, которые можно использовать с <strong>всеми репозиториями< / strong> в этом сообществе
org_labels_desc_manage=управлять
milestones=Этапы
@ -1536,7 +1544,7 @@ pulls.reopened_at=`переоткрыл этот запрос на слияни
pulls.merge_instruction_hint=`Вы также можете просмотреть инструкции <a class="show-instruction">командной строки</a>.`
pulls.merge_instruction_step1_desc=В проекте вашего направления посмотрите новую ветку и протестируйте изменения.
pulls.merge_instruction_step2_desc=Объединить изменения и обновить на Gitea.
pulls.merge_instruction_step2_desc=Объединить изменения и обновить на Мирокод.
milestones.new=Новый этап
milestones.open_tab=%d открыто(ы)
@ -1711,6 +1719,7 @@ settings.email_notifications.onmention=Посылать письмо на эл.
settings.email_notifications.disable=Отключить почтовые уведомления
settings.email_notifications.submit=Установить настройки электронной почты
settings.site=Сайт
settings.location_coordinates=Координаты
settings.update_settings=Обновить настройки
settings.branches.update_default_branch=Обновить ветку по умолчанию
settings.advanced_settings=Расширенные настройки
@ -1771,11 +1780,11 @@ settings.transfer.success=Трансфер репозитория успешно
settings.transfer_abort=Отменить трансфер
settings.transfer_abort_invalid=Невозможно отменить трансфер несуществующего репозитория.
settings.transfer_abort_success=Трансфер репозитория в %s успешно отменён.
settings.transfer_desc=Передать проект другому пользователю или организации где у вас есть права администратора.
settings.transfer_desc=Передать проект другому пользователю или сообщества где у вас есть права администратора.
settings.transfer_form_title=Введите сопутствующую информацию для подтверждения операции:
settings.transfer_in_progress=Трансфер в процессе выполнения. Отмените его, если желаете выполнить трансфер другому пользователю.
settings.transfer_notices_1=- Вы можете потерять доступ, если новый владелец является отдельным пользователем.
settings.transfer_notices_2=- Вы сохраните доступ, если новым владельцем станет организация, владельцем которой вы являетесь.
settings.transfer_notices_2=- Вы сохраните доступ, если новым владельцем станет сообщество, владельцем которой вы являетесь.
settings.transfer_notices_3=- если проект является приватным и передается отдельному пользователю, это действие позволяет убедиться, что пользователь имеет хотя бы права на чтение (и при необходимости изменяет права доступа).
settings.transfer_owner=Новый владелец
settings.transfer_perform=Выполнить трансфер
@ -1789,11 +1798,11 @@ settings.trust_model.collaborator=Соавтор
settings.trust_model.collaborator.long=Соавтор: Подписи доверия от соавторов
settings.trust_model.collaborator.desc=Допустимые подписи соавторов этого репозитория будут помечены как "доверенные" - (если они соответствуют коммиту или нет). В противном случае, правильные подписи будут помечены как "ненадёжные", если подпись соответствует коммиту и "не совпадает", если нет.
settings.trust_model.committer=Коммитер
settings.trust_model.committer.long=Коммитер: Доверять подписям, соответствующим коммитерам (Это совпадает с GitHub и заставит подписать коммиты Gitea в качестве коммитера)
settings.trust_model.committer.desc=Допустимые подписи будут помечены "доверенными" только если они соответствуют коммитеру, в противном случае они будут помечены "недоверенными". Это заставит Gitea быть коммитером подписанных коммитов вместе с фактическим коммитером, обозначенным как Co-Authored-By: и Co-Committed-By: прикреплён в этом коммите. Ключ Gitea по умолчанию должен совпадать с пользователем в базе данных.
settings.trust_model.committer.long=Коммитер: Доверять подписям, соответствующим коммитерам (Это совпадает с GitHub и заставит подписать коммиты Мирокод в качестве коммитера)
settings.trust_model.committer.desc=Допустимые подписи будут помечены "доверенными" только если они соответствуют коммитеру, в противном случае они будут помечены "недоверенными". Это заставит Мирокод быть коммитером подписанных коммитов вместе с фактическим коммитером, обозначенным как Co-Authored-By: и Co-Committed-By: прикреплён в этом коммите. Ключ Мирокод по умолчанию должен совпадать с пользователем в базе данных.
settings.trust_model.collaboratorcommitter=Соавтор+Коммитер
settings.trust_model.collaboratorcommitter.long=Соавтор+Коммитер: Доверять подписи соавторам, которые соответствуют коммитеру
settings.trust_model.collaboratorcommitter.desc=Допустимые подписи соавторов этого репозитория будут помечены "доверенными", если они соответствуют коммиту. В противном случае, правильные подписи будут помечены как "недоверенными", если подпись соответствует коммиту и не совпадает. Это заставит Gitea быть отмеченным в качестве ответственного за подписание коммитеров с фактическим коммитером, обозначенным как Co-Authored-By: и Co-Committed-By: прикреплённым для выполнения этого коммита. По умолчанию ключ Gitea должен совпадать с пользователем в базе данных.
settings.trust_model.collaboratorcommitter.desc=Допустимые подписи соавторов этого репозитория будут помечены "доверенными", если они соответствуют коммиту. В противном случае, правильные подписи будут помечены как "недоверенными", если подпись соответствует коммиту и не совпадает. Это заставит Мирокод быть отмеченным в качестве ответственного за подписание коммитеров с фактическим коммитером, обозначенным как Co-Authored-By: и Co-Committed-By: прикреплённым для выполнения этого коммита. По умолчанию ключ Мирокод должен совпадать с пользователем в базе данных.
settings.wiki_delete=Стереть описание проекта
settings.wiki_delete_desc=Будьте внимательны! Как только вы удалите описание проекта — пути назад не будет.
settings.wiki_delete_notices_1=- Это навсегда удалит и отключит Описание проекта для %s.
@ -1816,9 +1825,9 @@ settings.collaborator_deletion=Удалить соавтора
settings.collaborator_deletion_desc=Этот пользователь больше не будет иметь доступа для совместной работы в этом проекте после удаления. Вы хотите продолжить?
settings.remove_collaborator_success=Соавтор удалён.
settings.search_user_placeholder=Поиск пользователя…
settings.org_not_allowed_to_be_collaborator=Организации не могут быть добавлены как соавторы.
settings.change_team_access_not_allowed=Доступ к проекту команде был ограничен владельцем организации
settings.team_not_in_organization=Команда не в той же организации, что и проект
settings.org_not_allowed_to_be_collaborator=Сообщества не могут быть добавлены как соавторы.
settings.change_team_access_not_allowed=Доступ к проекту команде был ограничен владельцем сообщества
settings.team_not_in_organization=Команда не в той же сообщества, что и проект
settings.teams=Команды
settings.add_team=Добавить команду
settings.add_team_duplicate=Команда уже имеет проект
@ -1829,7 +1838,7 @@ settings.delete_team_tip=Эта команда имеет доступ ко вс
settings.remove_team_success=Доступ команды к проекту был удалён.
settings.add_webhook=Добавить Вебхук
settings.add_webhook.invalid_channel_name=Название канала вебхука не может быть пустым или состоять только из символа #.
settings.hooks_desc=Вебхуки позволяют внешним службам получать уведомления при возникновении определенных событий на Gitea. При возникновении указанных событий мы отправим запрос POST на каждый заданный вами URL. Узнать больше можно в нашем <a target="_blank" rel="noopener noreferrer" href="%s">руководстве по вебхукам</a>.
settings.hooks_desc=Вебхуки позволяют внешним службам получать уведомления при возникновении определенных событий на Мирокод. При возникновении указанных событий мы отправим запрос POST на каждый заданный вами URL. Узнать больше можно в нашем <a target="_blank" rel="noopener noreferrer" href="%s">руководстве по вебхукам</a>.
settings.webhook_deletion=Удалить вебхук
settings.webhook_deletion_desc=Удаление этого веб-хука приведет к удалению всей связанной с ним информации, включая историю. Хотите продолжить?
settings.webhook_deletion_success=Вебхук был удалён.
@ -1844,7 +1853,7 @@ settings.githook_edit_desc=Если хук не активен, будет по
settings.githook_name=Название Hook'a
settings.githook_content=Содержание hook'а
settings.update_githook=Обновить Hook
settings.add_webhook_desc=Gitea будет оправлять <code>POST</code> запросы на указанный URL адрес, с информацией о происходящих событиях. Подробности на странице <a target="_blank" rel="noopener noreferrer" href="%s">инструкции по использованию вебхуков</a>.
settings.add_webhook_desc=Мирокод будет оправлять <code>POST</code> запросы на указанный URL адрес, с информацией о происходящих событиях. Подробности на странице <a target="_blank" rel="noopener noreferrer" href="%s">инструкции по использованию вебхуков</a>.
settings.payload_url=URL обработчика
settings.http_method=Метод HTTP
settings.content_type=Тип содержимого
@ -2022,7 +2031,7 @@ settings.unarchive.error=Ошибка при попытке разархивир
settings.update_avatar_success=Аватар проекта обновлён.
settings.lfs=LFS
settings.lfs_filelist=Файлы LFS хранятся в этом репозитории
settings.lfs_no_lfs_files=Нет файлов LFS в этом репозитории
settings.lfs_no_lfs_files=Нет файлов Large file storage (LFS) в этом репозитории1
settings.lfs_findcommits=Найти коммиты
settings.lfs_lfs_file_no_commits=Для этого LFS файла не найдено коммитов
settings.lfs_noattribute=Этот путь не имеет блокируемого атрибута в ветке по умолчанию
@ -2189,10 +2198,10 @@ error.csv.unexpected=Не удается отобразить этот файл,
error.csv.invalid_field_count=Не удается отобразить этот файл, потому что он имеет неправильное количество полей в строке %d.
[org]
org_name_holder=Название организации
org_full_name_holder=Полное название организации
org_name_helper=Лучшие названия организаций коротки и запоминаемы.
create_org=Создать организацию
org_name_holder=Название сообщества
org_full_name_holder=Полное название сообщества
org_name_helper=Лучшие названия сообществ коротки и запоминаемы.
create_org=Создать сообщество
repo_updated=Обновлено
people=Люди
teams=Команды
@ -2201,6 +2210,8 @@ lower_repositories=Проекты
create_new_team=Создание команды
create_team=Создать команду
org_desc=Описание
org_competences=Компетенции
org_resources=Ресурсы
team_name=Название команды
team_desc=Описание
team_name_helper=Названия команд должны быть короткими и запоминающимися.
@ -2210,12 +2221,12 @@ team_permission_desc=Разрешение
team_unit_desc=Разрешить доступ к разделам проекта
team_unit_disabled=(Отключено)
form.name_reserved=Наименование организации '%s' зарезервированно.
form.name_pattern_not_allowed=Шаблон организации '%s' не допускается.
form.create_org_not_allowed=Этому пользователю не разрешено создавать организацию.
form.name_reserved=Наименование сообщества '%s' зарезервированно.
form.name_pattern_not_allowed=Шаблон сообщества '%s' не допускается.
form.create_org_not_allowed=Этому пользователю не разрешено создавать сообщество.
settings=Настройки
settings.options=Организация
settings.options=Сообщество
settings.full_name=Полное имя
settings.website=Сайт
settings.location=Местоположение
@ -2226,23 +2237,23 @@ settings.visibility=Видимость
settings.visibility.public=Публичный
settings.visibility.limited=Ограничено (Видно только для авторизованных пользователей)
settings.visibility.limited_shortname=Ограничить
settings.visibility.private=Частный (Видимый только для участников организации)
settings.visibility.private=Частный (Видимый только для участников сообщества)
settings.visibility.private_shortname=Приватный
settings.update_settings=Обновить настройки
settings.update_setting_success=Настройки организации обновлены.
settings.change_orgname_prompt=Это изменение изменит ссылки на организацию.
settings.update_setting_success=Настройки сообщества обновлены.
settings.change_orgname_prompt=Это изменение изменит ссылки на сообщество.
settings.change_orgname_redirect_prompt=Старое имя будет перенаправлено до тех пор, пока оно не будет введено.
settings.update_avatar_success=Аватар организации обновлён.
settings.delete=Удалить организацию
settings.delete_account=Удалить эту организацию
settings.delete_prompt=Это действие <strong>БЕЗВОЗВРАТНО</strong> удалит эту организацию навсегда.
settings.update_avatar_success=Аватар сообщества обновлён.
settings.delete=Удалить сообщество
settings.delete_account=Удалить это сообщество
settings.delete_prompt=Это действие <strong>БЕЗВОЗВРАТНО</strong> удалит это сообщество навсегда.
settings.confirm_delete_account=Подтвердить удаление
settings.delete_org_title=Удалить организацию
settings.delete_org_desc=Эта организация будет безвозвратно удалена. Продолжить?
settings.hooks_desc=Добавьте вебхуки, которые будет вызываться для <strong>всех репозиториев</strong> под этой организации.
settings.delete_org_title=Удалить сообщество
settings.delete_org_desc=Это сообщество будет безвозвратно удалена. Продолжить?
settings.hooks_desc=Добавьте вебхуки, которые будет вызываться для <strong>всех репозиториев</strong> под этим сообществом.
settings.labels_desc=Добавьте метки, которые могут быть использованы в задачах для <strong>всех репозиториев</strong> этой организации.
settings.labels_desc=Добавьте метки, которые могут быть использованы в задачах для <strong>всех репозиториев</strong> этого сообщества.
members.membership_visibility=Видимость участника команды:
members.public=Видимый
@ -2263,7 +2274,7 @@ teams.join=Объединить
teams.leave=Выйти
teams.leave.detail=Покинуть %s?
teams.can_create_org_repo=Создать проекты
teams.can_create_org_repo_helper=Участники могут создавать новые проекты в организации. Создатель получит администраторский доступ к новому репозиторию.
teams.can_create_org_repo_helper=Участники могут создавать новые проекты в сообщество. Создатель получит администраторский доступ к новому репозиторию.
teams.read_access_helper=Участники могут просматривать и клонировать командные проекты.
teams.write_access_helper=Участники могут читать и выполнять push в командные проекты.
teams.admin_access=Доступ администратора
@ -2281,13 +2292,13 @@ teams.delete_team_success=Команда удалена.
teams.read_permission_desc=Эта команда предоставляет доступ на <strong>Чтение</strong>: члены могут просматривать и клонировать проекты команды.
teams.write_permission_desc=Эта команда предоставляет доступ на <strong>Запись</strong>: члены могут получать и выполнять push команды в проекты.
teams.admin_permission_desc=Эта команда дает <strong>административный</strong> доступ: участники могут читать, пушить и добавлять соавторов к ее репозиториям.
teams.create_repo_permission_desc=Кроме того, эта команда предоставляет право <strong>Создание проекта</strong>: члены команды могут создавать новые репозитории в организации.
teams.create_repo_permission_desc=Кроме того, эта команда предоставляет право <strong>Создание проекта</strong>: члены команды могут создавать новые репозитории в сообщество.
teams.repositories=Проекты группы разработки
teams.search_repo_placeholder=Поиск проекта…
teams.remove_all_repos_title=Удалить все проекты команды
teams.remove_all_repos_desc=Удаляет все проекты из команды.
teams.add_all_repos_title=Добавить все проекты
teams.add_all_repos_desc=Добавит все проекты организации в команду.
teams.add_all_repos_desc=Добавит все проекты сообщества в команду.
teams.add_nonexistent_repo=Вы добавляете в отсутствующий репозиторий, пожалуйста сначала его создайте.
teams.add_duplicate_users=Пользователь уже состоит в команде.
teams.repos.none=Для этой команды нет доступных репозиториев.
@ -2303,7 +2314,7 @@ teams.all_repositories_admin_permission_desc=Эта команда предос
[admin]
dashboard=Панель
users=Пользователи
organizations=Организации
organizations=Сообщества
repositories=Проекты
hooks=Веб-хуки
authentication=Авторизация
@ -2318,7 +2329,7 @@ total=Всего: %d
dashboard.statistic=Статистика
dashboard.operations=Операции
dashboard.system_status=Статус системного монитора
dashboard.statistic_info=В базе данных Gitea записано <b>%d</b> пользователей, <b>%d</b> организаций, <b>%d</b> публичных ключей, <b>%d</b> репозиториев, <b>%d</b> подписок на репозитории, <b>%d</b> добавлений в избранное, <b>%d</b> действий, <b>%d</b> доступов, <b>%d</b> задач, <b>%d</b> комментариев, <b>%d</b> социальных учетных записей, <b>%d</b> подписок на пользователей, <b>%d</b> зеркал, <b>%d</b> релизов, <b>%d</b> источников входа, <b>%d</b> вебхуков, <b>%d</b> этапов, <b>%d</b> меток, <b>%d</b> задач hook'ов, <b>%d</b> команд, <b>%d</b> задач по обновлению, <b>%d</b> присоединённых файлов.
dashboard.statistic_info=В базе данных Мирокод записано <b>%d</b> пользователей, <b>%d</b> сообществ, <b>%d</b> публичных ключей, <b>%d</b> репозиториев, <b>%d</b> подписок на репозитории, <b>%d</b> добавлений в избранное, <b>%d</b> действий, <b>%d</b> доступов, <b>%d</b> задач, <b>%d</b> комментариев, <b>%d</b> социальных учетных записей, <b>%d</b> подписок на пользователей, <b>%d</b> зеркал, <b>%d</b> релизов, <b>%d</b> источников входа, <b>%d</b> вебхуков, <b>%d</b> этапов, <b>%d</b> меток, <b>%d</b> задач hook'ов, <b>%d</b> команд, <b>%d</b> задач по обновлению, <b>%d</b> присоединённых файлов.
dashboard.operation_name=Имя операции
dashboard.operation_switch=Переключить
dashboard.operation_run=Запуск
@ -2349,9 +2360,9 @@ dashboard.archive_cleanup=Удалить старые архивы репози
dashboard.deleted_branches_cleanup=Очистка удалённых ветвей
dashboard.update_migration_poster_id=Обновить ID плакатов миграции
dashboard.git_gc_repos=Выполнить сборку мусора для всех репозиториев
dashboard.resync_all_sshkeys=Обновить файл '.ssh/authorized_keys' с SSH ключами Gitea.
dashboard.resync_all_sshkeys=Обновить файл '.ssh/authorized_keys' с SSH ключами Мирокод.
dashboard.resync_all_sshkeys.desc=(Не требуется для встроенного SSH сервера.)
dashboard.resync_all_sshprincipals=Обновите файл '.ssh/authorized_principals' SSH данными участника Gitea.
dashboard.resync_all_sshprincipals=Обновите файл '.ssh/authorized_principals' SSH данными участника Мирокод.
dashboard.resync_all_sshprincipals.desc=(Не требуется для встроенного SSH сервера.)
dashboard.resync_all_hooks=Повторная синхронизация hook'ов pre-receive, update и post-receive во всех репозиториях.
dashboard.reinit_missing_repos=Переинициализировать все отсутствующие Git репозитории, для которых существуют записи
@ -2417,13 +2428,13 @@ users.prohibit_login=Этой учетной записи запрещён вх
users.is_admin=У этой учетной записи есть права администратора
users.is_restricted=Ограничен
users.allow_git_hook=Эта учётная запись имеет разрешение на создание Git hook'ов
users.allow_git_hook_tooltip=Git Hooks выполняется как пользователь ОС с Gitea и будет иметь одинаковый уровень доступа к хосту. В результате пользователи с привилегией Git Hook могут получить доступ и модифицировать все репозитории Gitea, а также базу данных, используемую Gitea. Следовательно, они также могут получить привилегии администратора Gitea.
users.allow_git_hook_tooltip=Git Hooks выполняется как пользователь ОС с Мирокод и будет иметь одинаковый уровень доступа к хосту. В результате пользователи с привилегией Git Hook могут получить доступ и модифицировать все репозитории Мирокод, а также базу данных, используемую Мирокод. Следовательно, они также могут получить привилегии администратора Мирокод.
users.allow_import_local=Пользователь имеет право импортировать локальные проекты
users.allow_create_organization=Эта учетная запись имеет разрешения на создание организаций
users.allow_create_organization=Эта учетная запись имеет разрешения на создание сообществ
users.update_profile=Обновить профиль учетной записи
users.delete_account=Удалить эту учетную запись
users.still_own_repo=На вашем аккаунте все еще остается один или более репозиториев, сначала вам нужно удалить или передать их.
users.still_has_org=Эта учетная запись все еще является членом одной или более организаций. Для продолжения, покиньте или удалите организации.
users.still_has_org=Эта учетная запись все еще является членом одной или более сообществ. Для продолжения, покиньте или удалите сообщества.
users.deletion_success=Учётная запись успешно удалена.
users.reset_2fa=Сброс 2FA
users.list_status_filter.menu_text=Фильтр
@ -2452,11 +2463,11 @@ emails.duplicate_active=Этот адрес электронной почты у
emails.change_email_header=Обновить свойства электронной почты
emails.change_email_text=Вы уверены, что хотите обновить этот адрес электронной почты?
orgs.org_manage_panel=Управление организациями
orgs.org_manage_panel=Управление сообществами
orgs.name=Название
orgs.teams=Команды
orgs.members=Участники
orgs.new_orga=Новая организация
orgs.new_orga=Новое сообщество
repos.repo_manage_panel=Управление проектами
repos.unadopted=Непринятые проекты
@ -2471,12 +2482,12 @@ repos.issues=Задачи
repos.size=Размер
defaulthooks=Стандартные Веб-хуки
defaulthooks.desc=Вебхуки автоматически делают HTTP-POST запросы на сервер, когда вызываются определенные события Gitea. Вебхуки, определённые здесь, по умолчанию и будут скопированы во все новые репозитории. Подробнее читайте в <a target="_blank" rel="noopener" href="https://docs.gitea.io/en-us/webhooks/">руководстве по вебхукам</a>.
defaulthooks.desc=Вебхуки автоматически делают HTTP-POST запросы на сервер, когда вызываются определенные события Мирокод. Вебхуки, определённые здесь, по умолчанию и будут скопированы во все новые репозитории. Подробнее читайте в <a target="_blank" rel="noopener" href="https://docs.gitea.io/en-us/webhooks/">руководстве по вебхукам</a>.
defaulthooks.add_webhook=Добавить стандартный Веб-хук
defaulthooks.update_webhook=Обновить стандартный Веб-хук
systemhooks=Системные вебхуки
systemhooks.desc=Вебхуки автоматически делают HTTP-POST запросы на сервер, когда вызываются определённые события Gitea. Определённые вебхуки будут действовать на всех репозиториях системы, поэтому пожалуйста, учитывайте любые последствия для производительности. Подробнее читайте в <a target="_blank" rel="noopener" href="https://docs.gitea.io/en-us/webhooks/">руководстве по вебхукам</a>.
systemhooks.desc=Вебхуки автоматически делают HTTP-POST запросы на сервер, когда вызываются определённые события Мирокод. Определённые вебхуки будут действовать на всех репозиториях системы, поэтому пожалуйста, учитывайте любые последствия для производительности. Подробнее читайте в <a target="_blank" rel="noopener" href="https://docs.gitea.io/en-us/webhooks/">руководстве по вебхукам</a>.
systemhooks.add_webhook=Добавить системный вебхук
systemhooks.update_webhook=Обновить системный вебхук
@ -2587,8 +2598,8 @@ auths.login_source_of_type_exist=Источник аутентификации
config.server_config=Конфигурация сервера
config.app_name=Название сайта
config.app_ver=Версия Gitea
config.app_url=Базовый URL-адрес Gitea
config.app_ver=Версия Мирокод
config.app_url=Базовый URL-адрес Мирокод
config.custom_conf=Путь к файлу конфигурации
config.custom_file_root_path=Пользовательский путь до папки с файлами
config.domain=Домен сервера
@ -2633,7 +2644,7 @@ config.db_path=Путь
config.service_config=Сервисная конфигурация
config.register_email_confirm=Требуется подтверждение по электронной почте
config.disable_register=Отключить самостоятельную регистрацию
config.allow_only_internal_registration=Разрешить регистрацию только через Gitea
config.allow_only_internal_registration=Разрешить регистрацию только через Мирокод
config.allow_only_external_registration=Разрешить регистрацию только через сторонние сервисы
config.enable_openid_signup=Включить cамостоятельную регистрацию OpenID
config.enable_openid_signin=Включение входа через OpenID
@ -2645,12 +2656,12 @@ config.enable_captcha=Включить CAPTCHA
config.active_code_lives=Время жизни кода для активации
config.reset_password_code_lives=Время действия кода восстановления аккаунта
config.default_keep_email_private=Скрывать адреса электронной почты по умолчанию
config.default_allow_create_organization=Разрешить создание организаций по умолчанию
config.default_allow_create_organization=Разрешить создание сообществ по умолчанию
config.enable_timetracking=Включить отслеживание времени
config.default_enable_timetracking=Включить отслеживание времени по умолчанию
config.default_allow_only_contributors_to_track_time=Учитывать только участников разработки в подсчёте времени
config.no_reply_address=No-reply адрес
config.default_visibility_organization=Видимость по умолчанию для новых организаций
config.default_visibility_organization=Видимость по умолчанию для новых сообществ
config.default_enable_dependencies=Включение зависимостей для задач по умолчанию
config.default_enable_parents=Включение родителей для задач по умолчанию

45
package-lock.json generated

@ -1711,6 +1711,8 @@
"version": "8.9.0",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-8.9.0.tgz",
"integrity": "sha512-qOKJyNj/h+OWx7s5DePL6Zu1KeM9jPZhwBqs+7DzP6bGOvqzVCSf0xueYmVuaC/oQ/VtS2zLMLHdQFbkka+XDQ==",
"optional": true,
"peer": true,
"dependencies": {
"fast-deep-equal": "^3.1.1",
"json-schema-traverse": "^1.0.0",
@ -1725,7 +1727,9 @@
"node_modules/ajv-formats/node_modules/json-schema-traverse": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
"integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug=="
"integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",
"optional": true,
"peer": true
},
"node_modules/ajv-keywords": {
"version": "3.5.2",
@ -2119,13 +2123,19 @@
}
},
"node_modules/caniuse-lite": {
"version": "1.0.30001301",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001301.tgz",
"integrity": "sha512-csfD/GpHMqgEL3V3uIgosvh+SVIQvCh43SNu9HRbP1lnxkKm1kjDG4f32PP571JplkLjfS+mg2p1gxR7MYrrIA==",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/browserslist"
}
"version": "1.0.30001374",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001374.tgz",
"integrity": "sha512-mWvzatRx3w+j5wx/mpFN5v5twlPrabG8NqX2c6e45LCpymdoGqNvRkRutFUqpRTXKFQFNQJasvK0YT7suW6/Hw==",
"funding": [
{
"type": "opencollective",
"url": "https://opencollective.com/browserslist"
},
{
"type": "tidelift",
"url": "https://tidelift.com/funding/github/npm/caniuse-lite"
}
]
},
"node_modules/chalk": {
"version": "4.1.2",
@ -11189,14 +11199,13 @@
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz",
"integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==",
"requires": {
"ajv": "^8.0.0"
},
"requires": {},
"dependencies": {
"ajv": {
"version": "8.9.0",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-8.9.0.tgz",
"version": "https://registry.npmjs.org/ajv/-/ajv-8.9.0.tgz",
"integrity": "sha512-qOKJyNj/h+OWx7s5DePL6Zu1KeM9jPZhwBqs+7DzP6bGOvqzVCSf0xueYmVuaC/oQ/VtS2zLMLHdQFbkka+XDQ==",
"optional": true,
"peer": true,
"requires": {
"fast-deep-equal": "^3.1.1",
"json-schema-traverse": "^1.0.0",
@ -11207,7 +11216,9 @@
"json-schema-traverse": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
"integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug=="
"integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",
"optional": true,
"peer": true
}
}
},
@ -11497,9 +11508,9 @@
}
},
"caniuse-lite": {
"version": "1.0.30001301",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001301.tgz",
"integrity": "sha512-csfD/GpHMqgEL3V3uIgosvh+SVIQvCh43SNu9HRbP1lnxkKm1kjDG4f32PP571JplkLjfS+mg2p1gxR7MYrrIA=="
"version": "1.0.30001374",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001374.tgz",
"integrity": "sha512-mWvzatRx3w+j5wx/mpFN5v5twlPrabG8NqX2c6e45LCpymdoGqNvRkRutFUqpRTXKFQFNQJasvK0YT7suW6/Hw=="
},
"chalk": {
"version": "4.1.2",

BIN
public/img/logo.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

108
public/img/logo.svg

@ -1 +1,107 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640" style="enable-background:new 0 0 640 640" xml:space="preserve" width="32" height="32"><path style="fill:#fff" d="m395.9 484.2-126.9-61c-12.5-6-17.9-21.2-11.8-33.8l61-126.9c6-12.5 21.2-17.9 33.8-11.8 17.2 8.3 27.1 13 27.1 13l-.1-109.2 16.7-.1.1 117.1s57.4 24.2 83.1 40.1c3.7 2.3 10.2 6.8 12.9 14.4 2.1 6.1 2 13.1-1 19.3l-61 126.9c-6.2 12.7-21.4 18.1-33.9 12z"/><path style="fill:#609926" d="M622.7 149.8c-4.1-4.1-9.6-4-9.6-4s-117.2 6.6-177.9 8c-13.3.3-26.5.6-39.6.7v117.2c-5.5-2.6-11.1-5.3-16.6-7.9 0-36.4-.1-109.2-.1-109.2-29 .4-89.2-2.2-89.2-2.2s-141.4-7.1-156.8-8.5c-9.8-.6-22.5-2.1-39 1.5-8.7 1.8-33.5 7.4-53.8 26.9C-4.9 212.4 6.6 276.2 8 285.8c1.7 11.7 6.9 44.2 31.7 72.5 45.8 56.1 144.4 54.8 144.4 54.8s12.1 28.9 30.6 55.5c25 33.1 50.7 58.9 75.7 62 63 0 188.9-.1 188.9-.1s12 .1 28.3-10.3c14-8.5 26.5-23.4 26.5-23.4S547 483 565 451.5c5.5-9.7 10.1-19.1 14.1-28 0 0 55.2-117.1 55.2-231.1-1.1-34.5-9.6-40.6-11.6-42.6zM125.6 353.9c-25.9-8.5-36.9-18.7-36.9-18.7S69.6 321.8 60 295.4c-16.5-44.2-1.4-71.2-1.4-71.2s8.4-22.5 38.5-30c13.8-3.7 31-3.1 31-3.1s7.1 59.4 15.7 94.2c7.2 29.2 24.8 77.7 24.8 77.7s-26.1-3.1-43-9.1zm300.3 107.6s-6.1 14.5-19.6 15.4c-5.8.4-10.3-1.2-10.3-1.2s-.3-.1-5.3-2.1l-112.9-55s-10.9-5.7-12.8-15.6c-2.2-8.1 2.7-18.1 2.7-18.1L322 273s4.8-9.7 12.2-13c.6-.3 2.3-1 4.5-1.5 8.1-2.1 18 2.8 18 2.8L467.4 315s12.6 5.7 15.3 16.2c1.9 7.4-.5 14-1.8 17.2-6.3 15.4-55 113.1-55 113.1z"/><path style="fill:#609926" d="M326.8 380.1c-8.2.1-15.4 5.8-17.3 13.8-1.9 8 2 16.3 9.1 20 7.7 4 17.5 1.8 22.7-5.4 5.1-7.1 4.3-16.9-1.8-23.1l24-49.1c1.5.1 3.7.2 6.2-.5 4.1-.9 7.1-3.6 7.1-3.6 4.2 1.8 8.6 3.8 13.2 6.1 4.8 2.4 9.3 4.9 13.4 7.3.9.5 1.8 1.1 2.8 1.9 1.6 1.3 3.4 3.1 4.7 5.5 1.9 5.5-1.9 14.9-1.9 14.9-2.3 7.6-18.4 40.6-18.4 40.6-8.1-.2-15.3 5-17.7 12.5-2.6 8.1 1.1 17.3 8.9 21.3 7.8 4 17.4 1.7 22.5-5.3 5-6.8 4.6-16.3-1.1-22.6 1.9-3.7 3.7-7.4 5.6-11.3 5-10.4 13.5-30.4 13.5-30.4.9-1.7 5.7-10.3 2.7-21.3-2.5-11.4-12.6-16.7-12.6-16.7-12.2-7.9-29.2-15.2-29.2-15.2s0-4.1-1.1-7.1c-1.1-3.1-2.8-5.1-3.9-6.3 4.7-9.7 9.4-19.3 14.1-29-4.1-2-8.1-4-12.2-6.1-4.8 9.8-9.7 19.7-14.5 29.5-6.7-.1-12.9 3.5-16.1 9.4-3.4 6.3-2.7 14.1 1.9 19.8l-24.6 50.4z"/></svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
viewBox="0 0 1133.8586 755.90533"
height="755.90533"
width="1133.8586"
xml:space="preserve"
id="svg2"
version="1.1"
sodipodi:docname="Мирокод 3.svg"
inkscape:version="1.1 (c68e22c387, 2021-05-23)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"><sodipodi:namedview
id="namedview98"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
showgrid="false"
inkscape:zoom="0.97983995"
inkscape:cx="566.92932"
inkscape:cy="377.61269"
inkscape:window-width="1280"
inkscape:window-height="981"
inkscape:window-x="-2"
inkscape:window-y="-2"
inkscape:window-maximized="1"
inkscape:current-layer="svg2" /><metadata
id="metadata8"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
id="defs6"><clipPath
id="clipPath18"
clipPathUnits="userSpaceOnUse"><path
id="path16"
d="M 0,0 H 726.398 V 178.782 H 0 Z" /></clipPath><clipPath
id="clipPath40"
clipPathUnits="userSpaceOnUse"><path
id="path38"
d="M 0,566.929 H 850.394 V 0 H 0 Z" /></clipPath></defs><g
id="g457"><g
transform="matrix(1.3333333,0,0,-1.3333333,198.4164,535.00667)"
id="g26"><path
id="path28"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="M 0,0 H 14.864 L 16.008,-0.572 39.447,-28.584 62.886,-0.572 64.03,0 h 14.864 l 0.571,-0.572 v -78.894 l -0.571,-0.572 H 64.03 l -0.572,0.572 v 54.883 L 40.019,-52.024 h -1.144 l -23.439,27.441 v -54.883 l -0.572,-0.572 H 0 l -0.572,0.572 v 78.894 z" /></g><g
transform="matrix(1.3333333,0,0,-1.3333333,321.12346,535.00667)"
id="g30"><path
id="path32"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 0,0 h 14.864 l 0.571,-0.572 V -52.596 L 55.454,-0.572 56.598,0 h 15.436 l 0.571,-0.572 v -78.894 l -0.571,-0.572 H 57.169 l -0.571,0.572 v 52.024 L 16.579,-79.466 15.435,-80.038 H 0 l -0.572,0.572 v 78.894 z" /></g><g
transform="matrix(1.3333333,0,0,-1.3333333,455.26466,556.35053)"
id="g42"><path
id="path44"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 0,0 v -19.437 h 8.003 c 8.004,0 12.006,3.238 12.006,9.718 C 20.009,-3.241 16.007,0 8.003,0 Z M -15.436,16.008 H 9.147 c 8.765,0 15.722,-2.498 20.867,-7.49 5.145,-4.993 7.717,-11.073 7.717,-18.237 0,-7.165 -2.572,-13.245 -7.717,-18.237 -5.145,-4.993 -12.102,-7.489 -20.867,-7.489 H 0 v -28.013 l -0.572,-0.572 h -14.864 l -0.572,0.572 v 78.894 z" /></g><g
transform="matrix(1.3333333,0,0,-1.3333333,592.21265,564.50613)"
id="g46"><path
id="path48"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 0,0 c -4.765,4.839 -10.576,7.26 -17.437,7.26 -6.86,0 -12.673,-2.421 -17.436,-7.26 -4.765,-4.842 -7.147,-10.806 -7.147,-17.895 0,-7.089 2.382,-13.053 7.147,-17.894 4.763,-4.841 10.576,-7.26 17.436,-7.26 6.861,0 12.672,2.419 17.437,7.26 4.763,4.841 7.146,10.805 7.146,17.894 C 7.146,-10.806 4.763,-4.842 0,0 m -47.394,11.72 c 8.233,8.078 18.218,12.119 29.957,12.119 11.738,0 21.724,-4.041 29.957,-12.119 8.232,-8.081 12.348,-17.951 12.348,-29.615 0,-11.662 -4.116,-21.534 -12.348,-29.613 -8.233,-8.081 -18.219,-12.12 -29.957,-12.12 -11.739,0 -21.724,4.039 -29.957,12.12 -8.232,8.079 -12.348,17.951 -12.348,29.613 0,11.664 4.116,21.534 12.348,29.615" /></g><g
transform="matrix(1.3333333,0,0,-1.3333333,637.04732,535.00667)"
id="g50"><path
id="path52"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 0,0 h 14.863 l 0.573,-0.572 v -27.441 h 6.86 L 47.45,-0.572 48.594,0 h 17.722 l 0.572,-0.572 -31.444,-34.302 33.731,-44.592 -0.571,-0.572 H 50.881 l -1.145,0.572 -27.44,35.445 h -6.86 v -35.445 l -0.573,-0.572 H 0 l -0.572,0.572 v 78.894 z" /></g><g
transform="matrix(1.3333333,0,0,-1.3333333,803.04985,564.50613)"
id="g54"><path
id="path56"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 0,0 c -4.765,4.839 -10.576,7.26 -17.437,7.26 -6.86,0 -12.672,-2.421 -17.436,-7.26 -4.765,-4.842 -7.147,-10.806 -7.147,-17.895 0,-7.089 2.382,-13.053 7.147,-17.894 4.764,-4.841 10.576,-7.26 17.436,-7.26 6.861,0 12.672,2.419 17.437,7.26 4.764,4.841 7.146,10.805 7.146,17.894 C 7.146,-10.806 4.764,-4.842 0,0 m -47.394,11.72 c 8.234,8.078 18.218,12.119 29.957,12.119 11.739,0 21.725,-4.041 29.958,-12.119 8.232,-8.081 12.348,-17.951 12.348,-29.615 0,-11.662 -4.116,-21.534 -12.348,-29.613 -8.233,-8.081 -18.219,-12.12 -29.958,-12.12 -11.739,0 -21.723,4.039 -29.957,12.12 -8.232,8.079 -12.348,17.951 -12.348,29.613 0,11.664 4.116,21.534 12.348,29.615" /></g><g
transform="matrix(1.3333333,0,0,-1.3333333,884.05371,556.35053)"
id="g58"><path
id="path60"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 0,0 -4.464,-43.558 c 0,-0.154 -0.077,-0.801 -0.229,-1.944 -0.154,-1.144 -0.343,-2.287 -0.572,-3.43 h 30.3 V 0 Z m -13.72,16.008 h 54.191 l 0.572,-0.572 v -64.368 h 8.575 l 0.572,-0.571 v -36.264 l -0.572,-0.571 H 34.754 l -0.571,0.571 v 20.828 h -51.454 v -20.828 l -0.571,-0.571 h -14.863 l -0.572,0.571 v 36.264 l 0.572,0.571 h 9.832 c 0.686,1.372 1.486,4.039 2.401,8.004 l 6.18,56.364 z" /></g><g
transform="matrix(1.3333333,0,0,-1.3333333,565.51465,132.72228)"
id="g186"><path
id="path188"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 0,0 c 17.049,-7.257 33.428,-15.985 48.958,-26.035 l 2.688,25.574 C 35.257,9.378 18.003,17.924 0,24.988 -18.068,17.899 -35.381,9.316 -51.823,-0.567 l 2.688,-25.581 C -33.552,-16.052 -17.114,-7.284 0,0" /></g><g
transform="matrix(1.3333333,0,0,-1.3333333,662.47692,431.28934)"
id="g190"><path
id="path192"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 0,0 c -18.016,-4.131 -36.423,-6.706 -54.983,-7.711 l 12.847,-22.254 c 19.435,1.7 38.419,4.969 56.803,9.739 C 24.999,-4.102 34,12.95 41.586,30.75 L 24.376,49.864 C 17.707,32.6 9.563,15.903 0,0" /></g><g
transform="matrix(1.3333333,0,0,-1.3333333,722.35852,246.79974)"
id="g194"><path
id="path196"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 0,0 c -1.611,-18.497 -4.824,-36.788 -9.554,-54.656 l 25.172,5.35 c 4.228,18.498 6.994,37.552 8.137,57.044 C 11.508,22.622 -1.976,36.444 -16.502,49.1 L -39.975,38.649 C -25.615,26.958 -12.224,14.034 0,0" /></g><g
transform="matrix(1.3333333,0,0,-1.3333333,408.66052,246.79708)"
id="g198"><path
id="path200"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 0,0 c 12.203,14.009 25.569,26.915 39.902,38.589 l -23.469,10.45 c -14.5,-12.64 -27.96,-26.441 -40.188,-41.301 1.142,-19.466 3.901,-38.495 8.119,-56.968 l 25.17,-5.35 C 4.814,-36.736 1.609,-18.47 0,0" /></g><g
transform="matrix(1.3333333,0,0,-1.3333333,468.54465,431.28734)"
id="g202"><path
id="path204"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="M 0,0 C -9.588,15.947 -17.75,32.693 -24.43,50.008 L -41.645,30.889 c 7.6,-17.85 16.619,-34.95 26.979,-51.115 18.382,-4.769 37.363,-8.039 56.795,-9.74 L 54.977,-7.713 C 36.419,-6.707 18.016,-4.131 0,0" /></g></g></svg>

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB

102
public/img/logo1.svg

@ -0,0 +1,102 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
viewBox="0 0 1700.7867 377.95334"
height="377.95334"
width="1700.7867"
xml:space="preserve"
id="svg2"
version="1.1"
sodipodi:docname="Мирокод 2.svg"
inkscape:version="1.1 (c68e22c387, 2021-05-23)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"><sodipodi:namedview
id="namedview96"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
showgrid="false"
inkscape:zoom="0.6532271"
inkscape:cx="850.39337"
inkscape:cy="188.29592"
inkscape:window-width="1280"
inkscape:window-height="981"
inkscape:window-x="-2"
inkscape:window-y="-2"
inkscape:window-maximized="1"
inkscape:current-layer="svg2" /><metadata
id="metadata8"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
id="defs6"><clipPath
id="clipPath26"
clipPathUnits="userSpaceOnUse"><path
id="path24"
d="M 0,283.465 H 1275.591 V 0 H 0 Z" /></clipPath></defs><g
transform="matrix(1.3333333,0,0,-1.3333333,453.37466,90.731737)"
id="g12"><path
id="path14"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="M 0,0 H 22.79 L 24.544,-0.876 60.481,-43.827 96.421,-0.876 98.175,0 h 22.79 l 0.876,-0.876 v -120.965 l -0.876,-0.877 h -22.79 l -0.878,0.877 v 84.15 L 61.359,-79.767 h -1.754 l -35.939,42.076 v -84.15 l -0.876,-0.877 H 0 l -0.877,0.877 V -0.876 Z" /></g><g
transform="matrix(1.3333333,0,0,-1.3333333,641.51665,90.731737)"
id="g16"><path
id="path18"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 0,0 h 22.79 l 0.876,-0.876 V -80.643 L 85.025,-0.876 86.778,0 h 23.668 l 0.876,-0.876 v -120.965 l -0.876,-0.877 H 87.655 l -0.877,0.877 v 79.766 l -61.358,-79.766 -1.754,-0.877 H 0 l -0.878,0.877 V -0.876 Z" /></g><g
transform="matrix(1.3333333,0,0,-1.3333333,847.18851,123.45627)"
id="g28"><path
id="path30"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 0,0 v -29.803 h 12.271 c 12.273,0 18.409,4.966 18.409,14.902 C 30.68,-4.969 24.544,0 12.271,0 Z m -23.666,24.543 h 37.691 c 13.439,0 24.106,-3.829 31.995,-11.482 7.889,-7.656 11.833,-16.978 11.833,-27.962 0,-10.987 -3.944,-20.309 -11.833,-27.963 C 38.131,-50.52 27.464,-54.347 14.025,-54.347 H 0 v -42.951 l -0.876,-0.876 h -22.79 l -0.878,0.876 V 23.667 Z" /></g><g
transform="matrix(1.3333333,0,0,-1.3333333,1057.165,135.96147)"
id="g32"><path
id="path34"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 0,0 c -7.305,7.419 -16.216,11.131 -26.735,11.131 -10.518,0 -19.431,-3.712 -26.734,-11.131 -7.305,-7.423 -10.958,-16.568 -10.958,-27.437 0,-10.869 3.653,-20.015 10.958,-27.436 7.303,-7.423 16.216,-11.132 26.734,-11.132 10.519,0 19.43,3.709 26.735,11.132 7.303,7.421 10.958,16.567 10.958,27.436 C 10.958,-16.568 7.303,-7.423 0,0 m -72.667,17.969 c 12.624,12.386 27.934,18.583 45.932,18.583 17.998,0 33.309,-6.197 45.931,-18.583 C 31.818,5.58 38.13,-9.554 38.13,-27.437 c 0,-17.881 -6.312,-33.018 -18.934,-45.405 -12.622,-12.39 -27.933,-18.583 -45.931,-18.583 -17.998,0 -33.308,6.193 -45.932,18.583 -12.622,12.387 -18.933,27.524 -18.933,45.405 0,17.883 6.311,33.017 18.933,45.406" /></g><g
transform="matrix(1.3333333,0,0,-1.3333333,1125.9085,90.731737)"
id="g36"><path
id="path38"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 0,0 h 22.79 l 0.876,-0.876 v -42.075 h 10.52 L 72.754,-0.876 74.507,0 h 27.174 l 0.876,-0.876 -48.211,-52.594 51.717,-68.371 -0.876,-0.877 H 78.014 l -1.754,0.877 -42.074,54.346 h -10.52 v -54.346 l -0.876,-0.877 H 0 l -0.877,0.877 V -0.876 Z" /></g><g
transform="matrix(1.3333333,0,0,-1.3333333,1380.4345,135.96147)"
id="g40"><path
id="path42"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="M 0,0 C -7.306,7.419 -16.216,11.131 -26.735,11.131 -37.254,11.131 -46.167,7.419 -53.47,0 c -7.305,-7.423 -10.957,-16.568 -10.957,-27.437 0,-10.869 3.652,-20.015 10.957,-27.436 7.303,-7.423 16.216,-11.132 26.735,-11.132 10.519,0 19.429,3.709 26.735,11.132 7.303,7.421 10.957,16.567 10.957,27.436 C 10.957,-16.568 7.303,-7.423 0,0 m -72.667,17.969 c 12.623,12.386 27.933,18.583 45.932,18.583 17.997,0 33.309,-6.197 45.931,-18.583 C 31.818,5.58 38.13,-9.554 38.13,-27.437 c 0,-17.881 -6.312,-33.018 -18.934,-45.405 -12.622,-12.39 -27.934,-18.583 -45.931,-18.583 -17.999,0 -33.309,6.193 -45.932,18.583 -12.622,12.387 -18.934,27.524 -18.934,45.405 0,17.883 6.312,33.017 18.934,45.406" /></g><g
transform="matrix(1.3333333,0,0,-1.3333333,1504.6337,123.45627)"
id="g44"><path
id="path46"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 0,0 -6.844,-66.786 c 0,-0.236 -0.118,-1.228 -0.352,-2.98 -0.235,-1.754 -0.526,-3.506 -0.876,-5.26 H 38.385 V 0 Z m -21.036,24.543 h 83.089 l 0.876,-0.876 v -98.693 h 13.149 l 0.876,-0.876 v -55.601 l -0.876,-0.876 H 53.287 l -0.877,0.876 v 31.934 h -78.889 v -31.934 l -0.877,-0.876 h -22.79 l -0.877,0.876 v 55.601 l 0.877,0.876 h 15.076 c 1.052,2.104 2.279,6.193 3.682,12.272 l 9.474,86.421 z" /></g><g
transform="matrix(1.3333333,0,0,-1.3333333,223.65853,66.988804)"
id="g172"><path
id="path174"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 0,0 c 13.018,-5.541 25.524,-12.206 37.384,-19.879 l 2.052,19.527 C 26.921,7.161 13.747,13.687 0,19.08 -13.796,13.667 -27.015,7.114 -39.569,-0.433 l 2.052,-19.533 C -25.618,-12.256 -13.067,-5.562 0,0" /></g><g
transform="matrix(1.3333333,0,0,-1.3333333,297.69626,294.9628)"
id="g176"><path
id="path178"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 0,0 c -13.756,-3.155 -27.812,-5.121 -41.983,-5.889 l 9.809,-16.991 c 14.84,1.298 29.336,3.794 43.373,7.436 7.889,12.311 14.762,25.332 20.554,38.923 L 18.612,38.074 C 13.521,24.892 7.301,12.143 0,0" /></g><g
transform="matrix(1.3333333,0,0,-1.3333333,343.41892,154.09427)"
id="g180"><path
id="path182"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 0,0 c -1.23,-14.123 -3.684,-28.089 -7.295,-41.733 l 19.221,4.085 c 3.227,14.124 5.34,28.673 6.213,43.557 C 8.787,17.273 -1.509,27.827 -12.6,37.491 l -17.923,-7.98 C -19.559,20.585 -9.334,10.716 0,0" /></g><g
transform="matrix(1.3333333,0,0,-1.3333333,103.89026,154.0924)"
id="g184"><path
id="path186"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="M 0,0 C 9.318,10.697 19.524,20.551 30.469,29.466 L 12.548,37.444 C 1.477,27.793 -8.801,17.255 -18.138,5.909 c 0.872,-14.864 2.98,-29.393 6.2,-43.499 L 7.28,-41.675 C 3.677,-28.05 1.229,-14.103 0,0" /></g><g
transform="matrix(1.3333333,0,0,-1.3333333,149.6168,294.96213)"
id="g188"><path
id="path190"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="M 0,0 C -7.321,12.177 -13.554,24.964 -18.653,38.184 L -31.799,23.585 c 5.804,-13.628 12.69,-26.685 20.6,-39.028 14.036,-3.642 28.53,-6.139 43.367,-7.438 l 9.81,16.991 C 27.808,-5.121 13.756,-3.154 0,0" /></g></svg>

After

Width:  |  Height:  |  Size: 7.6 KiB

51
public/img/logo2.svg

@ -0,0 +1,51 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 377.95334 377.95334"
height="377.95334"
width="377.95334"
xml:space="preserve"
id="svg2"
version="1.1"><metadata
id="metadata8"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs6"><clipPath
id="clipPath18"
clipPathUnits="userSpaceOnUse"><path
id="path16"
d="M 0,283.465 H 283.465 V 0 H 0 Z" /></clipPath></defs><g
transform="matrix(1.3333333,0,0,-1.3333333,0,377.95333)"
id="g10"><g
id="g12"><g
clip-path="url(#clipPath18)"
id="g14"><g
transform="translate(141.7347,229.1228)"
id="g20"><path
id="path22"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 0,0 c 13.018,-5.541 25.524,-12.205 37.383,-19.879 l 2.053,19.527 C 26.921,7.161 13.747,13.687 0,19.08 -13.796,13.667 -27.015,7.114 -39.57,-0.433 l 2.053,-19.533 C -25.619,-12.256 -13.067,-5.562 0,0" /></g><g
transform="translate(197.2625,58.1423)"
id="g24"><path
id="path26"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 0,0 c -13.756,-3.155 -27.811,-5.12 -41.983,-5.889 l 9.81,-16.991 c 14.84,1.298 29.335,3.794 43.372,7.436 7.89,12.312 14.762,25.332 20.555,38.923 L 18.613,38.074 C 13.521,24.892 7.301,12.143 0,0" /></g><g
transform="translate(231.5555,163.7942)"
id="g28"><path
id="path30"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 0,0 c -1.231,-14.124 -3.684,-28.09 -7.295,-41.733 l 19.22,4.085 c 3.228,14.124 5.34,28.673 6.213,43.556 -9.351,11.365 -19.647,21.919 -30.739,31.583 l -17.923,-7.98 C -19.559,20.584 -9.334,10.716 0,0" /></g><g
transform="translate(51.909,163.7956)"
id="g32"><path
id="path34"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="M 0,0 C 9.318,10.697 19.524,20.551 30.468,29.465 L 12.547,37.444 C 1.476,27.793 -8.802,17.255 -18.138,5.908 c 0.872,-14.863 2.979,-29.393 6.2,-43.498 L 7.28,-41.675 C 3.676,-28.05 1.229,-14.103 0,0" /></g><g
transform="translate(86.2034,58.1433)"
id="g36"><path
id="path38"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="M 0,0 C -7.321,12.177 -13.553,24.963 -18.654,38.184 L -31.798,23.585 c 5.802,-13.629 12.689,-26.686 20.599,-39.029 14.035,-3.641 28.53,-6.139 43.366,-7.437 L 41.978,-5.89 C 27.808,-5.121 13.756,-3.155 0,0" /></g></g></g></g></svg>

After

Width:  |  Height:  |  Size: 3.0 KiB

7
public/lib/leaflet.markercluster/.gitignore vendored

@ -0,0 +1,7 @@
# Build Folders (you can keep bin if you'd like, to store dlls and pdbs)
bin
obj
# mstest test results
TestResults
node_modules

20
public/lib/leaflet.markercluster/.travis.yml

@ -0,0 +1,20 @@
sudo: false
language: node_js
node_js:
- 6
cache:
directories:
- "travis_phantomjs"
before_install:
- "export PHANTOMJS_VERSION=2.1.1"
- "hash -r"
- "phantomjs --version"
- "export PATH=$PWD/travis_phantomjs/phantomjs-$PHANTOMJS_VERSION-linux-x86_64/bin:$PATH"
- "hash -r"
- "phantomjs --version"
- "if [ $(phantomjs --version) != \"$PHANTOMJS_VERSION\" ]; then rm -rf $PWD/travis_phantomjs; mkdir -p $PWD/travis_phantomjs; fi"
- "hash -r"
- "if [ $(phantomjs --version) != \"$PHANTOMJS_VERSION\" ]; then wget https://github.com/Medium/phantomjs/releases/download/v$PHANTOMJS_VERSION/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2 -O $PWD/travis_phantomjs/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2; fi"
- "if [ $(phantomjs --version) != \"$PHANTOMJS_VERSION\" ]; then tar -xvf $PWD/travis_phantomjs/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2 -C $PWD/travis_phantomjs; fi"
- "hash -r"
- "phantomjs --version"

242
public/lib/leaflet.markercluster/CHANGELOG.md

@ -0,0 +1,242 @@
Leaflet.markercluster
=====================
(all changes without author notice are by [@danzel](https://github.com/danzel))
## 1.4.1 (2018-09-14)
### Bugfixes
* Better support stopping dragged markers from being clustered (by [@DerGuteWolf](https://github.com/DerGuteWolf)) [#909](https://github.com/Leaflet/Leaflet.markercluster/pull/909)
## 1.4.0 (2018-08-22)
Required leaflet version bumped to 1.3.1
### Improvements
* Tests run against leaflet 1.1.0+ [#863](https://github.com/Leaflet/Leaflet.markercluster/issues/863)
### Bugfixes
* Fix clearLayers not removing removed markers [#860](https://github.com/Leaflet/Leaflet.markercluster/issues/860)
* Remember opacity 0 correctly (by [@r-yanyo](https://github.com/r-yanyo)) [#890](https://github.com/Leaflet/Leaflet.markercluster/pull/890)
* Fix chunkedLoading LatLngBounds.intersects() (by [@boldtrn](https://github.com/boldtrn)) [#743](https://github.com/Leaflet/Leaflet.markercluster/issues/743) [#891](https://github.com/Leaflet/Leaflet.markercluster/pull/891)
## 1.3.0 (2018-01-19)
### Improvements
* Use Rollup for builds (by [@IvanSanchez](https://github.com/IvanSanchez)) [#769](https://github.com/Leaflet/Leaflet.markercluster/pull/769)
### Bugfixes
* Fix Spiderfier positioning for small markers (by [@ghybs](https://github.com/ghybs)) [#846](https://github.com/Leaflet/Leaflet.markercluster/pull/846)
* Fix anchor usage with latest leaflet version [#861](https://github.com/Leaflet/Leaflet.markercluster/issues/861)
## 1.2.0 (2017-11-06)
### Improvements
* Move `clusterPane` option in to `options` field (by [@ghybs](https://github.com/ghybs)) [#832](https://github.com/Leaflet/Leaflet.markercluster/pull/832)
### Bugfixes
* Fix very small `maxClusterRadius` hanging the browser (by [@lucaswerkmeister](https://github.com/lucaswerkmeister)) [#838](https://github.com/Leaflet/Leaflet.markercluster/pull/838)
## 1.1.0 (2017-08-27)
### Improvements
* Add `clusterPane` option to allow putting clusters in a different pane (by [@ckrahe](https://github.com/ckrahe)) [#819](https://github.com/Leaflet/Leaflet.markercluster/issues/819)
## 1.0.6 (2017-06-19)
### Bugfixes
* Fix some issues when used with non-integer zoom [#789](https://github.com/Leaflet/Leaflet.markercluster/issues/789)
* Change examples to use https (by [@ghybs](https://github.com/ghybs)) [#794](https://github.com/Leaflet/Leaflet.markercluster/pull/794)
## 1.0.5 (2017-04-26)
### Improvements
* Allow passing fitBounds options to zoomToBounds (by [@timkelty](https://github.com/timkelty)) [#779](https://github.com/Leaflet/Leaflet.markercluster/pull/779)
### Bugfixes
* Fixed bug where disableClusteringAtZoom being 0 is treated the same as null (by [@MrCheeze](https://github.com/MrCheeze)) [#773](https://github.com/Leaflet/Leaflet.markercluster/pull/773)
## 1.0.4 (2017-03-14)
### Bugfixes
* Fix errors removing a MarkerClusterGroup from the map during an animation [#758](https://github.com/Leaflet/Leaflet.markercluster/issues/758)
## 1.0.3 (2017-02-02)
### Bugfixes
* Fix moving markers while the MarkerClusterGroup is not on the map [#753](https://github.com/Leaflet/Leaflet.markercluster/issues/753)
## 1.0.2 (2017-01-27)
### Improvements
* Support `layeradd` and `layerremove` events [#647](https://github.com/Leaflet/Leaflet.markercluster/issues/647)
### Bugfixes
* Add support for maps with negative minZoom [#704](https://github.com/Leaflet/Leaflet.markercluster/issues/704)
* Fixed zoomToShowLayer() markers disappearing bug (by [@z3ut](https://github.com/z3ut)) [#739](https://github.com/Leaflet/Leaflet.markercluster/issues/739)
* Fix an issue when opening a popup inside of zoomToShowLayer
* If a marker is moved with an open popup on it, re-open the popup after moving it. [#651](https://github.com/Leaflet/Leaflet.markercluster/issues/651)
## 1.0.1 (2017-01-25)
### Improvements
* Add install and build steps with jake (by [@kazes](https://github.com/kazes)) [#733](https://github.com/Leaflet/Leaflet.markercluster/pull/733)
* Readme improvements (by [@ghybs](https://github.com/ghybs), [@bertyhell](https://github.com/bertyhell)) [#734](https://github.com/Leaflet/Leaflet.markercluster/pull/738), [#734](https://github.com/Leaflet/Leaflet.markercluster/pull/738
* Bump all examples to leaflet 1.0.3
### Bugfixes
* Fixed leaflet 1.0.2 bug where clearLayers would throw an exception (by [@marcianoviereck92](https://github.com/marcianoviereck92)) [#746](https://github.com/Leaflet/Leaflet.markercluster/pull/746)
## 1.0.0 (2016-10-03)
### Improvements
* Compatibility with Leaflet 1.0.0 (by [@danzel](https://githum.com/danzel), [@Eschon](https://github.com/Eschon), [@ghybs](https://github.com/ghybs), [@IvanSanchez](https://github.com/IvanSanchez))
* Support moving markers [#57](https://github.com/Leaflet/Leaflet.markercluster/issues/57)
* chunkedLoading option to keep browser more responsive during larging a load data set [#292](https://github.com/Leaflet/Leaflet.markercluster/issues/292)
* maxClusterRadius can be a function (by [@Schwanksta](https://github.com/Schwanksta)) [#298](https://github.com/Leaflet/Leaflet.markercluster/issues/298)
* Spiderfy without zooming when all markers at same location (by [@rdenniston](https://github.com/rdenniston), [@ghybs](https://github.com/ghybs)) [#415](https://github.com/Leaflet/Leaflet.markercluster/issues/415), [#606](https://github.com/Leaflet/Leaflet.markercluster/issues/606)
* On becoming visible, markers retain their original opacity. (by [@IvanSanchez](https://github.com/IvanSanchez)) [#444](https://github.com/Leaflet/Leaflet.markercluster/issues/444)
* Spiderleg Polyline options (by [@mikeatlas](https://github.com/mikeatlas)) [#466](https://github.com/Leaflet/Leaflet.markercluster/issues/466)
* Extra methods to allow refreshing cluster icons (by [@ghybs](https://github.com/ghybs)) [#564](https://github.com/Leaflet/Leaflet.markercluster/issues/564)
* Ability to disable animations (by [@ghybs](https://github.com/ghybs)) [#578](https://github.com/Leaflet/Leaflet.markercluster/issues/578)
* Optimized performance of bulk addLayers and removeLayers (by [@ghybs](https://github.com/ghybs)) [#584](https://github.com/Leaflet/Leaflet.markercluster/issues/584)
* Replaced spiderfy legs animation from SMIL to CSS transition (by [@ghybs](https://github.com/ghybs)) [#585](https://github.com/Leaflet/Leaflet.markercluster/issues/585)
* Provide more detailed context information on the spiderfied event (by [@evanvosberg](https://github.com/evanvosberg)) [#421](https://github.com/Leaflet/Leaflet.markercluster/issues/421)
* Add unspiderfied event
* Readme updates (by [@ghybs](https://github.com/ghybs), [@tomchadwin](https://github.com/tomchadwin) [@Cyrille37](https://github.com/Cyrille37) [@franckl](https://github.com/franckl) [@mikeatlas](https://github.com/mikeatlas)
[@rdenniston](https://github.com/rdenniston) [@maackle](https://github.com/maackle) [@fureigh](https://github.com/fureigh) [@Wildhoney](https://github.com/Wildhoney) [@Schwanksta](https://github.com/Schwanksta) [@frankrowe](https://github.com/frankrowe))
* Improve adding and removing nested LayerGroups (by [@ghybs](https://github.com/ghybs)) [#624](https://github.com/Leaflet/Leaflet.markercluster/pull/624)
* Add public unspiderfy method (by [@zverev](https://github.com/zverev)) [#617](https://github.com/Leaflet/Leaflet.markercluster/pull/617)
* Optimized performance of bulk add with complex icon create function (by [@mlazowik](https://github.com/mlazowik)) [#697](https://github.com/Leaflet/Leaflet.markercluster/pull/697)
* Remove leaflet from peerDependencies (by [@tyleralves](https://github.com/tyleralves)) [#703](https://github.com/Leaflet/Leaflet.markercluster/pull/703)
* Simplified _recursively (by [@ghybs](https://github.com/ghybs)) [#656](https://github.com/Leaflet/Leaflet.markercluster/pull/656)
### Bugfixes
* Fix getBounds when removeOutsideVisibleBounds: false is set. [#321](https://github.com/Leaflet/Leaflet.markercluster/issues/321)
* Fix zoomToShowLayer fails after initial spiderfy [#286](https://github.com/Leaflet/Leaflet.markercluster/issues/286)
* Fix cluster not disappearing on Android [#344](https://github.com/Leaflet/Leaflet.markercluster/issues/344)
* Fix RemoveLayers() when spiderified (by [@Grsmto](https://github.com/Grsmto)) [#358](https://github.com/Leaflet/Leaflet.markercluster/issues/358)
* Remove lines from map when removing cluster (by [@olive380](https://github.com/olive380)) [#532](https://github.com/Leaflet/Leaflet.markercluster/issues/532)
* Fix getConvexHull when all markers are located at same latitude (by [@olive380](https://github.com/olive380)) [#533](https://github.com/Leaflet/Leaflet.markercluster/issues/533)
* Fix removeLayers when cluster is not on the map (by [@eschon](https://github.com/eschon)) [#556](https://github.com/Leaflet/Leaflet.markercluster/issues/556)
* Improved zoomToShowLayer with callback check (by [@ghybs](https://github.com/ghybs)) [#572](https://github.com/Leaflet/Leaflet.markercluster/issues/572)
* Improved reliability of RefreshSpec test suite for PhantomJS (by [@ghybs](https://github.com/ghybs)) [#577](https://github.com/Leaflet/Leaflet.markercluster/issues/577)
* Corrected effect of removeOutsideVisibleBounds option (by [@ghybs](https://github.com/ghybs)) [#575](https://github.com/Leaflet/Leaflet.markercluster/issues/575)
* Fix getLayer when provided a string [#531](https://github.com/Leaflet/Leaflet.markercluster/issues/531)
* Documentation improvements (by [@ghybs](https://github.com/ghybs)) [#579](https://github.com/Leaflet/Leaflet.markercluster/issues/579)
* Correct _getExpandedVisibleBounds for Max Latitude (by [@ghybs](https://github.com/ghybs)) [#587](https://github.com/Leaflet/Leaflet.markercluster/issues/587)
* Correct unspiderfy vector (by [@ghybs](https://github.com/ghybs)) [#604](https://github.com/Leaflet/Leaflet.markercluster/issues/604)
* Remove "leaflet-cluster-anim" class on map remove while spiderfied (by [@ghybs](https://github.com/ghybs)) [#607](https://github.com/Leaflet/Leaflet.markercluster/issues/607)
* Fix disableClusteringAtZoom maxZoom troubles (by [@OriginalSin](https://github.com/OriginalSin)) [#609](https://github.com/Leaflet/Leaflet.markercluster/issues/609)
* Fix clusters not disappearing when they were near the edge on mobile (by [@ghybs](https://github.com/ghybs)) [#529](https://github.com/Leaflet/Leaflet.markercluster/issues/529)
* Remove leaflet from dependencies (by [@ghybs](https://github.com/ghybs)) [#639](https://github.com/Leaflet/Leaflet.markercluster/issues/639)
* Fix interaction between zoomOrSpiderfy and disableClusteringAtZoom (by [@ghybs](https://github.com/ghybs)) [#633](https://github.com/Leaflet/Leaflet.markercluster/issues/633) [#648](https://github.com/Leaflet/Leaflet.markercluster/issues/648)
## 0.4 (2013-12-19)
### Improvements
* Fix Quick Zoom in/out causing everything to disappear in Firefox (Reported by [@paulovieira](https://github.com/paulovieira)) [#140](https://github.com/Leaflet/Leaflet.markercluster/issues/140)
* Slow the expand/contract animation down from 200ms to 300ms
### Bugfixes
* Fix some cases zoomToShowLayer wouldn't work (Reported by [@absemetov](https://github.com/absemetov)) [#203](https://github.com/Leaflet/Leaflet.markercluster/issues/203) [#228](https://github.com/Leaflet/Leaflet.markercluster/issues/228) [#286](https://github.com/Leaflet/Leaflet.markercluster/issues/286)
## 0.3 (2013-12-18)
### Improvements
* Work better with custom projections (by [@andersarstrand](https://github.com/andersarstrand)) [#74](https://github.com/Leaflet/Leaflet.markercluster/issues/74)
* Add custom getBounds that works (Reported by [@2803media](https://github.com/2803media))
* Allow spacing spiderfied icons further apart (Reported by [@stevevance](https://github.com/stevevance)) [#100](https://github.com/Leaflet/Leaflet.markercluster/issues/100)
* Add custom eachLayer that works (Reported by [@cilogi](https://github.com/cilogi)) [#102](https://github.com/Leaflet/Leaflet.markercluster/issues/102)
* Add an option (removeOutsideVisibleBounds) to prevent removing clusters that are outside of the visible bounds (by [@wildhoney](https://github.com/wildhoney)) [#103](https://github.com/Leaflet/Leaflet.markercluster/issues/103)
* Add getBounds method to cluster (Reported by [@nderambure](https://github.com/nderambure)) [#88](https://github.com/Leaflet/Leaflet.markercluster/issues/88)
* Lots of unit tests
* Support having Circle / CircleMarker as child markers
* Add factory methods (Reported by [@mourner](https://github.com/mourner)) [#21](https://github.com/Leaflet/Leaflet.markercluster/issues/21)
* Add getVisibleParent method to allow getting the visible parent cluster or the marker if it is visible. (By [@littleiffel](https://github.com/littleiffel)) [#102](https://github.com/Leaflet/Leaflet.markercluster/issues/102)
* Allow adding non-clusterable things to a MarkerClusterGroup, we don't cluster them. (Reported by [@benbalter](https://github.com/benbalter)) [#195](https://github.com/Leaflet/Leaflet.markercluster/issues/195)
* removeLayer supports taking a FeatureGroup (Reported by [@pabloalcaraz](https://github.com/pabloalcaraz)) [#236](https://github.com/Leaflet/Leaflet.markercluster/issues/236)
* DistanceGrid tests, QuickHull tests and improvements (By [@tmcw](https://github.com/tmcw)) [#247](https://github.com/Leaflet/Leaflet.markercluster/issues/247) [#248](https://github.com/Leaflet/Leaflet.markercluster/issues/248) [#249](https://github.com/Leaflet/Leaflet.markercluster/issues/249)
* Implemented getLayers (Reported by [@metajungle](https://github.com/metajungle)) [#222](https://github.com/Leaflet/Leaflet.markercluster/issues/222)
* zoomToBounds now only zooms in as far as it needs to to get all of the markers on screen if this is less zoom than zooming to the actual bounds would be (Reported by [@adamyonk](https://github.com/adamyonk)) [#185](https://github.com/Leaflet/Leaflet.markercluster/issues/185)
* Keyboard accessibility improvements (By [@Zombienaute](https://github.com/Zombienaute)) [#273](https://github.com/Leaflet/Leaflet.markercluster/issues/273)
* IE Specific css in the default styles is no longer a separate file (By [@frankrowe](https://github.com/frankrowe)) [#280](https://github.com/Leaflet/Leaflet.markercluster/issues/280)
* Improve usability with small maps (Reported by [@JSCSJSCS](https://github.com/JSCSJSCS)) [#144](https://github.com/Leaflet/Leaflet.markercluster/issues/144)
* Implement FeatureGroup.getLayer (Reported by [@newmanw](https://github.com/newmanw)) [#244](https://github.com/Leaflet/Leaflet.markercluster/issues/244)
### Bugfixes
* Fix singleMarkerMode when you aren't on the map (by [@duncanparkes](https://github.com/duncanparkes)) [#77](https://github.com/Leaflet/Leaflet.markercluster/issues/77)
* Fix clearLayers when you aren't on the map (by [@duncanparkes](https://github.com/duncanparkes)) [#79](https://github.com/Leaflet/Leaflet.markercluster/issues/79)
* IE10 Bug fix (Reported by [@theLundquist](https://github.com/theLundquist)) [#86](https://github.com/Leaflet/Leaflet.markercluster/issues/86)
* Fixes for hasLayer after removing a layer (Reported by [@cvisto](https://github.com/cvisto)) [#44](https://github.com/Leaflet/Leaflet.markercluster/issues/44)
* Fix clearLayers not unsetting __parent of the markers, preventing them from being re-added. (Reported by [@apuntovanini](https://github.com/apuntovanini)) [#99](https://github.com/Leaflet/Leaflet.markercluster/issues/99)
* Fix map.removeLayer(markerClusterGroup) not working (Reported by [@Driklyn](https://github.com/Driklyn)) [#108](https://github.com/Leaflet/Leaflet.markercluster/issues/108)
* Fix map.addLayers not updating cluster icons (Reported by [@Driklyn](https://github.com/Driklyn)) [#114](https://github.com/Leaflet/Leaflet.markercluster/issues/114)
* Fix spiderfied clusters breaking if a marker is added to them (Reported by [@Driklyn](https://github.com/Driklyn)) [#114](https://github.com/Leaflet/Leaflet.markercluster/issues/114)
* Don't show coverage for spiderfied clusters as it will be wrong. (Reported by [@ajbeaven](https://github.com/ajbeaven)) [#95](https://github.com/Leaflet/Leaflet.markercluster/issues/95)
* Improve zoom in/out immediately making all everything disappear, still issues in Firefox [#140](https://github.com/Leaflet/Leaflet.markercluster/issues/140)
* Fix animation not stopping with only one marker. (Reported by [@Driklyn](https://github.com/Driklyn)) [#146](https://github.com/Leaflet/Leaflet.markercluster/issues/146)
* Various fixes for new leaflet (Reported by [@PeterAronZentai](https://github.com/PeterAronZentai)) [#159](https://github.com/Leaflet/Leaflet.markercluster/issues/159)
* Fix clearLayers when we are spiderfying (Reported by [@skullbooks](https://github.com/skullbooks)) [#162](https://github.com/Leaflet/Leaflet.markercluster/issues/162)
* Fix removing layers in certain situations (Reported by [@bpavot](https://github.com/bpavot)) [#160](https://github.com/Leaflet/Leaflet.markercluster/issues/160)
* Support calling hasLayer with null (by [@l0c0luke](https://github.com/l0c0luke)) [#170](https://github.com/Leaflet/Leaflet.markercluster/issues/170)
* Lots of fixes for removing a MarkerClusterGroup from the map (Reported by [@annetdeboer](https://github.com/annetdeboer)) [#200](https://github.com/Leaflet/Leaflet.markercluster/issues/200)
* Throw error when being added to a map with no maxZoom.
* Fixes for markers not appearing after a big zoom (Reported by [@arnoldbird](https://github.com/annetdeboer)) [#216](https://github.com/Leaflet/Leaflet.markercluster/issues/216) (Reported by [@mathilde-pellerin](https://github.com/mathilde-pellerin)) [#260](https://github.com/Leaflet/Leaflet.markercluster/issues/260)
* Fix coverage polygon not being removed when a MarkerClusterGroup is removed (Reported by [@ZeusTheTrueGod](https://github.com/ZeusTheTrueGod)) [#245](https://github.com/Leaflet/Leaflet.markercluster/issues/245)
* Fix getVisibleParent when no parent is visible (Reported by [@ajbeaven](https://github.com/ajbeaven)) [#265](https://github.com/Leaflet/Leaflet.markercluster/issues/265)
* Fix spiderfied markers not hiding on a big zoom (Reported by [@Vaesive](https://github.com/Vaesive)) [#268](https://github.com/Leaflet/Leaflet.markercluster/issues/268)
* Fix clusters not hiding on a big zoom (Reported by [@versusvoid](https://github.com/versusvoid)) [#281](https://github.com/Leaflet/Leaflet.markercluster/issues/281)
* Don't fire multiple clustermouseover/off events due to child divs in the cluster marker (Reported by [@heidemn](https://github.com/heidemn)) [#252](https://github.com/Leaflet/Leaflet.markercluster/issues/252)
## 0.2 (2012-10-11)
### Improvements
* Add addLayers/removeLayers bulk add and remove functions that perform better than the individual methods
* Allow customising the polygon generated for showing the area a cluster covers (by [@yohanboniface](https://github.com/yohanboniface)) [#68](https://github.com/Leaflet/Leaflet.markercluster/issues/68)
* Add zoomToShowLayer method to zoom down to a marker then call a callback once it is visible
* Add animateAddingMarkers to allow disabling animations caused when adding/removing markers
* Add hasLayer
* Pass the L.MarkerCluster to iconCreateFunction to give more flexibility deciding the icon
* Make addLayers support geojson layers
* Allow disabling clustering at a given zoom level
* Allow styling markers that are added like they were clusters of size 1
### Bugfixes
* Support when leaflet is configured to use canvas rather than SVG
* Fix some potential crashes in zoom handlers
* Tidy up when we are removed from the map
## 0.1 (2012-08-16)
Initial Release!

70
public/lib/leaflet.markercluster/CONTRIBUTING.md

@ -0,0 +1,70 @@
Contributing to Leaflet.MarkerCluster
=====================================
1. [Reporting Bugs](#reporting-bugs)
2. [Contributing Code](#contributing-code)
3. [Building](#building)
4. [Testing](#testing)
## Reporting Bugs
Before reporting a bug on the project's [issues page](https://github.com/Leaflet/Leaflet.markercluster/issues),
first make sure that your issue is caused by Leaflet.MarkerCluster, not your application code
(e.g. passing incorrect arguments to methods, etc.).
Second, search the already reported issues for similar cases,
and if it's already reported, just add any additional details in the comments.
After you've made sure that you've found a new Leaflet.markercluster bug,
here are some tips for creating a helpful report that will make fixing it much easier and quicker:
* Write a **descriptive, specific title**. Bad: *Problem with polylines*. Good: *Doing X in IE9 causes Z*.
* Include **browser, OS and Leaflet version** info in the description.
* Create a **simple test case** that demonstrates the bug (e.g. using [JSFiddle](http://jsfiddle.net/) or [JS Bin](http://jsbin.com/)).
* Check whether the bug can be reproduced in **other browsers**.
* Check if the bug occurs in the stable version, master, or both.
* *Bonus tip:* if the bug only appears in the master version but the stable version is fine,
use `git bisect` to find the exact commit that introduced the bug.
If you just want some help with your project,
try asking [on the Leaflet forum](https://groups.google.com/forum/#!forum/leaflet-js) instead.
## Contributing Code
### Considerations for Accepting Patches
While we happily accept patches, we're also committed to keeping Leaflet simple, lightweight and blazingly fast.
So bugfixes, performance optimizations and small improvements that don't add a lot of code
are much more likely to get accepted quickly.
Before sending a pull request with a new feature, check if it's been discussed before already
(either on [GitHub issues](https://github.com/Leaflet/Leaflet/issues)
or [Leaflet UserVoice](http://leaflet.uservoice.com/)),
and ask yourself two questions:
1. Are you sure that this new feature is important enough to justify its presence in the Leaflet core?
Or will it look better as a plugin in a separate repository?
2. Is it written in a simple, concise way that doesn't add bulk to the codebase?
If your feature or API improvement did get merged into master,
please consider submitting another pull request with the corresponding [documentation update](#improving-documentation).
## Building
Install the dependencies:
```
npm install -g jake
npm install
```
Then to build:
```
jake
```
Output will be in the ```dist/``` directory
## Testing
To run unit tests:
```
jake test
```

23
public/lib/leaflet.markercluster/ISSUE_TEMPLATE.md

@ -0,0 +1,23 @@
- [ ] I'm reporting a bug, not asking for help
- [ ] I'm sure this is a Leaflet.MarkerCluster code issue, not an issue with my own code nor with the framework I'm using (Cordova, Ionic, Angular, React…)
- [ ] I've searched through the issues to make sure it's not yet reported
----
## How to reproduce
- Leaflet version I'm using:
- Leaflet.MarkerCluster version I'm using:
- Browser (with version) I'm using:
- OS/Platform (with version) I'm using:
- step 1
- step 2
## What behaviour I'm expecting and which behaviour I'm seeing
## Minimal example reproducing the issue
- [ ] this example is as simple as possible
- [ ] this example does not rely on any third party code
Using http://leafletjs.com/edit.html or any other jsfiddle-like site.

86
public/lib/leaflet.markercluster/Jakefile.js

@ -0,0 +1,86 @@
/*
Leaflet.markercluster building, testing and linting scripts.
To use, install Node, then run the following commands in the project root:
npm install -g jake
npm install
To check the code for errors and build Leaflet from source, run "jake".
To run the tests, run "jake test".
For a custom build, open build/build.html in the browser and follow the instructions.
*/
var path = require('path');
desc('Check Leaflet.markercluster source for errors with JSHint');
task('lint', function(){
jake.exec('jshint', {
printStdout: true
}, function () {
console.log('\tCheck passed.\n');
complete();
});
});
desc('Combine Leaflet.markercluster source files');
task('build', ['lint'], function(){
jake.exec('npm run-script rollup', function() { console.log('Rolled up.'); });
});
desc('Compress bundled files');
task('uglify', ['build'], function(){
jake.exec('npm run-script uglify', function() { console.log('Uglyfied.'); });
});
desc('Run PhantomJS tests');
task('test', ['lint'], function() {
var karma = require('karma'),
testConfig = {configFile : path.join(__dirname, './spec/karma.conf.js')};
testConfig.browsers = ['PhantomJS'];
function isArgv(optName) {
return process.argv.indexOf(optName) !== -1;
}
if (isArgv('--chrome')) {
testConfig.browsers.push('Chrome');
}
if (isArgv('--safari')) {
testConfig.browsers.push('Safari');
}
if (isArgv('--ff')) {
testConfig.browsers.push('Firefox');
}
if (isArgv('--ie')) {
testConfig.browsers.push('IE');
}
if (isArgv('--cov')) {
testConfig.preprocessors = {
'src/**/*.js': 'coverage'
};
testConfig.coverageReporter = {
type : 'html',
dir : 'coverage/'
};
testConfig.reporters = ['coverage'];
}
console.log('Running tests...');
var server = new karma.Server(testConfig, function(exitCode) {
if (!exitCode) {
console.log('\tTests ran successfully.\n');
complete();
} else {
process.exit(exitCode);
}
});
server.start();
});
task('default', ['build', 'uglify']);

20
public/lib/leaflet.markercluster/MIT-LICENCE.txt

@ -0,0 +1,20 @@
Copyright 2012 David Leaver
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

292
public/lib/leaflet.markercluster/README.md

@ -0,0 +1,292 @@
Leaflet.markercluster
=====================
Provides Beautiful Animated Marker Clustering functionality for [Leaflet](http://leafletjs.com), a JS library for interactive maps.
*Requires Leaflet 1.0.0*
![cluster map example](example/map.png)
For a Leaflet 0.7 compatible version, [use the leaflet-0.7 branch](https://github.com/Leaflet/Leaflet.markercluster/tree/leaflet-0.7)<br>
For a Leaflet 0.5 compatible version, [Download b128e950](https://github.com/Leaflet/Leaflet.markercluster/archive/b128e950d8f5d7da5b60bd0aa9a88f6d3dd17c98.zip)<br>
For a Leaflet 0.4 compatible version, [Download the 0.2 release](https://github.com/Leaflet/Leaflet.markercluster/archive/0.2.zip)
<!---
TOC created with gh-md-toc
https://github.com/ekalinin/github-markdown-toc
removed link to h1 and indented back 2 spaces all links.
-->
## Table of Contents
* [Using the plugin](#using-the-plugin)
* [Building, testing and linting scripts](#building-testing-and-linting-scripts)
* [Examples](#examples)
* [Usage](#usage)
* [Options](#options)
* [Defaults](#defaults)
* [Customising the Clustered Markers](#customising-the-clustered-markers)
* [All Options](#all-options)
* [Enabled by default (boolean options)](#enabled-by-default-boolean-options)
* [Other options](#other-options)
* [Chunked addLayers options](#chunked-addlayers-options)
* [Events](#events)
* [Additional MarkerClusterGroup Events](#additional-markerclustergroup-events)
* [Methods](#methods)
* [Group methods](#group-methods)
* [Adding and removing Markers](#adding-and-removing-markers)
* [Bulk adding and removing Markers](#bulk-adding-and-removing-markers)
* [Getting the visible parent of a marker](#getting-the-visible-parent-of-a-marker)
* [Refreshing the clusters icon](#refreshing-the-clusters-icon)
* [Other Group Methods](#other-group-methods)
* [Clusters methods](#clusters-methods)
* [Getting the bounds of a cluster](#getting-the-bounds-of-a-cluster)
* [Zooming to the bounds of a cluster](#zooming-to-the-bounds-of-a-cluster)
* [Other clusters methods](#other-clusters-methods)
* [Handling LOTS of markers](#handling-lots-of-markers)
* [License](#license)
* [Sub-plugins](#sub-plugins)
## Using the plugin
Include the plugin CSS and JS files on your page after Leaflet files, using your method of choice:
* [Download the `v1.4.1` release](https://github.com/Leaflet/Leaflet.markercluster/archive/v1.4.1.zip)
* Use unpkg CDN: `https://unpkg.com/leaflet.markercluster@1.4.1/dist/`
* Install with npm: `npm install leaflet.markercluster`
In each case, use files in the `dist` folder:
* `MarkerCluster.css`
* `MarkerCluster.Default.css` (not needed if you use your own `iconCreateFunction` instead of the default one)
* `leaflet.markercluster.js` (or `leaflet.markercluster-src.js` for the non-minified version)
### Building, testing and linting scripts
Install jake `npm install -g jake` then run `npm install`
* To check the code for errors and build Leaflet from source, run `jake`.
* To run the tests, run `jake test`.
### Examples
See the included examples for usage.
The [realworld example](https://leaflet.github.io/Leaflet.markercluster/example/marker-clustering-realworld.388.html) is a good place to start, it uses all of the defaults of the clusterer.
Or check out the [custom example](https://leaflet.github.io/Leaflet.markercluster/example/marker-clustering-custom.html) for how to customise the behaviour and appearance of the clusterer
### Usage
Create a new MarkerClusterGroup, add your markers to it, then add it to the map
```javascript
var markers = L.markerClusterGroup();
markers.addLayer(L.marker(getRandomLatLng(map)));
... Add more layers ...
map.addLayer(markers);
```
## Options
### Defaults
By default the Clusterer enables some nice defaults for you:
* **showCoverageOnHover**: When you mouse over a cluster it shows the bounds of its markers.
* **zoomToBoundsOnClick**: When you click a cluster we zoom to its bounds.
* **spiderfyOnMaxZoom**: When you click a cluster at the bottom zoom level we spiderfy it so you can see all of its markers. (*Note: the spiderfy occurs at the current zoom level if all items within the cluster are still clustered at the maximum zoom level or at zoom specified by `disableClusteringAtZoom` option*)
* **removeOutsideVisibleBounds**: Clusters and markers too far from the viewport are removed from the map for performance.
* **spiderLegPolylineOptions**: Allows you to specify [PolylineOptions](http://leafletjs.com/reference.html#polyline-options) to style spider legs. By default, they are `{ weight: 1.5, color: '#222', opacity: 0.5 }`.
You can disable any of these as you want in the options when you create the MarkerClusterGroup:
```javascript
var markers = L.markerClusterGroup({
spiderfyOnMaxZoom: false,
showCoverageOnHover: false,
zoomToBoundsOnClick: false
});
```
### Customising the Clustered Markers
As an option to MarkerClusterGroup you can provide your own function for creating the Icon for the clustered markers.
The default implementation changes color at bounds of 10 and 100, but more advanced uses may require customising this.
You do not need to include the .Default css if you go this way.
You are passed a MarkerCluster object, you'll probably want to use `getChildCount()` or `getAllChildMarkers()` to work out the icon to show.
```javascript
var markers = L.markerClusterGroup({
iconCreateFunction: function(cluster) {
return L.divIcon({ html: '<b>' + cluster.getChildCount() + '</b>' });
}
});
```
Check out the [custom example](https://leaflet.github.io/Leaflet.markercluster/example/marker-clustering-custom.html) for an example of this.
If you need to update the clusters icon (e.g. they are based on markers real-time data), use the method [refreshClusters()](#refreshing-the-clusters-icon).
### All Options
#### Enabled by default (boolean options)
* **showCoverageOnHover**: When you mouse over a cluster it shows the bounds of its markers.
* **zoomToBoundsOnClick**: When you click a cluster we zoom to its bounds.
* **spiderfyOnMaxZoom**: When you click a cluster at the bottom zoom level we spiderfy it so you can see all of its markers. (*Note: the spiderfy occurs at the current zoom level if all items within the cluster are still clustered at the maximum zoom level or at zoom specified by `disableClusteringAtZoom` option*).
* **removeOutsideVisibleBounds**: Clusters and markers too far from the viewport are removed from the map for performance.
* **animate**: Smoothly split / merge cluster children when zooming and spiderfying. If `L.DomUtil.TRANSITION` is false, this option has no effect (no animation is possible).
#### Other options
* **animateAddingMarkers**: If set to true (and `animate` option is also true) then adding individual markers to the MarkerClusterGroup after it has been added to the map will add the marker and animate it into the cluster. Defaults to false as this gives better performance when bulk adding markers. addLayers does not support this, only addLayer with individual Markers.
* **disableClusteringAtZoom**: If set, at this zoom level and below, markers will not be clustered. This defaults to disabled. [See Example](https://leaflet.github.io/Leaflet.markercluster/example/marker-clustering-realworld-maxzoom.388.html). Note: you may be interested in disabling `spiderfyOnMaxZoom` option when using `disableClusteringAtZoom`.
* **maxClusterRadius**: The maximum radius that a cluster will cover from the central marker (in pixels). Default 80. Decreasing will make more, smaller clusters. You can also use a function that accepts the current map zoom and returns the maximum cluster radius in pixels.
* **polygonOptions**: Options to pass when creating the L.Polygon(points, options) to show the bounds of a cluster. Defaults to empty, which lets Leaflet use the [default Path options](http://leafletjs.com/reference.html#path-options).
* **singleMarkerMode**: If set to true, overrides the icon for all added markers to make them appear as a 1 size cluster. Note: the markers are not replaced by cluster objects, only their icon is replaced. Hence they still react to normal events, and option `disableClusteringAtZoom` does not restore their previous icon (see [#391](https://github.com/Leaflet/Leaflet.markercluster/issues/391)).
* **spiderLegPolylineOptions**: Allows you to specify [PolylineOptions](http://leafletjs.com/reference.html#polyline-options) to style spider legs. By default, they are `{ weight: 1.5, color: '#222', opacity: 0.5 }`.
* **spiderfyDistanceMultiplier**: Increase from 1 to increase the distance away from the center that spiderfied markers are placed. Use if you are using big marker icons (Default: 1).
* **iconCreateFunction**: Function used to create the cluster icon. See [the default implementation](https://github.com/Leaflet/Leaflet.markercluster/blob/15ed12654acdc54a4521789c498e4603fe4bf781/src/MarkerClusterGroup.js#L542) or the [custom example](https://leaflet.github.io/Leaflet.markercluster/example/marker-clustering-custom.html).
* **clusterPane**: Map pane where the cluster icons will be added. Defaults to L.Marker's default (currently 'markerPane'). [See the pane example](https://leaflet.github.io/Leaflet.markercluster/example/marker-clustering-pane.html).
#### Chunked addLayers options
Options for the [addLayers](#bulk-adding-and-removing-markers) method. See [#357](https://github.com/Leaflet/Leaflet.markercluster/issues/357) for explanation on how the chunking works.
* **chunkedLoading**: Boolean to split the addLayer**s** processing in to small intervals so that the page does not freeze.
* **chunkInterval**: Time interval (in ms) during which addLayers works before pausing to let the rest of the page process. In particular, this prevents the page from freezing while adding a lot of markers. Defaults to 200ms.
* **chunkDelay**: Time delay (in ms) between consecutive periods of processing for addLayers. Default to 50ms.
* **chunkProgress**: Callback function that is called at the end of each chunkInterval. Typically used to implement a progress indicator, e.g. [code in RealWorld 50k](https://github.com/Leaflet/Leaflet.markercluster/blob/master/example/marker-clustering-realworld.50000.html#L33-L49). Defaults to null. Arguments:
1. Number of processed markers
2. Total number of markers being added
3. Elapsed time (in ms)
## Events
Leaflet events like `click`, `mouseover`, etc. are just related to _Markers_ in the cluster.
To receive events for clusters, listen to `'cluster' + '<eventName>'`, ex: `clusterclick`, `clustermouseover`, `clustermouseout`.
Set your callback up as follows to handle both cases:
```javascript
markers.on('click', function (a) {
console.log('marker ' + a.layer);
});
markers.on('clusterclick', function (a) {
// a.layer is actually a cluster
console.log('cluster ' + a.layer.getAllChildMarkers().length);
});
```
### Additional MarkerClusterGroup Events
- **animationend**: Fires when marker clustering/unclustering animation has completed
- **spiderfied**: Fires when overlapping markers get spiderified (Contains ```cluster``` and ```markers``` attributes)
- **unspiderfied**: Fires when overlapping markers get unspiderified (Contains ```cluster``` and ```markers``` attributes)
## Methods
### Group methods
#### Adding and removing Markers
`addLayer`, `removeLayer` and `clearLayers` are supported and they should work for most uses.
#### Bulk adding and removing Markers
`addLayers` and `removeLayers` are bulk methods for adding and removing markers and should be favoured over the single versions when doing bulk addition/removal of markers. Each takes an array of markers. You can use [dedicated options](#chunked-addlayers-options) to fine-tune the behaviour of `addLayers`.
These methods extract non-group layer children from Layer Group types, even deeply nested. _However_, be noted that:
- `chunkProgress` jumps backward when `addLayers` finds a group (since appending its children to the input array makes the total increase).
- Groups are not actually added into the MarkerClusterGroup, only their non-group child layers. Therfore, `hasLayer` method will return `true` for non-group child layers, but `false` on any (possibly parent) Layer Group types.
If you are removing a lot of markers it will almost definitely be better to call `clearLayers` then call `addLayers` to add the markers you don't want to remove back in. See [#59](https://github.com/Leaflet/Leaflet.markercluster/issues/59#issuecomment-9320628) for details.
#### Getting the visible parent of a marker
If you have a marker in your MarkerClusterGroup and you want to get the visible parent of it (Either itself or a cluster it is contained in that is currently visible on the map).
This will return null if the marker and its parent clusters are not visible currently (they are not near the visible viewpoint)
```javascript
var visibleOne = markerClusterGroup.getVisibleParent(myMarker);
console.log(visibleOne.getLatLng());
```
#### Refreshing the clusters icon
If you have [customized](#customising-the-clustered-markers) the clusters icon to use some data from the contained markers, and later that data changes, use this method to force a refresh of the cluster icons.
You can use the method:
- without arguments to force all cluster icons in the Marker Cluster Group to be re-drawn.
- with an array or a mapping of markers to force only their parent clusters to be re-drawn.
- with an L.LayerGroup. The method will look for all markers in it. Make sure it contains only markers which are also within this Marker Cluster Group.
- with a single marker.
```javascript
markers.refreshClusters();
markers.refreshClusters([myMarker0, myMarker33]);
markers.refreshClusters({id_0: myMarker0, id_any: myMarker33});
markers.refreshClusters(myLayerGroup);
markers.refreshClusters(myMarker);
```
The plugin also adds a method on L.Marker to easily update the underlying icon options and refresh the icon.
If passing a second argument that evaluates to `true`, the method will also trigger a `refreshCluster` on the parent MarkerClusterGroup for that single marker.
```javascript
// Use as many times as required to update markers,
// then call refreshClusters once finished.
for (i in markersSubArray) {
markersSubArray[i].refreshIconOptions(newOptionsMappingArray[i]);
}
markers.refreshClusters(markersSubArray);
// If updating only one marker, pass true to
// refresh this marker's parent clusters right away.
myMarker.refreshIconOptions(optionsMap, true);
```
#### Other Group Methods
* **hasLayer**(layer): Returns true if the given layer (marker) is in the MarkerClusterGroup.
* **zoomToShowLayer**(layer, callback): Zooms to show the given marker (spiderfying if required), calls the callback when the marker is visible on the map.
### Clusters methods
The following methods can be used with clusters (not the group). They are typically used for event handling.
#### Getting the bounds of a cluster
When you receive an event from a cluster you can query it for the bounds.
```javascript
markers.on('clusterclick', function (a) {
var latLngBounds = a.layer.getBounds();
});
```
You can also query for the bounding convex polygon.
See [example/marker-clustering-convexhull.html](https://leaflet.github.io/Leaflet.markercluster/example/marker-clustering-convexhull.html) for a working example.
```javascript
markers.on('clusterclick', function (a) {
map.addLayer(L.polygon(a.layer.getConvexHull()));
});
```
#### Zooming to the bounds of a cluster
When you receive an event from a cluster you can zoom to its bounds in one easy step.
If all of the markers will appear at a higher zoom level, that zoom level is zoomed to instead.
`zoomToBounds` takes an optional argument to pass [options to the resulting `fitBounds` call](http://leafletjs.com/reference.html#map-fitboundsoptions).
See [marker-clustering-zoomtobounds.html](https://leaflet.github.io/Leaflet.markercluster/example/marker-clustering-zoomtobounds.html) for a working example.
```javascript
markers.on('clusterclick', function (a) {
a.layer.zoomToBounds({padding: [20, 20]});
});
```
#### Other clusters methods
* **getChildCount**: Returns the total number of markers contained within that cluster.
* **getAllChildMarkers(storage: array | undefined, ignoreDraggedMarker: boolean | undefined)**: Returns an array of all markers contained within this cluster (storage will be used if provided). If ignoreDraggedMarker is true and there is currently a marker dragged, the dragged marker will not be included in the array.
* **spiderfy**: Spiderfies the child markers of this cluster
* **unspiderfy**: Unspiderfies a cluster (opposite of spiderfy)
## Handling LOTS of markers
The Clusterer can handle 10,000 or even 50,000 markers (in chrome). IE9 has some issues with 50,000.
- [realworld 10,000 example](https://leaflet.github.io/Leaflet.markercluster/example/marker-clustering-realworld.10000.html)
- [realworld 50,000 example](https://leaflet.github.io/Leaflet.markercluster/example/marker-clustering-realworld.50000.html)
Note: these two examples use the `chunkedLoading` option set to true in order to avoid locking the browser for a long time.
## License
Leaflet.markercluster is free software, and may be redistributed under the MIT-LICENSE.
[![Build Status](https://travis-ci.org/Leaflet/Leaflet.markercluster.png?branch=master)](https://travis-ci.org/Leaflet/Leaflet.markercluster)
## Sub-plugins
Leaflet.markercluster plugin is very popular and as such it generates high and
diverse expectations for increased functionalities.
If you are in that case, be sure to have a look first at the repository
[issues](https://github.com/Leaflet/Leaflet.markercluster/issues) in case what
you are looking for would already be discussed, and some workarounds would be proposed.
Check also the below sub-plugins:
| Plugin | Description | Maintainer |
| :----- | :---------- | :--------- |
| [Leaflet.FeatureGroup.SubGroup](https://github.com/ghybs/Leaflet.FeatureGroup.SubGroup) | Creates a Feature Group that adds its child layers into a parent group when added to a map (e.g. through L.Control.Layers). Typical usage is to dynamically add/remove groups of markers from Marker Cluster. | [ghybs](https://github.com/ghybs) |
| [Leaflet.MarkerCluster.LayerSupport](https://github.com/ghybs/Leaflet.MarkerCluster.LayerSupport) | Brings compatibility with L.Control.Layers and other Leaflet plugins. I.e. everything that uses direct calls to map.addLayer and map.removeLayer. | [ghybs](https://github.com/ghybs) |
| [Leaflet.MarkerCluster.Freezable](https://github.com/ghybs/Leaflet.MarkerCluster.Freezable) | Adds the ability to freeze clusters at a specified zoom. E.g. freezing at maxZoom + 1 makes as if clustering was programmatically disabled. | [ghybs](https://github.com/ghybs) |
| [Leaflet.MarkerCluster.PlacementStrategies](https://github.com/adammertel/Leaflet.MarkerCluster.PlacementStrategies) | Implements new strategies to position clustered markers (eg: clock, concentric circles, ...). Recommended to use with circleMarkers. [Demo](https://adammertel.github.io/Leaflet.MarkerCluster.PlacementStrategies/demo/demo1.html) | [adammertel](https://github.com/adammertel) / [UNIVIE](http://carto.univie.ac.at/) |
| [Leaflet.MarkerCluster.List](https://github.com/adammertel/Leaflet.MarkerCluster.List) | Displays child elements in a list. Suitable for mobile devices. [Demo](https://adammertel.github.io/Leaflet.MarkerCluster.List/demo/demo1.html) | [adammertel](https://github.com/adammertel) / [UNIVIE](http://carto.univie.ac.at/) |

27
public/lib/leaflet.markercluster/bower.json

@ -0,0 +1,27 @@
{
"name": "leaflet.markercluster",
"version": "1.4.1",
"homepage": "https://github.com/Leaflet/Leaflet.markercluster",
"authors": [
"Dave Leaver <danzel@localhost.geek.nz>"
],
"description": "Marker Clustering plugin for Leaflet.",
"main": [
"dist/leaflet.markercluster-src.js",
"dist/MarkerCluster.css",
"dist/MarkerCluster.Default.css"
],
"license": "MIT",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"example",
"spec",
"test",
"tests"
],
"dependencies": {
"leaflet": ">= 1.3.1"
}
}

37
public/lib/leaflet.markercluster/build/hintrc.js

@ -0,0 +1,37 @@
exports.config = {
// environment
"browser": true,
"node": true,
"predef": ['L', 'define'],
"strict": false,
// code style
"bitwise": true,
"camelcase": true,
"curly": true,
"eqeqeq": true,
"forin": false,
"immed": true,
"latedef": true,
"newcap": true,
"noarg": true,
"noempty": true,
"nonew": true,
"undef": true,
"unused": true,
//"quotmark": "single",
// whitespace
"indent": 4,
"trailing": true,
"white": true,
"smarttabs": true,
//"maxlen": 120
// code simplicity - not enforced but nice to check from time to time
// "maxstatements": 20,
// "maxcomplexity": 5
// "maxparams": 4,
// "maxdepth": 4
};

41
public/lib/leaflet.markercluster/build/rollup-config.js

@ -0,0 +1,41 @@
// Config file for running Rollup in "normal" mode (non-watch)
import rollupGitVersion from 'rollup-plugin-git-version'
import json from 'rollup-plugin-json'
import gitRev from 'git-rev-sync'
let version = require('../package.json').version;
let release;
// Skip the git branch+rev in the banner when doing a release build
if (process.env.NODE_ENV === 'release') {
release = true;
} else {
release = false;
const branch = gitRev.branch();
const rev = gitRev.short();
version += '+' + branch + '.' + rev;
}
const banner = `/*
* Leaflet.markercluster ` + version + `,
* Provides Beautiful Animated Marker Clustering functionality for Leaflet, a JS library for interactive maps.
* https://github.com/Leaflet/Leaflet.markercluster
* (c) 2012-2017, Dave Leaver, smartrak
*/`;
export default {
format: 'umd',
moduleName: 'Leaflet.markercluster',
banner: banner,
entry: 'src/index.js',
dest: 'dist/leaflet.markercluster-src.js',
plugins: [
release ? json() : rollupGitVersion(),
],
sourceMap: true,
legacy: true // Needed to create files loadable by IE8
};

60
public/lib/leaflet.markercluster/dist/MarkerCluster.Default.css vendored

@ -0,0 +1,60 @@
.marker-cluster-small {
background-color: rgba(181, 226, 140, 0.6);
}
.marker-cluster-small div {
background-color: rgba(110, 204, 57, 0.6);
}
.marker-cluster-medium {
background-color: rgba(241, 211, 87, 0.6);
}
.marker-cluster-medium div {
background-color: rgba(240, 194, 12, 0.6);
}
.marker-cluster-large {
background-color: rgba(253, 156, 115, 0.6);
}
.marker-cluster-large div {
background-color: rgba(241, 128, 23, 0.6);
}
/* IE 6-8 fallback colors */
.leaflet-oldie .marker-cluster-small {
background-color: rgb(181, 226, 140);
}
.leaflet-oldie .marker-cluster-small div {
background-color: rgb(110, 204, 57);
}
.leaflet-oldie .marker-cluster-medium {
background-color: rgb(241, 211, 87);
}
.leaflet-oldie .marker-cluster-medium div {
background-color: rgb(240, 194, 12);
}
.leaflet-oldie .marker-cluster-large {
background-color: rgb(253, 156, 115);
}
.leaflet-oldie .marker-cluster-large div {
background-color: rgb(241, 128, 23);
}
.marker-cluster {
background-clip: padding-box;
border-radius: 20px;
}
.marker-cluster div {
width: 30px;
height: 30px;
margin-left: 5px;
margin-top: 5px;
text-align: center;
border-radius: 15px;
font: 12px "Helvetica Neue", Arial, Helvetica, sans-serif;
}
.marker-cluster span {
line-height: 30px;
}

14
public/lib/leaflet.markercluster/dist/MarkerCluster.css vendored

@ -0,0 +1,14 @@
.leaflet-cluster-anim .leaflet-marker-icon, .leaflet-cluster-anim .leaflet-marker-shadow {
-webkit-transition: -webkit-transform 0.3s ease-out, opacity 0.3s ease-in;
-moz-transition: -moz-transform 0.3s ease-out, opacity 0.3s ease-in;
-o-transition: -o-transform 0.3s ease-out, opacity 0.3s ease-in;
transition: transform 0.3s ease-out, opacity 0.3s ease-in;
}
.leaflet-cluster-spider-leg {
/* stroke-dashoffset (duration and function) should match with leaflet-marker-icon transform in order to track it exactly */
-webkit-transition: -webkit-stroke-dashoffset 0.3s ease-out, -webkit-stroke-opacity 0.3s ease-in;
-moz-transition: -moz-stroke-dashoffset 0.3s ease-out, -moz-stroke-opacity 0.3s ease-in;
-o-transition: -o-stroke-dashoffset 0.3s ease-out, -o-stroke-opacity 0.3s ease-in;
transition: stroke-dashoffset 0.3s ease-out, stroke-opacity 0.3s ease-in;
}

5
public/lib/leaflet.markercluster/dist/WhereAreTheJavascriptFiles.txt vendored

@ -0,0 +1,5 @@
We don't ship the .js files in the git master branch.
They are only present in version tags and in npm.
See how to get the JS files here: https://github.com/Leaflet/Leaflet.markercluster#using-the-plugin
Or how to build them: https://github.com/Leaflet/Leaflet.markercluster#building-testing-and-linting-scripts

2690
public/lib/leaflet.markercluster/dist/leaflet.markercluster-src.js vendored

File diff suppressed because it is too large Load Diff

1
public/lib/leaflet.markercluster/dist/leaflet.markercluster-src.js.map vendored

File diff suppressed because one or more lines are too long

3
public/lib/leaflet.markercluster/dist/leaflet.markercluster.js vendored

File diff suppressed because one or more lines are too long

1
public/lib/leaflet.markercluster/dist/leaflet.markercluster.js.map vendored

File diff suppressed because one or more lines are too long

53
public/lib/leaflet.markercluster/example/geojson-sample.js

@ -0,0 +1,53 @@
var geojsonSample = {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [102.0, 0.5]
},
"properties": {
"prop0": "value0",
"color": "blue"
}
},
{
"type": "Feature",
"geometry": {
"type": "LineString",
"coordinates": [[102.0, 0.0], [103.0, 1.0], [104.0, 0.0], [105.0, 1.0]]
},
"properties": {
"color": "red",
"prop1": 0.0
}
},
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [[[100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]]]
},
"properties": {
"color": "green",
"prop1": {
"this": "that"
}
}
},
{
"type": "Feature",
"geometry": {
"type": "MultiPolygon",
"coordinates": [[[[100.0, 1.5], [100.5, 1.5], [100.5, 2.0], [100.0, 2.0], [100.0, 1.5]]], [[[100.5, 2.0], [100.5, 2.5], [101.0, 2.5], [101.0, 2.0], [100.5, 2.0]]]]
},
"properties": {
"color": "purple"
}
}
]
};

54
public/lib/leaflet.markercluster/example/geojson.html

@ -0,0 +1,54 @@
<!DOCTYPE html>
<html>
<head>
<title>Leaflet debug page</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.0.3/dist/leaflet.css" integrity="sha512-07I2e+7D8p6he1SIM+1twR5TIrhUQn9+I6yjqD53JQjFiMf8EtC93ty0/5vJTZGF8aAocvHYNEDJajGdNx1IsQ==" crossorigin="" />
<script src="https://unpkg.com/leaflet@1.0.3/dist/leaflet-src.js" integrity="sha512-WXoSHqw/t26DszhdMhOXOkI7qCiv5QWXhH9R7CgvgZMHz1ImlkVQ3uNsiQKu5wwbbxtPzFXd1hK4tzno2VqhpA==" crossorigin=""></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="screen.css" />
<link rel="stylesheet" href="../dist/MarkerCluster.css" />
<link rel="stylesheet" href="../dist/MarkerCluster.Default.css" />
<script src="../dist/leaflet.markercluster-src.js"></script>
</head>
<body>
<div id="map"></div>
<script type="text/javascript">
var geoJsonData = {
"type": "FeatureCollection",
"features": [
{ "type": "Feature", "id":"1", "properties": { "address": "2" }, "geometry": { "type": "Point", "coordinates": [175.2209316333,-37.8210922667 ] } },
{ "type": "Feature", "id":"2", "properties": { "address": "151" }, "geometry": { "type": "Point", "coordinates": [175.2238417833,-37.80975435 ] } },
{ "type": "Feature", "id":"3", "properties": { "address": "21" }, "geometry": { "type": "Point", "coordinates": [175.2169955667,-37.818193 ] } },
{ "type": "Feature", "id":"4", "properties": { "address": "14" }, "geometry": { "type": "Point", "coordinates": [175.2240856667,-37.8216963 ] } },
{ "type": "Feature", "id":"5", "properties": { "address": "38B" }, "geometry": { "type": "Point", "coordinates": [175.2196982333,-37.8188702167 ] } },
{ "type": "Feature", "id":"6", "properties": { "address": "38" }, "geometry": { "type": "Point", "coordinates": [175.2209942 ,-37.8192782833 ] } }
]
};
var tiles = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 18,
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
});
var map = L.map('map')
.addLayer(tiles);
var markers = L.markerClusterGroup();
var geoJsonLayer = L.geoJson(geoJsonData, {
onEachFeature: function (feature, layer) {
layer.bindPopup(feature.properties.address);
}
});
markers.addLayer(geoJsonLayer);
map.addLayer(markers);
map.fitBounds(markers.getBounds());
</script>
</body>
</html>

BIN
public/lib/leaflet.markercluster/example/map.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 381 KiB

81
public/lib/leaflet.markercluster/example/marker-clustering-convexhull.html

@ -0,0 +1,81 @@
<!DOCTYPE html>
<html>
<head>
<title>Leaflet debug page</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.0.3/dist/leaflet.css" integrity="sha512-07I2e+7D8p6he1SIM+1twR5TIrhUQn9+I6yjqD53JQjFiMf8EtC93ty0/5vJTZGF8aAocvHYNEDJajGdNx1IsQ==" crossorigin="" />
<script src="https://unpkg.com/leaflet@1.0.3/dist/leaflet-src.js" integrity="sha512-WXoSHqw/t26DszhdMhOXOkI7qCiv5QWXhH9R7CgvgZMHz1ImlkVQ3uNsiQKu5wwbbxtPzFXd1hK4tzno2VqhpA==" crossorigin=""></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="screen.css" />
<link rel="stylesheet" href="../dist/MarkerCluster.css" />
<link rel="stylesheet" href="../dist/MarkerCluster.Default.css" />
<script src="../dist/leaflet.markercluster-src.js"></script>
</head>
<body>
<div id="map"></div>
<button id="populate">Populate 1 marker</button>
<button id="remove">Remove 1 marker</button>
<script type="text/javascript">
var tiles = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 18,
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
}),
latlng = L.latLng(50.5, 30.51);
var map = L.map('map', {center: latlng, zoom: 15, layers: [tiles]});
var markers = L.markerClusterGroup({ spiderfyOnMaxZoom: false, showCoverageOnHover: false, zoomToBoundsOnClick: false });
function populate() {
for (var i = 0; i < 100; i++) {
var m = L.marker(getRandomLatLng(map));
markers.addLayer(m);
}
return false;
}
function getRandomLatLng(map) {
var bounds = map.getBounds(),
southWest = bounds.getSouthWest(),
northEast = bounds.getNorthEast(),
lngSpan = northEast.lng - southWest.lng,
latSpan = northEast.lat - southWest.lat;
return L.latLng(
southWest.lat + latSpan * Math.random(),
southWest.lng + lngSpan * Math.random());
}
var polygon;
markers.on('clustermouseover', function (a) {
if (polygon) {
map.removeLayer(polygon);
}
polygon = L.polygon(a.layer.getConvexHull());
map.addLayer(polygon);
});
markers.on('clustermouseout', function (a) {
if (polygon) {
map.removeLayer(polygon);
polygon = null;
}
});
map.on('zoomend', function () {
if (polygon) {
map.removeLayer(polygon);
polygon = null;
}
});
populate();
map.addLayer(markers);
</script>
</body>
</html>

114
public/lib/leaflet.markercluster/example/marker-clustering-custom.html

@ -0,0 +1,114 @@
<!DOCTYPE html>
<html>
<head>
<title>Leaflet debug page</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.0.3/dist/leaflet.css" integrity="sha512-07I2e+7D8p6he1SIM+1twR5TIrhUQn9+I6yjqD53JQjFiMf8EtC93ty0/5vJTZGF8aAocvHYNEDJajGdNx1IsQ==" crossorigin="" />
<script src="https://unpkg.com/leaflet@1.0.3/dist/leaflet-src.js" integrity="sha512-WXoSHqw/t26DszhdMhOXOkI7qCiv5QWXhH9R7CgvgZMHz1ImlkVQ3uNsiQKu5wwbbxtPzFXd1hK4tzno2VqhpA==" crossorigin=""></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="screen.css" />
<link rel="stylesheet" href="../dist/MarkerCluster.css" />
<script src="../dist/leaflet.markercluster-src.js"></script>
<style>
.mycluster {
width: 40px;
height: 40px;
background-color: greenyellow;
text-align: center;
font-size: 24px;
}
</style>
</head>
<body>
<div id="map"></div>
<script type="text/javascript">
var tiles = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 18,
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
}),
latlng = L.latLng(50.5, 30.51);
var map = L.map('map', {center: latlng, zoom: 15, layers: [tiles]});
//Custom radius and icon create function
var markers = L.markerClusterGroup({
maxClusterRadius: 120,
iconCreateFunction: function (cluster) {
var markers = cluster.getAllChildMarkers();
var n = 0;
for (var i = 0; i < markers.length; i++) {
n += markers[i].number;
}
return L.divIcon({ html: n, className: 'mycluster', iconSize: L.point(40, 40) });
},
//Disable all of the defaults:
spiderfyOnMaxZoom: false, showCoverageOnHover: false, zoomToBoundsOnClick: false
});
function populate() {
for (var i = 0; i < 100; i++) {
var m = L.marker(getRandomLatLng(map), { title: i });
m.number = i;
markers.addLayer(m);
}
return false;
}
function populateRandomVector() {
for (var i = 0, latlngs = [], len = 20; i < len; i++) {
latlngs.push(getRandomLatLng(map));
}
var path = L.polyline(latlngs);
map.addLayer(path);
}
function getRandomLatLng(map) {
var bounds = map.getBounds(),
southWest = bounds.getSouthWest(),
northEast = bounds.getNorthEast(),
lngSpan = northEast.lng - southWest.lng,
latSpan = northEast.lat - southWest.lat;
return L.latLng(
southWest.lat + latSpan * Math.random(),
southWest.lng + lngSpan * Math.random());
}
populate();
map.addLayer(markers);
var shownLayer, polygon;
function removePolygon() {
if (shownLayer) {
shownLayer.setOpacity(1);
shownLayer = null;
}
if (polygon) {
map.removeLayer(polygon);
polygon = null;
}
};
markers.on('clustermouseover', function (a) {
removePolygon();
a.layer.setOpacity(0.2);
shownLayer = a.layer;
polygon = L.polygon(a.layer.getConvexHull());
map.addLayer(polygon);
});
markers.on('clustermouseout', removePolygon);
map.on('zoomend', removePolygon);
</script>
</body>
</html>

83
public/lib/leaflet.markercluster/example/marker-clustering-dragging.html

@ -0,0 +1,83 @@
<!DOCTYPE html>
<html>
<head>
<title>Leaflet debug page</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.0.3/dist/leaflet.css" integrity="sha512-07I2e+7D8p6he1SIM+1twR5TIrhUQn9+I6yjqD53JQjFiMf8EtC93ty0/5vJTZGF8aAocvHYNEDJajGdNx1IsQ==" crossorigin="" />
<script src="https://unpkg.com/leaflet@1.0.3/dist/leaflet-src.js" integrity="sha512-WXoSHqw/t26DszhdMhOXOkI7qCiv5QWXhH9R7CgvgZMHz1ImlkVQ3uNsiQKu5wwbbxtPzFXd1hK4tzno2VqhpA==" crossorigin=""></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="screen.css" />
<link rel="stylesheet" href="../dist/MarkerCluster.css" />
<link rel="stylesheet" href="../dist/MarkerCluster.Default.css" />
<script src="../dist/leaflet.markercluster-src.js"></script>
</head>
<body>
<div id="map"></div>
<button id="moveone">Move a random marker</button>
<script type="text/javascript">
var tiles = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 18,
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
}),
latlng = new L.LatLng(50.5, 30.51);
var map = new L.Map('map', {center: latlng, zoom: 15, layers: [tiles]});
var markers = new L.MarkerClusterGroup();
var markersList = [];
function populate() {
for (var i = 0; i < 100; i++) {
var m = new L.Marker(getRandomLatLng(map), { draggable: true });
markersList.push(m);
markers.addLayer(m);
}
return false;
}
function populateRandomVector() {
for (var i = 0, latlngs = [], len = 20; i < len; i++) {
latlngs.push(getRandomLatLng(map));
}
var path = new L.Polyline(latlngs);
map.addLayer(path);
}
function getRandomLatLng(map) {
var bounds = map.getBounds(),
southWest = bounds.getSouthWest(),
northEast = bounds.getNorthEast(),
lngSpan = northEast.lng - southWest.lng,
latSpan = northEast.lat - southWest.lat;
return new L.LatLng(
southWest.lat + latSpan * Math.random(),
southWest.lng + lngSpan * Math.random());
}
markers.on('clusterclick', function (a) {
alert('cluster ' + a.layer.getAllChildMarkers().length);
});
markers.on('click', function (a) {
alert('marker ' + a.layer);
});
populate();
map.addLayer(markers);
L.DomUtil.get('moveone').onclick = function () {
var m = markersList[Math.floor(Math.random() * markersList.length)];
var bounds = map.getBounds(),
southWest = bounds.getSouthWest(),
northEast = bounds.getNorthEast(),
lngSpan = northEast.lng - southWest.lng,
latSpan = northEast.lat - southWest.lat;
m.setLatLng(new L.LatLng(
southWest.lat + latSpan * 0.5,
southWest.lng + lngSpan * 0.5));
};
</script>
</body>
</html>

80
public/lib/leaflet.markercluster/example/marker-clustering-everything.html

@ -0,0 +1,80 @@
<!DOCTYPE html>
<html>
<head>
<title>Leaflet debug page</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.0.3/dist/leaflet.css" integrity="sha512-07I2e+7D8p6he1SIM+1twR5TIrhUQn9+I6yjqD53JQjFiMf8EtC93ty0/5vJTZGF8aAocvHYNEDJajGdNx1IsQ==" crossorigin="" />
<script src="https://unpkg.com/leaflet@1.0.3/dist/leaflet-src.js" integrity="sha512-WXoSHqw/t26DszhdMhOXOkI7qCiv5QWXhH9R7CgvgZMHz1ImlkVQ3uNsiQKu5wwbbxtPzFXd1hK4tzno2VqhpA==" crossorigin=""></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="screen.css" />
<link rel="stylesheet" href="../dist/MarkerCluster.css" />
<link rel="stylesheet" href="../dist/MarkerCluster.Default.css" />
<script src="../dist/leaflet.markercluster-src.js"></script>
</head>
<body>
<div id="map"></div>
<button id="populate">Populate 1 marker</button>
<button id="remove">Remove 1 marker</button>
<span>Mouse over a cluster to see the bounds of its children and click a cluster to zoom to those bounds</span>
<script type="text/javascript">
var tiles = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 18,
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
}),
latlng = L.latLng(50.5, 30.51);
var map = L.map('map', {center: latlng, zoom: 15, layers: [tiles]});
var markers = L.markerClusterGroup({ animateAddingMarkers : true });
var markersList = [];
function populate() {
for (var i = 0; i < 100; i++) {
var m = L.marker(getRandomLatLng(map));
markersList.push(m);
markers.addLayer(m);
}
return false;
}
function getRandomLatLng(map) {
var bounds = map.getBounds(),
southWest = bounds.getSouthWest(),
northEast = bounds.getNorthEast(),
lngSpan = northEast.lng - southWest.lng,
latSpan = northEast.lat - southWest.lat;
return L.latLng(
southWest.lat + latSpan * Math.random(),
southWest.lng + lngSpan * Math.random());
}
populate();
map.addLayer(markers);
for (var i = 0; i < 100; i++) {
markers.addLayer(markersList[i]);
}
//Ugly add/remove code
L.DomUtil.get('populate').onclick = function () {
var bounds = map.getBounds(),
southWest = bounds.getSouthWest(),
northEast = bounds.getNorthEast(),
lngSpan = northEast.lng - southWest.lng,
latSpan = northEast.lat - southWest.lat;
var m = L.marker([
southWest.lat + latSpan * 0.5,
southWest.lng + lngSpan * 0.5]);
markersList.push(m);
markers.addLayer(m);
};
L.DomUtil.get('remove').onclick = function () {
markers.removeLayer(markersList.pop());
};
</script>
</body>
</html>

70
public/lib/leaflet.markercluster/example/marker-clustering-geojson.html

@ -0,0 +1,70 @@
<!DOCTYPE html>
<html>
<head>
<title>Leaflet debug page</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.0.3/dist/leaflet.css" integrity="sha512-07I2e+7D8p6he1SIM+1twR5TIrhUQn9+I6yjqD53JQjFiMf8EtC93ty0/5vJTZGF8aAocvHYNEDJajGdNx1IsQ==" crossorigin="" />
<script src="https://unpkg.com/leaflet@1.0.3/dist/leaflet-src.js" integrity="sha512-WXoSHqw/t26DszhdMhOXOkI7qCiv5QWXhH9R7CgvgZMHz1ImlkVQ3uNsiQKu5wwbbxtPzFXd1hK4tzno2VqhpA==" crossorigin=""></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="screen.css" />
<link rel="stylesheet" href="../dist/MarkerCluster.css" />
<link rel="stylesheet" href="../dist/MarkerCluster.Default.css" />
<script src="../dist/leaflet.markercluster-src.js"></script>
<script type="text/javascript" src="geojson-sample.js"></script>
</head>
<body>
<div id="map"></div>
<span>Mouse over a cluster to see the bounds of its children and click a cluster to zoom to those bounds</span>
<script type="text/javascript">
var tiles = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 18,
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
}),
latlng = L.latLng(0.78, 102.37);
var map = L.map('map', {center: latlng, zoom: 7, layers: [tiles]});
var geojson = L.geoJson(geojsonSample, {
style: function (feature) {
return {color: feature.properties.color};
},
onEachFeature: function (feature, layer) {
var popupText = 'geometry type: ' + feature.geometry.type;
if (feature.properties.color) {
popupText += '<br/>color: ' + feature.properties.color;
}
layer.bindPopup(popupText);
}
});
geojson.addLayer(new L.Marker(new L.LatLng(2.745530718801952, 105.194091796875)));
var eye1 = new L.Marker(new L.LatLng(-0.7250783020332547, 101.8212890625));
var eye2 = new L.Marker(new L.LatLng(-0.7360637370492077, 103.2275390625));
var nose = new L.Marker(new L.LatLng(-1.3292264529974207, 102.5463867187));
var mouth = new L.Polyline([
new L.LatLng(-1.3841426927920029, 101.7333984375),
new L.LatLng(-1.6037944300589726, 101.964111328125),
new L.LatLng(-1.6806671337507222, 102.249755859375),
new L.LatLng(-1.7355743631421197, 102.67822265625),
new L.LatLng(-1.5928123762763, 103.0078125),
new L.LatLng(-1.3292264529974207, 103.3154296875)
]);
var markers = L.markerClusterGroup();
markers.addLayer(geojson).addLayers([eye1,eye2,nose,mouth]);
map.addLayer(markers);
</script>
</body>
</html>

104
public/lib/leaflet.markercluster/example/marker-clustering-pane.html

@ -0,0 +1,104 @@
<!DOCTYPE html>
<html>
<head>
<title>Leaflet debug page</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.0.3/dist/leaflet.css" integrity="sha512-07I2e+7D8p6he1SIM+1twR5TIrhUQn9+I6yjqD53JQjFiMf8EtC93ty0/5vJTZGF8aAocvHYNEDJajGdNx1IsQ==" crossorigin="" />
<script src="https://unpkg.com/leaflet@1.0.3/dist/leaflet-src.js" integrity="sha512-WXoSHqw/t26DszhdMhOXOkI7qCiv5QWXhH9R7CgvgZMHz1ImlkVQ3uNsiQKu5wwbbxtPzFXd1hK4tzno2VqhpA==" crossorigin=""></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="screen.css" />
<link rel="stylesheet" href="../dist/MarkerCluster.css" />
<script src="../dist/leaflet.markercluster-src.js"></script>
<style>
.myclusterA {
width: 40px;
height: 40px;
background-color: greenyellow;
text-align: center;
font-size: 24px;
}
.myclusterB {
width: 40px;
height: 40px;
background-color: red;
text-align: center;
font-size: 24px;
}
</style>
</head>
<body>
<div id="map"></div>
<script type="text/javascript">
var tiles = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 18,
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
}),
latlng = L.latLng(50.5, 30.51);
var map = L.map('map', {center: latlng, zoom: 15, layers: [tiles]});
//Define a pane above the default markerPane
map.createPane('paneB').style.zIndex = 610;
//Create two markerClusterGroups, one in the default markerPane, one in our custom pane
var markersA = createMarkerClusterGroup('myclusterA');
var markersB = createMarkerClusterGroup('myclusterB', 'paneB');
function createMarkerClusterGroup(className, pane) {
var options = {
maxClusterRadius: 120,
iconCreateFunction: function (cluster) {
var markers = cluster.getAllChildMarkers();
var n = 0;
for (var i = 0; i < markers.length; i++) {
n += markers[i].number;
}
return L.divIcon({ html: n, className: className, iconSize: L.point(40, 40) });
},
//Disable all of the defaults & specify the pane:
spiderfyOnMaxZoom: false,
showCoverageOnHover: false,
zoomToBoundsOnClick: false
};
if (pane) {
options.clusterPane = pane;
}
var mcg = L.markerClusterGroup(options);
return(mcg);
}
function populate(markers) {
for (var i = 0; i < 100; i++) {
var m = L.marker(getRandomLatLng(map), { title: i });
m.number = i;
markers.addLayer(m);
}
return false;
}
function getRandomLatLng(map) {
var bounds = map.getBounds(),
southWest = bounds.getSouthWest(),
northEast = bounds.getNorthEast(),
lngSpan = northEast.lng - southWest.lng,
latSpan = northEast.lat - southWest.lat;
return L.latLng(
southWest.lat + latSpan * Math.random(),
southWest.lng + lngSpan * Math.random());
}
populate(markersA);
populate(markersB);
map.addLayer(markersA);
map.addLayer(markersB);
</script>
</body>
</html>

45
public/lib/leaflet.markercluster/example/marker-clustering-realworld-maxzoom.388.html

@ -0,0 +1,45 @@
<!DOCTYPE html>
<html>
<head>
<title>Leaflet debug page</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.0.3/dist/leaflet.css" integrity="sha512-07I2e+7D8p6he1SIM+1twR5TIrhUQn9+I6yjqD53JQjFiMf8EtC93ty0/5vJTZGF8aAocvHYNEDJajGdNx1IsQ==" crossorigin="" />
<script src="https://unpkg.com/leaflet@1.0.3/dist/leaflet-src.js" integrity="sha512-WXoSHqw/t26DszhdMhOXOkI7qCiv5QWXhH9R7CgvgZMHz1ImlkVQ3uNsiQKu5wwbbxtPzFXd1hK4tzno2VqhpA==" crossorigin=""></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="screen.css" />
<link rel="stylesheet" href="../dist/MarkerCluster.css" />
<link rel="stylesheet" href="../dist/MarkerCluster.Default.css" />
<script src="../dist/leaflet.markercluster-src.js"></script>
<script src="realworld.388.js"></script>
</head>
<body>
<div id="map"></div>
<span>Markers will show on the bottom 2 zoom levels even though the markers would normally cluster.</span>
<script type="text/javascript">
var tiles = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 18,
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, Points &copy 2012 LINZ'
}),
latlng = L.latLng(-37.82, 175.24);
var map = L.map('map', {center: latlng, zoom: 13, layers: [tiles]});
var markers = L.markerClusterGroup({ disableClusteringAtZoom: 17 });
for (var i = 0; i < addressPoints.length; i++) {
var a = addressPoints[i];
var title = a[2];
var marker = L.marker(L.latLng(a[0], a[1]), { title: title });
marker.bindPopup(title);
markers.addLayer(marker);
}
map.addLayer(markers);
</script>
</body>
</html>

44
public/lib/leaflet.markercluster/example/marker-clustering-realworld-mobile.388.html

@ -0,0 +1,44 @@
<!DOCTYPE html>
<html>
<head>
<title>Leaflet debug page</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.0.3/dist/leaflet.css" integrity="sha512-07I2e+7D8p6he1SIM+1twR5TIrhUQn9+I6yjqD53JQjFiMf8EtC93ty0/5vJTZGF8aAocvHYNEDJajGdNx1IsQ==" crossorigin="" />
<script src="https://unpkg.com/leaflet@1.0.3/dist/leaflet-src.js" integrity="sha512-WXoSHqw/t26DszhdMhOXOkI7qCiv5QWXhH9R7CgvgZMHz1ImlkVQ3uNsiQKu5wwbbxtPzFXd1hK4tzno2VqhpA==" crossorigin=""></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="stylesheet" href="mobile.css" />
<link rel="stylesheet" href="../dist/MarkerCluster.css" />
<link rel="stylesheet" href="../dist/MarkerCluster.Default.css" />
<script src="../dist/leaflet.markercluster-src.js"></script>
<script src="realworld.388.js"></script>
</head>
<body>
<div id="map"></div>
<script type="text/javascript">
var tiles = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 18,
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, Points &copy 2012 LINZ'
}),
latlng = L.latLng(-37.821, 175.22);
var map = L.map('map', {center: latlng, zoom: 15, layers: [tiles]});
var markers = L.markerClusterGroup();
for (var i = 0; i < addressPoints.length; i++) {
var a = addressPoints[i];
var title = a[2];
var marker = L.marker(L.latLng(a[0], a[1]), { title: title });
marker.bindPopup(title);
markers.addLayer(marker);
}
map.addLayer(markers);
</script>
</body>
</html>

46
public/lib/leaflet.markercluster/example/marker-clustering-realworld.10000.html

@ -0,0 +1,46 @@
<!DOCTYPE html>
<html>
<head>
<title>Leaflet debug page</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.0.3/dist/leaflet.css" integrity="sha512-07I2e+7D8p6he1SIM+1twR5TIrhUQn9+I6yjqD53JQjFiMf8EtC93ty0/5vJTZGF8aAocvHYNEDJajGdNx1IsQ==" crossorigin="" />
<script src="https://unpkg.com/leaflet@1.0.3/dist/leaflet-src.js" integrity="sha512-WXoSHqw/t26DszhdMhOXOkI7qCiv5QWXhH9R7CgvgZMHz1ImlkVQ3uNsiQKu5wwbbxtPzFXd1hK4tzno2VqhpA==" crossorigin=""></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="screen.css" />
<link rel="stylesheet" href="../dist/MarkerCluster.css" />
<link rel="stylesheet" href="../dist/MarkerCluster.Default.css" />
<script src="../dist/leaflet.markercluster-src.js"></script>
<script src="realworld.10000.js"></script>
</head>
<body>
<div id="map"></div>
<span>Mouse over a cluster to see the bounds of its children and click a cluster to zoom to those bounds</span>
<script type="text/javascript">
var tiles = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 18,
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, Points &copy 2012 LINZ'
}),
latlng = L.latLng(-37.89, 175.46);
var map = L.map('map', {center: latlng, zoom: 13, layers: [tiles]});
var markers = L.markerClusterGroup({ chunkedLoading: true });
for (var i = 0; i < addressPoints.length; i++) {
var a = addressPoints[i];
var title = a[2];
var marker = L.marker(L.latLng(a[0], a[1]), { title: title });
marker.bindPopup(title);
markers.addLayer(marker);
}
map.addLayer(markers);
</script>
</body>
</html>

45
public/lib/leaflet.markercluster/example/marker-clustering-realworld.388.html

@ -0,0 +1,45 @@
<!DOCTYPE html>
<html>
<head>
<title>Leaflet debug page</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.0.3/dist/leaflet.css" integrity="sha512-07I2e+7D8p6he1SIM+1twR5TIrhUQn9+I6yjqD53JQjFiMf8EtC93ty0/5vJTZGF8aAocvHYNEDJajGdNx1IsQ==" crossorigin="" />
<script src="https://unpkg.com/leaflet@1.0.3/dist/leaflet-src.js" integrity="sha512-WXoSHqw/t26DszhdMhOXOkI7qCiv5QWXhH9R7CgvgZMHz1ImlkVQ3uNsiQKu5wwbbxtPzFXd1hK4tzno2VqhpA==" crossorigin=""></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="screen.css" />
<link rel="stylesheet" href="../dist/MarkerCluster.css" />
<link rel="stylesheet" href="../dist/MarkerCluster.Default.css" />
<script src="../dist/leaflet.markercluster-src.js"></script>
<script src="realworld.388.js"></script>
</head>
<body>
<div id="map"></div>
<span>Mouse over a cluster to see the bounds of its children and click a cluster to zoom to those bounds</span>
<script type="text/javascript">
var tiles = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 18,
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, Points &copy 2012 LINZ'
}),
latlng = L.latLng(-37.82, 175.24);
var map = L.map('map', {center: latlng, zoom: 13, layers: [tiles]});
var markers = L.markerClusterGroup();
for (var i = 0; i < addressPoints.length; i++) {
var a = addressPoints[i];
var title = a[2];
var marker = L.marker(new L.LatLng(a[0], a[1]), { title: title });
marker.bindPopup(title);
markers.addLayer(marker);
}
map.addLayer(markers);
</script>
</body>
</html>

78
public/lib/leaflet.markercluster/example/marker-clustering-realworld.50000.html

@ -0,0 +1,78 @@
<!DOCTYPE html>
<html>
<head>
<title>Leaflet debug page</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.0.3/dist/leaflet.css" integrity="sha512-07I2e+7D8p6he1SIM+1twR5TIrhUQn9+I6yjqD53JQjFiMf8EtC93ty0/5vJTZGF8aAocvHYNEDJajGdNx1IsQ==" crossorigin="" />
<script src="https://unpkg.com/leaflet@1.0.3/dist/leaflet-src.js" integrity="sha512-WXoSHqw/t26DszhdMhOXOkI7qCiv5QWXhH9R7CgvgZMHz1ImlkVQ3uNsiQKu5wwbbxtPzFXd1hK4tzno2VqhpA==" crossorigin=""></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="screen.css" />
<link rel="stylesheet" href="../dist/MarkerCluster.css" />
<link rel="stylesheet" href="../dist/MarkerCluster.Default.css" />
<script src="../dist/leaflet.markercluster-src.js"></script>
<script src="realworld.50000.1.js"></script>
<script src="realworld.50000.2.js"></script>
</head>
<body>
<div id="progress"><div id="progress-bar"></div></div>
<div id="map"></div>
<span>Mouse over a cluster to see the bounds of its children and click a cluster to zoom to those bounds</span>
<script type="text/javascript">
var tiles = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 18,
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, Points &copy 2012 LINZ'
}),
latlng = L.latLng(-37.79, 175.27);
var map = L.map('map', { center: latlng, zoom: 13, layers: [tiles] });
var progress = document.getElementById('progress');
var progressBar = document.getElementById('progress-bar');
function updateProgressBar(processed, total, elapsed, layersArray) {
if (elapsed > 1000) {
// if it takes more than a second to load, display the progress bar:
progress.style.display = 'block';
progressBar.style.width = Math.round(processed/total*100) + '%';
}
if (processed === total) {
// all markers processed - hide the progress bar:
progress.style.display = 'none';
}
}
var markers = L.markerClusterGroup({ chunkedLoading: true, chunkProgress: updateProgressBar });
var markerList = [];
//console.log('start creating markers: ' + window.performance.now());
for (var i = 0; i < addressPoints.length; i++) {
var a = addressPoints[i];
var title = a[2];
var marker = L.marker(L.latLng(a[0], a[1]), { title: title });
marker.bindPopup(title);
markerList.push(marker);
}
for (var i = 0; i < addressPoints2.length; i++) {
var a = addressPoints2[i];
var title = a[2];
var marker = L.marker(L.latLng(a[0], a[1]), { title: title });
marker.bindPopup(title);
markerList.push(marker);
}
//console.log('start clustering: ' + window.performance.now());
markers.addLayers(markerList);
map.addLayer(markers);
//console.log('end clustering: ' + window.performance.now());
</script>
</body>
</html>

60
public/lib/leaflet.markercluster/example/marker-clustering-singlemarkermode.html

@ -0,0 +1,60 @@
<!DOCTYPE html>
<html>
<head>
<title>Leaflet debug page</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.0.3/dist/leaflet.css" integrity="sha512-07I2e+7D8p6he1SIM+1twR5TIrhUQn9+I6yjqD53JQjFiMf8EtC93ty0/5vJTZGF8aAocvHYNEDJajGdNx1IsQ==" crossorigin="" />
<script src="https://unpkg.com/leaflet@1.0.3/dist/leaflet-src.js" integrity="sha512-WXoSHqw/t26DszhdMhOXOkI7qCiv5QWXhH9R7CgvgZMHz1ImlkVQ3uNsiQKu5wwbbxtPzFXd1hK4tzno2VqhpA==" crossorigin=""></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="screen.css" />
<link rel="stylesheet" href="../dist/MarkerCluster.css" />
<link rel="stylesheet" href="../dist/MarkerCluster.Default.css" />
<script src="../dist/leaflet.markercluster-src.js"></script>
</head>
<body>
<div id="map"></div>
<span>Click a cluster to zoom to its bounds</span>
<script type="text/javascript">
var tiles = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 18,
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
}),
latlng = L.latLng(50.5, 30.51);
var map = L.map('map', {center: latlng, zoom: 15, layers: [tiles]});
var markers = L.markerClusterGroup({ singleMarkerMode: true});
function populate() {
for (var i = 0; i < 100; i++) {
var m = L.marker(getRandomLatLng(map));
markers.addLayer(m);
}
return false;
}
function getRandomLatLng(map) {
var bounds = map.getBounds(),
southWest = bounds.getSouthWest(),
northEast = bounds.getNorthEast(),
lngSpan = northEast.lng - southWest.lng,
latSpan = northEast.lat - southWest.lat;
return L.latLng(
southWest.lat + latSpan * Math.random(),
southWest.lng + lngSpan * Math.random());
}
markers.on('clusterclick', function (a) {
a.layer.zoomToBounds();
});
populate();
map.addLayer(markers);
</script>
</body>
</html>

60
public/lib/leaflet.markercluster/example/marker-clustering-spiderfier.html

@ -0,0 +1,60 @@
<!DOCTYPE html>
<html>
<head>
<title>Leaflet debug page</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.0.3/dist/leaflet.css" integrity="sha512-07I2e+7D8p6he1SIM+1twR5TIrhUQn9+I6yjqD53JQjFiMf8EtC93ty0/5vJTZGF8aAocvHYNEDJajGdNx1IsQ==" crossorigin="" />
<script src="https://unpkg.com/leaflet@1.0.3/dist/leaflet-src.js" integrity="sha512-WXoSHqw/t26DszhdMhOXOkI7qCiv5QWXhH9R7CgvgZMHz1ImlkVQ3uNsiQKu5wwbbxtPzFXd1hK4tzno2VqhpA==" crossorigin=""></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="screen.css" />
<link rel="stylesheet" href="../dist/MarkerCluster.css" />
<link rel="stylesheet" href="../dist/MarkerCluster.Default.css" />
<script src="../dist/leaflet.markercluster-src.js"></script>
</head>
<body>
<div id="map"></div>
<button id="populate">Populate 1 marker</button>
<button id="remove">Remove 1 marker</button>
<script type="text/javascript">
var tiles = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 18,
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
}),
latlng = L.latLng(50.5, 30.51);
var map = L.map('map', {center: latlng, zoom: 15, layers: [tiles]});
var markers = L.markerClusterGroup({ spiderfyOnMaxZoom: false, showCoverageOnHover: false, zoomToBoundsOnClick: false });
function populate() {
for (var i = 0; i < 100; i++) {
var m = L.marker(getRandomLatLng(map));
markers.addLayer(m);
}
return false;
}
function getRandomLatLng(map) {
var bounds = map.getBounds(),
southWest = bounds.getSouthWest(),
northEast = bounds.getNorthEast(),
lngSpan = northEast.lng - southWest.lng,
latSpan = northEast.lat - southWest.lat;
return L.latLng(
southWest.lat + latSpan * Math.random(),
southWest.lng + lngSpan * Math.random());
}
markers.on('clusterclick', function (a) {
a.layer.spiderfy();
});
populate();
map.addLayer(markers);
</script>
</body>
</html>

60
public/lib/leaflet.markercluster/example/marker-clustering-zoomtobounds.html

@ -0,0 +1,60 @@
<!DOCTYPE html>
<html>
<head>
<title>Leaflet debug page</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.0.3/dist/leaflet.css" integrity="sha512-07I2e+7D8p6he1SIM+1twR5TIrhUQn9+I6yjqD53JQjFiMf8EtC93ty0/5vJTZGF8aAocvHYNEDJajGdNx1IsQ==" crossorigin="" />
<script src="https://unpkg.com/leaflet@1.0.3/dist/leaflet-src.js" integrity="sha512-WXoSHqw/t26DszhdMhOXOkI7qCiv5QWXhH9R7CgvgZMHz1ImlkVQ3uNsiQKu5wwbbxtPzFXd1hK4tzno2VqhpA==" crossorigin=""></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="screen.css" />
<link rel="stylesheet" href="../dist/MarkerCluster.css" />
<link rel="stylesheet" href="../dist/MarkerCluster.Default.css" />
<script src="../dist/leaflet.markercluster-src.js"></script>
</head>
<body>
<div id="map"></div>
<span>Click a cluster to zoom to its bounds</span>
<script type="text/javascript">
var tiles = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 18,
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
}),
latlng = L.latLng(50.5, 30.51);
var map = L.map('map', {center: latlng, zoom: 15, layers: [tiles]});
var markers = L.markerClusterGroup({spiderfyOnMaxZoom: false, showCoverageOnHover: false, zoomToBoundsOnClick: false});
function populate() {
for (var i = 0; i < 100; i++) {
var m = L.marker(getRandomLatLng(map));
markers.addLayer(m);
}
return false;
}
function getRandomLatLng(map) {
var bounds = map.getBounds(),
southWest = bounds.getSouthWest(),
northEast = bounds.getNorthEast(),
lngSpan = northEast.lng - southWest.lng,
latSpan = northEast.lat - southWest.lat;
return L.latLng(
southWest.lat + latSpan * Math.random(),
southWest.lng + lngSpan * Math.random());
}
markers.on('clusterclick', function (a) {
a.layer.zoomToBounds();
});
populate();
map.addLayer(markers);
</script>
</body>
</html>

59
public/lib/leaflet.markercluster/example/marker-clustering-zoomtoshowlayer.html

@ -0,0 +1,59 @@
<!DOCTYPE html>
<html>
<head>
<title>Leaflet debug page</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.0.3/dist/leaflet.css" integrity="sha512-07I2e+7D8p6he1SIM+1twR5TIrhUQn9+I6yjqD53JQjFiMf8EtC93ty0/5vJTZGF8aAocvHYNEDJajGdNx1IsQ==" crossorigin="" />
<script src="https://unpkg.com/leaflet@1.0.3/dist/leaflet-src.js" integrity="sha512-WXoSHqw/t26DszhdMhOXOkI7qCiv5QWXhH9R7CgvgZMHz1ImlkVQ3uNsiQKu5wwbbxtPzFXd1hK4tzno2VqhpA==" crossorigin=""></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="screen.css" />
<link rel="stylesheet" href="../dist/MarkerCluster.css" />
<link rel="stylesheet" href="../dist/MarkerCluster.Default.css" />
<script src="../dist/leaflet.markercluster-src.js"></script>
<script src="realworld.388.js"></script>
</head>
<body>
<div id="map"></div>
<button id="doit">Zoom to marker</button>
<span>When clicked we will zoom down to a marker, spiderfying if required to show it and then open its popup</span>
<script type="text/javascript">
var tiles = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 18,
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
}),
latlng = L.latLng(-37.82, 175.24);
var map = L.map('map', {center: latlng, zoom: 13, layers: [tiles]});
var markers = L.markerClusterGroup();
var markerList = [];
function populate() {
for (var i = 0; i < addressPoints.length; i++) {
var a = addressPoints[i];
var title = a[2];
var marker = L.marker(L.latLng(a[0], a[1]), { title: title });
marker.bindPopup(title);
markers.addLayer(marker);
markerList.push(marker);
}
}
populate();
map.addLayer(markers);
document.getElementById('doit').onclick = function () {
var m = markerList[Math.floor(Math.random() * markerList.length)];
markers.zoomToShowLayer(m, function () {
m.openPopup();
});
};
</script>
</body>
</html>

88
public/lib/leaflet.markercluster/example/marker-clustering.html

@ -0,0 +1,88 @@
<!DOCTYPE html>
<html>
<head>
<title>Leaflet debug page</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.0.3/dist/leaflet.css" integrity="sha512-07I2e+7D8p6he1SIM+1twR5TIrhUQn9+I6yjqD53JQjFiMf8EtC93ty0/5vJTZGF8aAocvHYNEDJajGdNx1IsQ==" crossorigin="" />
<script src="https://unpkg.com/leaflet@1.0.3/dist/leaflet-src.js" integrity="sha512-WXoSHqw/t26DszhdMhOXOkI7qCiv5QWXhH9R7CgvgZMHz1ImlkVQ3uNsiQKu5wwbbxtPzFXd1hK4tzno2VqhpA==" crossorigin=""></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="screen.css" />
<link rel="stylesheet" href="../dist/MarkerCluster.css" />
<link rel="stylesheet" href="../dist/MarkerCluster.Default.css" />
<script src="../dist/leaflet.markercluster-src.js"></script>
</head>
<body>
<div id="map"></div>
<button id="populate">Populate 1 marker</button>
<button id="remove">Remove 1 marker</button>
<script type="text/javascript">
var tiles = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 18,
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
}),
latlng = new L.LatLng(50.5, 30.51);
var map = new L.Map('map', {center: latlng, zoom: 15, layers: [tiles]});
var markers = new L.MarkerClusterGroup();
var markersList = [];
function populate() {
for (var i = 0; i < 100; i++) {
var m = new L.Marker(getRandomLatLng(map));
markersList.push(m);
markers.addLayer(m);
}
return false;
}
function populateRandomVector() {
for (var i = 0, latlngs = [], len = 20; i < len; i++) {
latlngs.push(getRandomLatLng(map));
}
var path = new L.Polyline(latlngs);
map.addLayer(path);
}
function getRandomLatLng(map) {
var bounds = map.getBounds(),
southWest = bounds.getSouthWest(),
northEast = bounds.getNorthEast(),
lngSpan = northEast.lng - southWest.lng,
latSpan = northEast.lat - southWest.lat;
return new L.LatLng(
southWest.lat + latSpan * Math.random(),
southWest.lng + lngSpan * Math.random());
}
markers.on('clusterclick', function (a) {
alert('cluster ' + a.layer.getAllChildMarkers().length);
});
markers.on('click', function (a) {
alert('marker ' + a.layer);
});
populate();
map.addLayer(markers);
L.DomUtil.get('populate').onclick = function () {
var bounds = map.getBounds(),
southWest = bounds.getSouthWest(),
northEast = bounds.getNorthEast(),
lngSpan = northEast.lng - southWest.lng,
latSpan = northEast.lat - southWest.lat;
var m = new L.Marker(new L.LatLng(
southWest.lat + latSpan * 0.5,
southWest.lng + lngSpan * 0.5));
markersList.push(m);
markers.addLayer(m);
};
L.DomUtil.get('remove').onclick = function () {
markers.removeLayer(markersList.pop());
};
</script>
</body>
</html>

6
public/lib/leaflet.markercluster/example/mobile.css

@ -0,0 +1,6 @@
html, body, #map {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
}

83
public/lib/leaflet.markercluster/example/old-bugs/add-1000-after.html

@ -0,0 +1,83 @@
<!DOCTYPE html>
<html>
<head>
<title>Leaflet debug page</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.0.3/dist/leaflet.css" integrity="sha512-07I2e+7D8p6he1SIM+1twR5TIrhUQn9+I6yjqD53JQjFiMf8EtC93ty0/5vJTZGF8aAocvHYNEDJajGdNx1IsQ==" crossorigin="" />
<script src="https://unpkg.com/leaflet@1.0.3/dist/leaflet-src.js" integrity="sha512-WXoSHqw/t26DszhdMhOXOkI7qCiv5QWXhH9R7CgvgZMHz1ImlkVQ3uNsiQKu5wwbbxtPzFXd1hK4tzno2VqhpA==" crossorigin=""></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="../screen.css" />
<link rel="stylesheet" href="../../dist/MarkerCluster.css" />
<link rel="stylesheet" href="../../dist/MarkerCluster.Default.css" />
<script src="../../src/DistanceGrid.js"></script>
<script src="../../src/MarkerCluster.js"></script>
<script src="../../src/MarkerClusterGroup.js"></script>
<script src="../../src/MarkerCluster.QuickHull.js"></script>
<script src="../../src/MarkerCluster.Spiderfier.js"></script>
</head>
<body>
<div id="map"></div>
<button id="doit">Add 1000 Markers</button><br/>
<span>Bug <a href="https://github.com/danzel/Leaflet.markercluster/issues/51">#51</a>. Click the button. It will add 1000 markers to the map. this should be fast, but previously in (non-IE browsers) it was very slow.</span><br/>
<span>Bug <a href="https://github.com/danzel/Leaflet.markercluster/issues/43">#43</a>. Improving performance more.</span><br/>
<span id="time"></span>
<script type="text/javascript">
var tiles = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 18,
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
}),
latlng = new L.LatLng(50.5, 30.51);
var map = new L.Map('map', {center: latlng, zoom: 15, layers: [tiles]});
var markers = new L.MarkerClusterGroup();
var markersList = [];
function getRandomLatLng(map) {
var bounds = map.getBounds(),
southWest = bounds.getSouthWest(),
northEast = bounds.getNorthEast(),
lngSpan = northEast.lng - southWest.lng,
latSpan = northEast.lat - southWest.lat;
return new L.LatLng(
southWest.lat + latSpan * Math.random(),
southWest.lng + lngSpan * Math.random());
}
function populate(length) {
var prestart = +new Date();
var list = [], i;
for (i = 0; i < length; i++) {
var m = new L.Marker(getRandomLatLng(map));
list.push(m);
}
var start = +new Date();
markers.addLayers(list);
var end = +new Date();
document.getElementById('time').innerHTML = 'Creating 1000 markers took: ' + (start - prestart) + 'ms . Appending 1000 markers took: ' + (end - start) + 'ms';
return false;
}
populate(1000);
var start = +new Date();
map.addLayer(markers);
var end = +new Date();
document.getElementById('time').innerHTML += ' . Adding to map took: ' + (end - start) + 'ms';
//Ugly add/remove code
L.DomUtil.get('doit').onclick = function () {
populate(1000);
};
</script>
</body>
</html>

52
public/lib/leaflet.markercluster/example/old-bugs/add-markers-offscreen.html

@ -0,0 +1,52 @@
<!DOCTYPE html>
<html>
<head>
<title>Leaflet debug page</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.0.3/dist/leaflet.css" integrity="sha512-07I2e+7D8p6he1SIM+1twR5TIrhUQn9+I6yjqD53JQjFiMf8EtC93ty0/5vJTZGF8aAocvHYNEDJajGdNx1IsQ==" crossorigin="" />
<script src="https://unpkg.com/leaflet@1.0.3/dist/leaflet-src.js" integrity="sha512-WXoSHqw/t26DszhdMhOXOkI7qCiv5QWXhH9R7CgvgZMHz1ImlkVQ3uNsiQKu5wwbbxtPzFXd1hK4tzno2VqhpA==" crossorigin=""></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="../screen.css" />
<link rel="stylesheet" href="../../dist/MarkerCluster.css" />
<link rel="stylesheet" href="../../dist/MarkerCluster.Default.css" />
<script src="../../src/DistanceGrid.js"></script>
<script src="../../src/MarkerCluster.js"></script>
<script src="../../src/MarkerClusterGroup.js"></script>
<script src="../../src/MarkerCluster.QuickHull.js"></script>
<script src="../../src/MarkerCluster.Spiderfier.js"></script>
</head>
<body>
<div id="map"></div>
<button id="populate">Populate 1 marker</button>
<span>Bug <a href="https://github.com/danzel/Leaflet.markercluster/issues/69">#69</a>. Click the button 2+ times. Zoom out. Should just be a single cluster but instead one of the child markers is still visible.</span><br/>
<script type="text/javascript">
var tiles = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 18,
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
}),
latlng = new L.LatLng(50.5, 30.51);
var map = new L.Map('map', {center: new L.LatLng(50.41, 30.51), zoom: 17, layers: [tiles]});
var markers = new L.MarkerClusterGroup({ animateAddingMarkers : true });
var markersList = [];
function populate() {
var m = new L.Marker(latlng);
markersList.push(m);
markers.addLayer(m);
return false;
}
map.addLayer(markers);
//Ugly add/remove code
L.DomUtil.get('populate').onclick = function () {
populate();
};
</script>
</body>
</html>

62
public/lib/leaflet.markercluster/example/old-bugs/add-remove-before-addtomap.html

@ -0,0 +1,62 @@
<!DOCTYPE html>
<html>
<head>
<title>Leaflet debug page</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.0.3/dist/leaflet.css" integrity="sha512-07I2e+7D8p6he1SIM+1twR5TIrhUQn9+I6yjqD53JQjFiMf8EtC93ty0/5vJTZGF8aAocvHYNEDJajGdNx1IsQ==" crossorigin="" />
<script src="https://unpkg.com/leaflet@1.0.3/dist/leaflet-src.js" integrity="sha512-WXoSHqw/t26DszhdMhOXOkI7qCiv5QWXhH9R7CgvgZMHz1ImlkVQ3uNsiQKu5wwbbxtPzFXd1hK4tzno2VqhpA==" crossorigin=""></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="../screen.css" />
<link rel="stylesheet" href="../../dist/MarkerCluster.css" />
<link rel="stylesheet" href="../../dist/MarkerCluster.Default.css" />
<script src="../../src/DistanceGrid.js"></script>
<script src="../../src/MarkerCluster.js"></script>
<script src="../../src/MarkerClusterGroup.js"></script>
<script src="../../src/MarkerCluster.QuickHull.js"></script>
<script src="../../src/MarkerCluster.Spiderfier.js"></script>
</head>
<body>
<div id="map"></div>
<span>Bug <a href="https://github.com/danzel/Leaflet.markercluster/issues/64">#64</a>. Nothing should appear on the map.</span><br/>
<span id="time"></span>
<script type="text/javascript">
var tiles = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 18,
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
}),
latlng = new L.LatLng(50.5, 30.51);
var map = new L.Map('map', {center: latlng, zoom: 15, layers: [tiles]});
var markers = new L.MarkerClusterGroup();
function getRandomLatLng(map) {
var bounds = map.getBounds(),
southWest = bounds.getSouthWest(),
northEast = bounds.getNorthEast(),
lngSpan = northEast.lng - southWest.lng,
latSpan = northEast.lat - southWest.lat;
return new L.LatLng(
southWest.lat + latSpan * Math.random(),
southWest.lng + lngSpan * Math.random());
}
function populate(length) {
var list = [], i;
for (i = 0; i < length; i++) {
var m = new L.Marker(getRandomLatLng(map));
markers.addLayer(m);
markers.removeLayer(m);
}
}
populate(1000);
map.addLayer(markers);
</script>
</body>
</html>

47
public/lib/leaflet.markercluster/example/old-bugs/animationless-zoom.html

@ -0,0 +1,47 @@
<!DOCTYPE html>
<html>
<head>
<title>Leaflet debug page</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.0.3/dist/leaflet.css" integrity="sha512-07I2e+7D8p6he1SIM+1twR5TIrhUQn9+I6yjqD53JQjFiMf8EtC93ty0/5vJTZGF8aAocvHYNEDJajGdNx1IsQ==" crossorigin="" />
<script src="https://unpkg.com/leaflet@1.0.3/dist/leaflet-src.js" integrity="sha512-WXoSHqw/t26DszhdMhOXOkI7qCiv5QWXhH9R7CgvgZMHz1ImlkVQ3uNsiQKu5wwbbxtPzFXd1hK4tzno2VqhpA==" crossorigin=""></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="../screen.css" />
<link rel="stylesheet" href="../../dist/MarkerCluster.css" />
<link rel="stylesheet" href="../../dist/MarkerCluster.Default.css" />
<script src="../../src/DistanceGrid.js"></script>
<script src="../../src/MarkerCluster.js"></script>
<script src="../../src/MarkerClusterGroup.js"></script>
<script src="../../src/MarkerCluster.QuickHull.js"></script>
<script src="../../src/MarkerCluster.Spiderfier.js"></script>
</head>
<body>
<div id="map"></div>
<button id="doit">Zoom in</button><br/>
<span>Bug <a href="https://github.com/leaflet/Leaflet.markercluster/issues/216">#216</a>. Click the button. It will zoom in, leaflet will not do an animation for the zoom. A marker should be visible.</span><br/>
<span id="time"></span>
<script type="text/javascript">
var tiles = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 18,
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
}),
latlng = new L.LatLng(-37.36142550190516, 174.254150390625);
var map = new L.Map('map', {center: latlng, zoom: 7, layers: [tiles]});
var markers = new L.MarkerClusterGroup();
markers.addLayer(new L.Marker([-37.77852090603777, 175.3103667497635])); //The one we zoom in on
markers.addLayer(new L.Marker([-37.711800591811055, 174.50034790039062])); //Marker that we cluster with at the top zoom level, but not 1 level down
map.addLayer(markers);
//Ugly add/remove code
L.DomUtil.get('doit').onclick = function () {
map.setView([-37.77852090603777, 175.3103667497635], 15);
};
</script>
</body>
</html>

59
public/lib/leaflet.markercluster/example/old-bugs/click-cluster-at-screen-edge.html

@ -0,0 +1,59 @@
<!DOCTYPE html>
<html>
<head>
<title>Leaflet debug page</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.0.3/dist/leaflet.css" integrity="sha512-07I2e+7D8p6he1SIM+1twR5TIrhUQn9+I6yjqD53JQjFiMf8EtC93ty0/5vJTZGF8aAocvHYNEDJajGdNx1IsQ==" crossorigin="" />
<script src="https://unpkg.com/leaflet@1.0.3/dist/leaflet-src.js" integrity="sha512-WXoSHqw/t26DszhdMhOXOkI7qCiv5QWXhH9R7CgvgZMHz1ImlkVQ3uNsiQKu5wwbbxtPzFXd1hK4tzno2VqhpA==" crossorigin=""></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="../screen.css" />
<link rel="stylesheet" href="../../dist/MarkerCluster.css" />
<link rel="stylesheet" href="../../dist/MarkerCluster.Default.css" />
<script src="../../src/DistanceGrid.js"></script>
<script src="../../src/MarkerCluster.js"></script>
<script src="../../src/MarkerClusterGroup.js"></script>
<script src="../../src/MarkerCluster.QuickHull.js"></script>
<script src="../../src/MarkerCluster.Spiderfier.js"></script>
</head>
<body>
<div id="map"></div>
<span>Bug <a href="https://github.com/leaflet/Leaflet.markercluster/issues/344">#344</a>. Click the cluster at the screen edge. Map will zoom to it and its markers will appear, but it will not disappear.</span><br/>
<span id="time"></span>
<script type="text/javascript">
var iconCreateFunction = function (cluster) {
var childCount = cluster.getChildCount();
var c = ' marker-cluster-';
if (childCount < 10) {
c += 'small';
} else if (childCount < 100) {
c += 'medium';
} else {
c += 'large';
}
return new L.DivIcon({ html: '<div><span>' + childCount + '</span></div>', className: 'marker-cluster' + c, iconSize: new L.Point(270, 270) });
};
var tiles = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 18,
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
}),
latlng = new L.LatLng(54.18815548107151, 6.1083984375);
var map = new L.Map('map', {center: latlng, zoom: 5, layers: [tiles]});
var markers = new L.MarkerClusterGroup({ iconCreateFunction: iconCreateFunction });
var markersList = [];
markers.addLayer(new L.Marker([41.969073, 5]));
markers.addLayer(new L.Marker([41.969073, 7]));
map.addLayer(markers);
</script>
</body>
</html>

106
public/lib/leaflet.markercluster/example/old-bugs/disappearing-marker-from-spider.html

@ -0,0 +1,106 @@
<!DOCTYPE html>
<html>
<head>
<title>Leaflet debug page</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.0.3/dist/leaflet.css" integrity="sha512-07I2e+7D8p6he1SIM+1twR5TIrhUQn9+I6yjqD53JQjFiMf8EtC93ty0/5vJTZGF8aAocvHYNEDJajGdNx1IsQ==" crossorigin="" />
<script src="https://unpkg.com/leaflet@1.0.3/dist/leaflet-src.js" integrity="sha512-WXoSHqw/t26DszhdMhOXOkI7qCiv5QWXhH9R7CgvgZMHz1ImlkVQ3uNsiQKu5wwbbxtPzFXd1hK4tzno2VqhpA==" crossorigin=""></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="../screen.css" />
<link rel="stylesheet" href="../../dist/MarkerCluster.css" />
<link rel="stylesheet" href="../../dist/MarkerCluster.Default.css" />
<script src="../../dist/leaflet.markercluster-src.js"></script>
</head>
<body style="font-family: verdana; font-size: 80%;">
<div id="map"></div>
Click on the cluster to <strong>spiderfy</strong> and then <button id="moveTrain">move train</button><br/>
<br/>
<div style="color: #888;"><strong>Note:</strong> The marker on the old cluster position comes back on next move or on map scrolling.</div>
<script type="text/javascript">
var stationJson = {
"type":"FeatureCollection",
"features":[
{"type":"Feature","id":1,"properties":{"type":"station","name":"Appenzell"},"geometry":{"type":"Point","coordinates":[9.40991,47.32849]}},
{"type":"Feature","id":2,"properties":{"type":"station","name":"Gais"},"geometry":{"type":"Point","coordinates":[9.45107,47.36073]}},
{"type":"Feature","id":3,"properties":{"type":"station","name":"St. Gallen"},"geometry":{"type":"Point","coordinates":[9.36901,47.42208]}},
{"type":"Feature","id":4,"properties":{"type":"station","name":"Teufen"},"geometry":{"type":"Point","coordinates":[9.390178,47.390157]}}
]};
var trainJson = [{
"type":"FeatureCollection",
"features":[
{"type":"Feature","id":10,"properties":{"type":"train","name":"Testtrain"},"geometry":{"type":"Point","coordinates":[9.36901,47.42208]}}
]},{
"type":"FeatureCollection",
"features":[
{"type":"Feature","id":10,"properties":{"type":"train","name":"Testtrain"},"geometry":{"type":"Point","coordinates":[9.390178,47.390157]}}
]},{
"type":"FeatureCollection",
"features":[
{"type":"Feature","id":10,"properties":{"type":"train","name":"Testtrain"},"geometry":{"type":"Point","coordinates":[9.45107,47.36073]}}
]},{
"type":"FeatureCollection",
"features":[
{"type":"Feature","id":10,"properties":{"type":"train","name":"Testtrain"},"geometry":{"type":"Point","coordinates":[9.40991,47.32849]}}
]}];
var trainPosition = 0,
trainDirection = 'up';
var tiles = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 18,
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
}),
map = new L.Map('map', {zoom: 15, layers: [tiles]}),
markers = new L.MarkerClusterGroup({ spiderfyOnMaxZoom: false, showCoverageOnHover: false, zoomToBoundsOnClick: false });
var stationGeoJsonLayer = L.geoJson(stationJson, {
onEachFeature: function (feature, layer) {
layer.bindPopup(feature.properties.name);
}
}),
trainGeoJsonLayer = L.geoJson(trainJson[trainPosition], {
onEachFeature: function (feature, layer) {
layer.bindPopup(feature.properties.name);
}
});
// initial load
markers.addLayer(stationGeoJsonLayer);
markers.addLayer(trainGeoJsonLayer);
map.fitBounds(markers.getBounds());
markers.on('clusterclick', function (a) {
a.layer.spiderfy();
});
map.addLayer(markers);
/**
* Demonstration method that simulates that we got a new geoJson object with updated train positions.
*/
function moveTrain() {
if (trainDirection == 'up') trainPosition++;
else if (trainDirection == 'down') trainPosition--;
if (trainPosition == trainJson.length-1) trainDirection = 'down';
else if (trainPosition == 0) trainDirection = 'up';
// build a new geoJson layer with the new train information
trainGeoJsonLayer = L.geoJson(trainJson[trainPosition], {});
// update the cluster markers with both layers (stations first so that the station marker is always the first on spider.
markers.clearLayers();
markers.addLayer(stationGeoJsonLayer);
markers.addLayer(trainGeoJsonLayer);
}
L.DomUtil.get('moveTrain').onclick = function () {
moveTrain();
};
</script>
</body>
</html>

69
public/lib/leaflet.markercluster/example/old-bugs/doesnt-update-cluster-on-bottom-level.html

@ -0,0 +1,69 @@
<!DOCTYPE html>
<html>
<head>
<title>Leaflet debug page</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.0.3/dist/leaflet.css" integrity="sha512-07I2e+7D8p6he1SIM+1twR5TIrhUQn9+I6yjqD53JQjFiMf8EtC93ty0/5vJTZGF8aAocvHYNEDJajGdNx1IsQ==" crossorigin="" />
<script src="https://unpkg.com/leaflet@1.0.3/dist/leaflet-src.js" integrity="sha512-WXoSHqw/t26DszhdMhOXOkI7qCiv5QWXhH9R7CgvgZMHz1ImlkVQ3uNsiQKu5wwbbxtPzFXd1hK4tzno2VqhpA==" crossorigin=""></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="../screen.css" />
<link rel="stylesheet" href="../../dist/MarkerCluster.css" />
<link rel="stylesheet" href="../../dist/MarkerCluster.Default.css" />
<script src="../../src/DistanceGrid.js"></script>
<script src="../../src/MarkerCluster.js"></script>
<script src="../../src/MarkerClusterGroup.js"></script>
<script src="../../src/MarkerCluster.QuickHull.js"></script>
<script src="../../src/MarkerCluster.Spiderfier.js"></script>
</head>
<body>
<div id="map"></div>
<button id="doit">AddMarker</button><button id="doit2">Add by Timer</button><br/>
<span>Bug <a href="https://github.com/danzel/Leaflet.markercluster/issues/114">#114</a>. Markers are added to the map periodically using addLayers. Bug was that after becoming a cluster (size 2 or 3 usually) they would never change again even if more markers were added to them.</span><br/>
<script type="text/javascript">
var tiles = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 18,
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
}),
latlng = new L.LatLng(40.782982, -73.969452);
var map = new L.Map('map', {
center: latlng,
zoom: 12,
maxZoom: 12,
layers: [tiles]
});
var markerCluster = new L.MarkerClusterGroup();
map.addLayer(markerCluster);
function getRandomLatLng() {
return [
40.782982 + (Math.random() > 0.5 ? 0.5 : -0.5) * Math.random(),
-73.969452 + (Math.random() > 0.5 ? 0.5 : -0.5) * Math.random()
];
}
document.getElementById('doit').onclick = function () {
markerCluster.addLayers([new L.Marker(map.getCenter())]);
};
document.getElementById('doit2').onclick = function () {
setInterval(function () {
var n = 100;
var markers = new Array();
for (var i = 0; i < n; i++) {
markers.push(L.marker(getRandomLatLng()));
}
markerCluster.addLayers(markers);
}, 1000);
};
</script>
</body>
</html>

75
public/lib/leaflet.markercluster/example/old-bugs/drag-with-spiderfying.html

@ -0,0 +1,75 @@
<!DOCTYPE html>
<html>
<head>
<title>Leaflet debug page</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.3.4/dist/leaflet.css" integrity="sha384-BF7C732iE6WuqJMhUnTNJJLVvW1TIP87P2nMDY7aN2j2EJFWIaqK89j3WlirhFZU" crossorigin="" />
<script src="https://unpkg.com/leaflet@1.3.4/dist/leaflet-src.js" integrity="sha384-oMM5jge511WERo7suehl8Npas4BrPvBEOY54KSP3MygO5gqNxTMKKIcMkS/E9JEX" crossorigin=""></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="../screen.css" />
<link rel="stylesheet" href="../../dist/MarkerCluster.css" />
<link rel="stylesheet" href="../../dist/MarkerCluster.Default.css" />
<script src="../../dist/leaflet.markercluster.js"></script>
</head>
<body>
<div id="map"></div>
<span>Bug <a href="https://github.com/Leaflet/Leaflet.markercluster/issues/907">#907</a>. Drag a marker from a spiderfied cluster over other clusters.</span><br/>
<span>Bug <a href="https://github.com/Leaflet/Leaflet.markercluster/issues/808">#808</a>. Drag a marker and while dragging zoom out with scroll-wheel.</span><br/>
<script type="text/javascript">
var tiles = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 12,
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
}),
latlng = new L.LatLng(48.85, 2.35);
var map = new L.Map('map', {center: latlng, zoom: 12, layers: [tiles]});
var mcg = new L.MarkerClusterGroup();
map.addLayer(mcg);
var dragMarker;
var lastCluster;
var oldZIndex;
for (var i = 0; i < 25; i += 1) {
L.marker(getRandomLatLng(), {
draggable: true
}).addTo(mcg).on("dragstart", function(event) {
oldZIndex = event.target._zIndex;
event.target.setZIndexOffset(-1000);
dragMarker = this;
}).on("dragend", function(event) {
event.target.setZIndexOffset(oldZIndex);
dragMarker = null;
if (lastCluster) {
lastCluster.unspiderfy();
}
lastCluster = null
});
}
mcg.on('clustermouseover', function (event) {
if (dragMarker && lastCluster !== event.layer) {
if (lastCluster) {
mcg.once("unspiderfied", function() { // wait for animation end
event.layer.spiderfy();
});
lastCluster.unspiderfy();
} else {
event.layer.spiderfy();
}
lastCluster = event.layer;
}
});
function getRandomLatLng() {
return [
48.8 + 0.1 * Math.random(),
2.25 + 0.2 * Math.random()
];
}
</script>
</body>
</html>

74
public/lib/leaflet.markercluster/example/old-bugs/remove-add-clustering.html

@ -0,0 +1,74 @@
<!DOCTYPE html>
<html>
<head>
<title>Leaflet debug page</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.0.3/dist/leaflet.css" integrity="sha512-07I2e+7D8p6he1SIM+1twR5TIrhUQn9+I6yjqD53JQjFiMf8EtC93ty0/5vJTZGF8aAocvHYNEDJajGdNx1IsQ==" crossorigin="" />
<script src="https://unpkg.com/leaflet@1.0.3/dist/leaflet-src.js" integrity="sha512-WXoSHqw/t26DszhdMhOXOkI7qCiv5QWXhH9R7CgvgZMHz1ImlkVQ3uNsiQKu5wwbbxtPzFXd1hK4tzno2VqhpA==" crossorigin=""></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="../screen.css" />
<link rel="stylesheet" href="../../dist/MarkerCluster.css" />
<link rel="stylesheet" href="../../dist/MarkerCluster.Default.css" />
<script src="../../src/DistanceGrid.js"></script>
<script src="../../src/MarkerCluster.js"></script>
<script src="../../src/MarkerClusterGroup.js"></script>
<script src="../../src/MarkerCluster.QuickHull.js"></script>
<script src="../../src/MarkerCluster.Spiderfier.js"></script>
</head>
<body>
<div id="map"></div>
<p>Whenever a marker is clicked it is removed from the clusterer and added directly to the map instead.</p>
<p>Click Marker on Left, zoom out 1 layer, click marker on right.</p>
<p>Expected behaviour: Both markers are shown. Bugged behaviour: Both markers are on map with opacity 0.</p>
<pre id="log"></pre>
<script type="text/javascript">
var tiles = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 18,
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
}),
latlng = new L.LatLng(50.5, 30.51);
var map = new L.Map('map', {center: latlng, zoom: 15, layers: [tiles]});
var markers = new L.MarkerClusterGroup({ animateAddingMarkers: true });
var markersList = [];
var m;
m = new L.Marker([50.5, 30.51]);
markersList.push(m);
markers.addLayer(m);
m = new L.Marker([50.5, 30.515]);
markersList.push(m);
markers.addLayer(m);
map.addLayer(markers);
var lastClicked = null;
markers.on('click', function (m) {
console.log('clicked ' + m);
if (lastClicked) {
map.removeLayer(lastClicked);
markers.addLayer(lastClicked);
}
lastClicked = m.layer;
markers.removeLayer(lastClicked);
map.addLayer(lastClicked);
});
map.on('click', function () {
console.log('map clicked');
if (lastClicked) {
map.removeLayer(lastClicked);
markers.addLayer(lastClicked);
}
lastClicked = null;
});
</script>
</body>
</html>

65
public/lib/leaflet.markercluster/example/old-bugs/remove-when-spiderfied.html

@ -0,0 +1,65 @@
<!DOCTYPE html>
<html>
<head>
<title>Leaflet debug page</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.0.3/dist/leaflet.css" integrity="sha512-07I2e+7D8p6he1SIM+1twR5TIrhUQn9+I6yjqD53JQjFiMf8EtC93ty0/5vJTZGF8aAocvHYNEDJajGdNx1IsQ==" crossorigin="" />
<script src="https://unpkg.com/leaflet@1.0.3/dist/leaflet-src.js" integrity="sha512-WXoSHqw/t26DszhdMhOXOkI7qCiv5QWXhH9R7CgvgZMHz1ImlkVQ3uNsiQKu5wwbbxtPzFXd1hK4tzno2VqhpA==" crossorigin=""></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="../screen.css" />
<link rel="stylesheet" href="../../dist/MarkerCluster.css" />
<link rel="stylesheet" href="../../dist/MarkerCluster.Default.css" />
<script src="../../src/DistanceGrid.js"></script>
<script src="../../src/MarkerCluster.js"></script>
<script src="../../src/MarkerClusterGroup.js"></script>
<script src="../../src/MarkerCluster.QuickHull.js"></script>
<script src="../../src/MarkerCluster.Spiderfier.js"></script>
</head>
<body>
<div id="map"></div>
<button id="doit">Remove and add direct to map</button><button id="doit2">clearLayers</button><button id="doit3">removeLayers</button><br/>
<span>Bug <a href="https://github.com/danzel/Leaflet.markercluster/issues/54">#54</a>. Spiderfy the cluster then click the button. Should result in 2 markers right beside each other on the map.</span><br/>
<span>Bug <a href="https://github.com/danzel/Leaflet.markercluster/issues/53">#53</a>. Spiderfy the cluster then click the button. Spider lines remain on the map.</span><br/>
<span>Bug <a href="https://github.com/danzel/Leaflet.markercluster/issues/49">#49</a>. Spiderfy the cluster then click the second button. Spider lines remain on the map. Click the map to get an error.</span>
<script type="text/javascript">
var tiles = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 18,
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
}),
latlng = new L.LatLng(50.5, 30.51);
var map = new L.Map('map', {center: latlng, zoom: 15, layers: [tiles]});
var markers = new L.MarkerClusterGroup();
var markersList = [];
var m;
m = new L.Marker([50.5, 30.51]);
markersList.push(m);
markers.addLayer(m);
m = new L.Marker([50.5, 30.5101]);
markersList.push(m);
markers.addLayer(m);
map.addLayer(markers);
//Ugly add/remove code
L.DomUtil.get('doit').onclick = function () {
map.removeLayer(markers);
map.addLayer(markersList[0]);
map.addLayer(markersList[1]);
};
L.DomUtil.get('doit2').onclick = function () {
markers.clearLayers();
};
L.DomUtil.get('doit3').onclick = function () {
markers.removeLayers(markersList);
};
</script>
</body>
</html>

69
public/lib/leaflet.markercluster/example/old-bugs/removelayer-after-remove-from-map.html

@ -0,0 +1,69 @@
<!DOCTYPE html>
<html>
<head>
<title>Leaflet debug page</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.0.3/dist/leaflet.css" integrity="sha512-07I2e+7D8p6he1SIM+1twR5TIrhUQn9+I6yjqD53JQjFiMf8EtC93ty0/5vJTZGF8aAocvHYNEDJajGdNx1IsQ==" crossorigin="" />
<script src="https://unpkg.com/leaflet@1.0.3/dist/leaflet-src.js" integrity="sha512-WXoSHqw/t26DszhdMhOXOkI7qCiv5QWXhH9R7CgvgZMHz1ImlkVQ3uNsiQKu5wwbbxtPzFXd1hK4tzno2VqhpA==" crossorigin=""></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="../screen.css" />
<link rel="stylesheet" href="../../dist/MarkerCluster.css" />
<link rel="stylesheet" href="../../dist/MarkerCluster.Default.css" />
<script src="../../src/DistanceGrid.js"></script>
<script src="../../src/MarkerCluster.js"></script>
<script src="../../src/MarkerClusterGroup.js"></script>
<script src="../../src/MarkerCluster.QuickHull.js"></script>
<script src="../../src/MarkerCluster.Spiderfier.js"></script>
</head>
<body>
<div id="map"></div>
<a href="#" onclick="swapLayers()">1 - Swap layers</a><br>
<a href="#" onclick="removeMarker()">2 - Remove all markers</a><br>
<a href="#" onclick="swapLayers()">3 - Swap layers again =&gt; Marker is still there<a/></br>
<span>Bug <a href="https://github.com/danzel/Leaflet.markercluster/issues/160">#160</a>. Click 1,2,3. There should be nothing on the map.</span><br/>
<script type="text/javascript">
var map = new L.Map('map');
var tiles = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 18,
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
});
map.addLayer(tiles);
var objectBounds = [[44.98131207805678, 6.0726203025917], [44.981459751363204, 6.073026722623153]];
map.fitBounds(new L.LatLngBounds(objectBounds));
var markers1 = new L.MarkerClusterGroup();
var markers2 = new L.MarkerClusterGroup();
map.addLayer(markers1);
var aMarker = new L.Marker(new L.LatLng(44.9813, 6.072620));
var anotherMarker = new L.Marker(new L.LatLng(44.9814, 6.072621));
markers1.addLayer(aMarker);
markers2.addLayer(anotherMarker);
swapLayers = function(){
if (map.hasLayer(markers1)){
map.removeLayer(markers1);
map.addLayer(markers2);
}else{
map.removeLayer(markers2);
map.addLayer(markers1);
}
};
removeMarker = function(){
markers1.removeLayer(aMarker);
markers2.removeLayer(anotherMarker);
};
</script>
</body>
</html>

69
public/lib/leaflet.markercluster/example/old-bugs/setView-doesnt-remove.html

@ -0,0 +1,69 @@
<!DOCTYPE html>
<html>
<head>
<title>Leaflet debug page</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.0.3/dist/leaflet.css" integrity="sha512-07I2e+7D8p6he1SIM+1twR5TIrhUQn9+I6yjqD53JQjFiMf8EtC93ty0/5vJTZGF8aAocvHYNEDJajGdNx1IsQ==" crossorigin="" />
<script src="https://unpkg.com/leaflet@1.0.3/dist/leaflet-src.js" integrity="sha512-WXoSHqw/t26DszhdMhOXOkI7qCiv5QWXhH9R7CgvgZMHz1ImlkVQ3uNsiQKu5wwbbxtPzFXd1hK4tzno2VqhpA==" crossorigin=""></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="../screen.css" />
<link rel="stylesheet" href="../../dist/MarkerCluster.css" />
<link rel="stylesheet" href="../../dist/MarkerCluster.Default.css" />
<script src="../../src/DistanceGrid.js"></script>
<script src="../../src/MarkerCluster.js"></script>
<script src="../../src/MarkerClusterGroup.js"></script>
<script src="../../src/MarkerCluster.QuickHull.js"></script>
<script src="../../src/MarkerCluster.Spiderfier.js"></script>
</head>
<body>
<div id="map"></div>
<button id="doit">setView</button><br/>
<span>Bug <a href="https://github.com/danzel/Leaflet.markercluster/issues/63">#63</a>. Zoom down on the very left side untill markers are visible. Click the button. Scroll to the left in one go, those markers should be in clusters but the actual markers will still be visible.</span><br/>
<span id="time"></span>
<script type="text/javascript">
//Mobile does different bounds to desktop, makes the bug easier to reproduce
L.Browser.mobile = true;
var tiles = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 18,
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
}),
latlng = new L.LatLng(50.5, 30.51);
var map = new L.Map('map', {center: latlng, zoom: 15, layers: [tiles]});
var markers = new L.MarkerClusterGroup();
var markersList = [];
function getRandomLatLng(map) {
var bounds = map.getBounds(),
southWest = bounds.getSouthWest(),
northEast = bounds.getNorthEast(),
lngSpan = northEast.lng - southWest.lng,
latSpan = northEast.lat - southWest.lat;
return new L.LatLng(
southWest.lat + latSpan * Math.random(),
southWest.lng + lngSpan * Math.random());
}
function populate(length) {
for (var i = 0; i < length; i++) {
var m = new L.Marker(getRandomLatLng(map));
markers.addLayer(m);
}
}
populate(1000);
map.addLayer(markers);
L.DomUtil.get('doit').onclick = function () {
map.setView(new L.LatLng(50.5, 30.525), 15);
};
</script>
</body>
</html>

63
public/lib/leaflet.markercluster/example/old-bugs/zoomtoshowlayer-doesnt-need-to-zoom.html

@ -0,0 +1,63 @@
<!DOCTYPE html>
<html>
<head>
<title>Leaflet debug page</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.0.3/dist/leaflet.css" integrity="sha512-07I2e+7D8p6he1SIM+1twR5TIrhUQn9+I6yjqD53JQjFiMf8EtC93ty0/5vJTZGF8aAocvHYNEDJajGdNx1IsQ==" crossorigin="" />
<script src="https://unpkg.com/leaflet@1.0.3/dist/leaflet-src.js" integrity="sha512-WXoSHqw/t26DszhdMhOXOkI7qCiv5QWXhH9R7CgvgZMHz1ImlkVQ3uNsiQKu5wwbbxtPzFXd1hK4tzno2VqhpA==" crossorigin=""></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="../screen.css" />
<link rel="stylesheet" href="../../dist/MarkerCluster.css" />
<link rel="stylesheet" href="../../dist/MarkerCluster.Default.css" />
<script src="../../src/DistanceGrid.js"></script>
<script src="../../src/MarkerCluster.js"></script>
<script src="../../src/MarkerClusterGroup.js"></script>
<script src="../../src/MarkerCluster.QuickHull.js"></script>
<script src="../../src/MarkerCluster.Spiderfier.js"></script>
</head>
<body>
<div id="map"></div>
<button id="doit">open popup</button><br/>
<span>Bug <a href="https://github.com/danzel/Leaflet.markercluster/issues/65">#65</a>. Click 2 then click the button. You should be scrolled to the marker, old behaviour would zoom you out.</span><br/>
<span id="time"></span>
<script type="text/javascript">
var tiles = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 18,
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
}),
latlng = new L.LatLng(50.5, 30.51);
var map = new L.Map('map', {center: latlng, zoom: 15, layers: [tiles]});
var markers = new L.MarkerClusterGroup();
var markersList = [];
var m = new L.Marker(new L.LatLng(50.507, 30.502));
m.bindPopup('asdasd');
markersList.push(m);
markers.addLayer(m);
m = new L.Marker(new L.LatLng(50.493, 30.518));
markersList.push(m);
markers.addLayer(m);
m = new L.Marker(new L.LatLng(50.493, 30.518));
markersList.push(m);
markers.addLayer(m);
map.addLayer(markers);
L.DomUtil.get('doit').onclick = function () {
markers.zoomToShowLayer(markersList[0], function () {
markersList[0].openPopup();
});
};
</script>
</body>
</html>

56
public/lib/leaflet.markercluster/example/old-bugs/zoomtoshowlayer-doesnt-zoom-if-centered-on.html

@ -0,0 +1,56 @@
<!DOCTYPE html>
<html>
<head>
<title>Leaflet debug page</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.0.3/dist/leaflet.css" integrity="sha512-07I2e+7D8p6he1SIM+1twR5TIrhUQn9+I6yjqD53JQjFiMf8EtC93ty0/5vJTZGF8aAocvHYNEDJajGdNx1IsQ==" crossorigin="" />
<script src="https://unpkg.com/leaflet@1.0.3/dist/leaflet-src.js" integrity="sha512-WXoSHqw/t26DszhdMhOXOkI7qCiv5QWXhH9R7CgvgZMHz1ImlkVQ3uNsiQKu5wwbbxtPzFXd1hK4tzno2VqhpA==" crossorigin=""></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="../screen.css" />
<link rel="stylesheet" href="../../dist/MarkerCluster.css" />
<link rel="stylesheet" href="../../dist/MarkerCluster.Default.css" />
<script src="../../src/DistanceGrid.js"></script>
<script src="../../src/MarkerCluster.js"></script>
<script src="../../src/MarkerClusterGroup.js"></script>
<script src="../../src/MarkerCluster.QuickHull.js"></script>
<script src="../../src/MarkerCluster.Spiderfier.js"></script>
</head>
<body>
<div id="map"></div>
<button id="doit">open popup</button><br/>
<span>Bug <a href="https://github.com/danzel/Leaflet.markercluster/issues/286">#286 (from @Grsmto)</a>. Click the button. The cluster should spiderfy and show the popup, old behaviour did nothing.</span><br/>
<span id="time"></span>
<script type="text/javascript">
var tiles = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 18,
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
}),
latlng = new L.LatLng(50.5, 30.51);
var map = new L.Map('map', {center: latlng, zoom: 18, layers: [tiles]});
var markers = new L.MarkerClusterGroup();
var markersList = [];
for (var i = 0; i < 3; i++) {
var m = new L.Marker(latlng);
m.bindPopup('asdasd' + i);
markersList.push(m);
markers.addLayer(m);
}
map.addLayer(markers);
L.DomUtil.get('doit').onclick = function () {
//debugger;
markers.zoomToShowLayer(markersList[0], function () {
markersList[0].openPopup();
});
};
</script>
</body>
</html>

10004
public/lib/leaflet.markercluster/example/realworld.10000.js

File diff suppressed because it is too large Load Diff

393
public/lib/leaflet.markercluster/example/realworld.388.js

@ -0,0 +1,393 @@
//An extract of address points from the LINZ bulk extract: http://www.linz.govt.nz/survey-titles/landonline-data/landonline-bde
//Should be this data set: http://data.linz.govt.nz/#/layer/779-nz-street-address-electoral/
var addressPoints = [
[-37.8210922667, 175.2209316333, "2"],
[-37.8210819833, 175.2213903167, "3"],
[-37.8210881833, 175.2215004833, "3A"],
[-37.8211946833, 175.2213655333, "1"],
[-37.8209458667, 175.2214051333, "5"],
[-37.8208292333, 175.2214374833, "7"],
[-37.8325816, 175.2238798667, "537"],
[-37.8315855167, 175.2279767, "454"],
[-37.8096336833, 175.2223743833, "176"],
[-37.80970685, 175.2221815833, "178"],
[-37.8102146667, 175.2211562833, "190"],
[-37.8088037167, 175.2242227, "156"],
[-37.8112330167, 175.2193425667, "210"],
[-37.8116368667, 175.2193005167, "212"],
[-37.80812645, 175.2255449333, "146"],
[-37.8080231333, 175.2286383167, "125"],
[-37.8089538667, 175.2222222333, "174"],
[-37.8080905833, 175.2275400667, "129"],
[-37.808811, 175.2227592833, "172"],
[-37.80832975, 175.2276898167, "131"],
[-37.8089395333, 175.2281710333, "133"],
[-37.8093421, 175.2274883167, "135"],
[-37.8084820833, 175.22601925, "137"],
[-37.80881015, 175.22622865, "139"],
[-37.8090947667, 175.2263585667, "141"],
[-37.8092962333, 175.2244872333, "147"],
[-37.8091016667, 175.2249140167, "145"],
[-37.8088785167, 175.2253611667, "143"],
[-37.80825965, 175.22530115, "148"],
[-37.80995685, 175.2238554333, "153"],
[-37.80975435, 175.2238417833, "151"],
[-37.80950755, 175.2237912, "149"],
[-37.8092772667, 175.2231980833, "170"],
[-37.8082753833, 175.20672975, "4"],
[-37.8078434833, 175.211822, "56"],
[-37.8083775667, 175.2090812333, "30B"],
[-37.8084588, 175.2058838167, "174"],
[-37.8088788333, 175.2062702833, "175"],
[-37.8091632833, 175.20514875, "182A"],
[-37.8094891167, 175.20384695, "202"],
[-37.8156715667, 175.2034881667, "277"],
[-37.8109189333, 175.2024631, "220"],
[-37.8108164333, 175.2039622, "219"],
[-37.8125773667, 175.2026079667, "238"],
[-37.8125799333, 175.2032824, "241A"],
[-37.8125869, 175.2037423833, "241C"],
[-37.8140266833, 175.2025706, "256"],
[-37.80932, 175.2051094333, "182B"],
[-37.8098799667, 175.2040444167, "197"],
[-37.8094298833, 175.20561245, "189"],
[-37.8172409333, 175.2035291167, "287"],
[-37.8232166667, 175.22452865, "2028"],
[-37.8225024333, 175.2249944667, "2022"],
[-37.82334135, 175.2244748667, "2030"],
[-37.8229725333, 175.2246809333, "2026"],
[-37.8224034667, 175.22507345, "2020"],
[-37.8227806, 175.2248285833, "2024"],
[-37.8178801, 175.2181871667, "6"],
[-37.81811315, 175.2180543667, "4"],
[-37.8181739833, 175.21851995, "1"],
[-37.81797515, 175.2186312, "3"],
[-37.8181787, 175.2176995, "2A"],
[-37.8183385333, 175.21812895, "2"],
[-37.8293053167, 175.2105357833, "31"],
[-37.8309444333, 175.21208735, "16"],
[-37.8306726667, 175.2115020833, "19"],
[-37.8300903, 175.2120791, "26"],
[-37.8289416167, 175.2113778333, "33"],
[-37.8274969167, 175.2113355167, "53"],
[-37.8199192667, 175.2173622833, "5A"],
[-37.8200392833, 175.2174100167, "3"],
[-37.8196328, 175.2167642, "18"],
[-37.81752585, 175.2155467667, "22C"],
[-37.81766615, 175.2153714167, "22B"],
[-37.8179022667, 175.2151616833, "22A"],
[-37.8191980333, 175.21664245, "20A"],
[-37.81799325, 175.21565925, "20C"],
[-37.8187486333, 175.2165228667, "20B"],
[-37.81964875, 175.2172874167, "7"],
[-37.81925545, 175.2171617, "11"],
[-37.8190491667, 175.2170928333, "13"],
[-37.8194515667, 175.2172147167, "9"],
[-37.81981045, 175.21733245, "5B"],
[-37.81876595, 175.2172445167, "15B"],
[-37.8185999167, 175.2172441, "17A"],
[-37.81816745, 175.21725905, "21B"],
[-37.8182157167, 175.2164626333, "24"],
[-37.8180109667, 175.2173984167, "23A"],
[-37.8179918, 175.217159, "23B"],
[-37.8188473167, 175.2170330333, "15"],
[-37.8186481333, 175.2169800667, "17"],
[-37.8184132, 175.2169327333, "19"],
[-37.8202288333, 175.2174746333, "1"],
[-37.818193, 175.2169955667, "21"],
[-37.8178000833, 175.21733275, "25"],
[-37.8176839, 175.2168488333, "26"],
[-37.8198172, 175.2204960667, "5"],
[-37.819986, 175.22049635, "3"],
[-37.8197666, 175.2200825, "4"],
[-37.8193835833, 175.2191669667, "10"],
[-37.8193426333, 175.2198626667, "11"],
[-37.8192171667, 175.2191711, "12"],
[-37.8192621333, 175.2196364167, "13"],
[-37.8195289667, 175.2193943167, "8"],
[-37.81946, 175.2201499167, "9"],
[-37.8196037833, 175.219674, "6"],
[-37.8194712, 175.2204032, "7A"],
[-37.8196381, 175.2203709333, "7"],
[-37.8200137667, 175.2201364333, "2"],
[-37.8191725167, 175.2193772833, "14"],
[-37.8214417333, 175.2256822167, "4"],
[-37.8210291, 175.2259429667, "8"],
[-37.8212328333, 175.2258132, "6"],
[-37.8216819833, 175.2253209, "3"],
[-37.8334697167, 175.2038651667, "326"],
[-37.8322603667, 175.2028621167, "317"],
[-37.8322013667, 175.2046802667, "1/341"],
[-37.8320576167, 175.2165535833, "435"],
[-37.8319540333, 175.20506915, "2/341"],
[-37.8316975667, 175.2053442333, "3/341"],
[-37.8328229833, 175.2062598, "346"],
[-37.83161565, 175.2074915, "355"],
[-37.83219305, 175.20629425, "347"],
[-37.8328549, 175.2080619667, "362"],
[-37.8321289667, 175.2084019333, "367"],
[-37.8322225167, 175.2120427667, "397"],
[-37.8321649, 175.21119325, "393"],
[-37.8321458833, 175.2131246333, "407"],
[-37.8327043833, 175.21377405, "416"],
[-37.8321267167, 175.2144058167, "417"],
[-37.83212555, 175.2096521333, "373"],
[-37.8331028667, 175.20928495, "366"],
[-37.82866875, 175.22177625, "563"],
[-37.8295602, 175.21924335, "582"],
[-37.8304707833, 175.2182986167, "590"],
[-37.83086, 175.2180687667, "592"],
[-37.8328604833, 175.2172892167, "618"],
[-37.8342575667, 175.2168357833, "638"],
[-37.8239713, 175.2245693667, "504"],
[-37.8365260167, 175.2170911, "673"],
[-37.8233928833, 175.2249669167, "492"],
[-37.8248650167, 175.2246300833, "509"],
[-37.8191798333, 175.2265331667, "435"],
[-37.8143243333, 175.2310940167, "368"],
[-37.81459255, 175.2320046, "363"],
[-37.81127515, 175.2356499167, "311"],
[-37.8126359667, 175.2340855167, "333"],
[-37.8096158333, 175.2375218167, "293"],
[-37.8315868667, 175.2177722833, "604"],
[-37.8160177667, 175.2299268333, "391"],
[-37.8204715667, 175.2265481833, "456"],
[-37.8206352, 175.2265670333, "458"],
[-37.8208412667, 175.2265323333, "460"],
[-37.8210184333, 175.22648325, "462"],
[-37.8212643833, 175.2270422167, "465"],
[-37.82119945, 175.2264274333, "464"],
[-37.82136485, 175.2263145667, "466"],
[-37.8215261, 175.22684075, "467"],
[-37.8215301833, 175.2262078, "468"],
[-37.8217701667, 175.2266360167, "1/471"],
[-37.8218376833, 175.22686725, "2/471"],
[-37.8217084667, 175.2260839667, "472"],
[-37.8219782333, 175.2265028333, "475"],
[-37.8218988833, 175.2259723, "476"],
[-37.8223939333, 175.2262447, "479"],
[-37.8223048667, 175.2256582833, "480"],
[-37.8226657, 175.2261230833, "481"],
[-37.8224199, 175.2255487833, "482"],
[-37.8229134167, 175.2259527833, "485"],
[-37.8226937833, 175.2253693167, "486"],
[-37.8231509667, 175.2258170333, "487"],
[-37.82295265, 175.2252571167, "488"],
[-37.8233779, 175.2256743833, "489"],
[-37.8232052667, 175.2251109333, "490"],
[-37.8236200333, 175.22553395, "493"],
[-37.82385775, 175.2253390833, "495"],
[-37.8203220167, 175.22650925, "454"],
[-37.8179795333, 175.2262826, "428"],
[-37.81038215, 175.2365298167, "303"],
[-37.8161746667, 175.2297239833, "393"],
[-37.8083635333, 175.233955, "294"],
[-37.82029495, 175.2214968167, "39"],
[-37.8204754333, 175.2247793333, "12B"],
[-37.8205440833, 175.22344905, "23"],
[-37.8195974333, 175.2254019333, "2"],
[-37.8210801, 175.2237748667, "20A"],
[-37.8209057333, 175.22389775, "18"],
[-37.8208016833, 175.2221582833, "32"],
[-37.8209372667, 175.2236919, "20"],
[-37.8210586833, 175.22351925, "22B"],
[-37.82092905, 175.2234855333, "22"],
[-37.8208587333, 175.2231887667, "24"],
[-37.8210241167, 175.2230882, "24B"],
[-37.8208547833, 175.2229410667, "26"],
[-37.8209917, 175.2228447667, "26B"],
[-37.82097645, 175.2227176167, "28B"],
[-37.8208099167, 175.2226765167, "28"],
[-37.8207666833, 175.2224338833, "30"],
[-37.8209508833, 175.2222094167, "32B"],
[-37.82076515, 175.2219195167, "34A"],
[-37.8207399667, 175.2218131667, "34B"],
[-37.8203075833, 175.2240482833, "19"],
[-37.8205368167, 175.2237746667, "21"],
[-37.8205025833, 175.2231658, "25A"],
[-37.820465, 175.2229733667, "27"],
[-37.82043535, 175.2227387, "29"],
[-37.8204582, 175.2225319667, "31"],
[-37.82024115, 175.2224347833, "31B"],
[-37.8203792333, 175.2222631667, "33"],
[-37.82034095, 175.2219843, "35"],
[-37.8201566167, 175.2219446, "35B"],
[-37.82030575, 175.2217594333, "37"],
[-37.8202966833, 175.2233158167, "25"],
[-37.8192714167, 175.2253842667, "1"],
[-37.81969695, 175.22516645, "4"],
[-37.8194904667, 175.22468815, "5"],
[-37.8198524333, 175.2249096667, "6"],
[-37.8200581833, 175.2247122, "8"],
[-37.8193447, 175.2244639667, "5C"],
[-37.8208238, 175.2241340167, "16"],
[-37.8193183667, 175.22515695, "1A"],
[-37.81940575, 175.2249383333, "3"],
[-37.8211855167, 175.2242545333, "18A"],
[-37.8207094833, 175.22430275, "14"],
[-37.82027725, 175.22488135, "10A"],
[-37.8202305833, 175.2245652667, "10"],
[-37.8205049667, 175.2244201333, "12"],
[-37.8196320333, 175.2255586, "22"],
[-37.8209711, 175.2250444667, "8"],
[-37.82120665, 175.2252942833, "5"],
[-37.8210184, 175.2254290333, "7"],
[-37.8213430333, 175.2252086167, "3"],
[-37.8207887833, 175.2251555667, "10"],
[-37.82060805, 175.2257042333, "13"],
[-37.8208330333, 175.22553905, "9"],
[-37.8216988833, 175.2249665667, "1"],
[-37.8215665833, 175.2246573333, "2"],
[-37.8213729, 175.2247789333, "4"],
[-37.8211700667, 175.2249324333, "6"],
[-37.8205967667, 175.2252867, "12"],
[-37.8204008833, 175.2254234667, "14"],
[-37.82043265, 175.22582195, "15"],
[-37.8202037333, 175.2255415833, "16"],
[-37.8200154333, 175.2256547667, "18"],
[-37.8197443167, 175.2256164833, "20"],
[-37.8202814333, 175.22590955, "17"],
[-37.8202967667, 175.21462555, "98"],
[-37.82204485, 175.21819735, "61B"],
[-37.8224241, 175.2179326667, "61C"],
[-37.8215043167, 175.2227943833, "24"],
[-37.8219082, 175.2255408167, "8"],
[-37.8216963, 175.2240856667, "14"],
[-37.8213418333, 175.2188135667, "55"],
[-37.8204966333, 175.2183406333, "54A"],
[-37.8221799833, 175.21122085, "139"],
[-37.8217387, 175.22431625, "12"],
[-37.8218650167, 175.2149734167, "107"],
[-37.8214083333, 175.2220152667, "30"],
[-37.8213738333, 175.2217301, "32"],
[-37.8221598167, 175.2247839333, "9"],
[-37.8216356, 175.2235610667, "18"],
[-37.8212188167, 175.2221387333, "30B"],
[-37.8200466667, 175.2166111, "84A"],
[-37.8216679333, 175.2238393333, "16"],
[-37.8211582833, 175.22031685, "34"],
[-37.8221918667, 175.2250378333, "7"],
[-37.8187410167, 175.2067290167, "170C"],
[-37.8206532, 175.2170745667, "81"],
[-37.8212348667, 175.2181024167, "67"],
[-37.8213057667, 175.2185351167, "57"],
[-37.8214571, 175.2145877333, "110"],
[-37.82207085, 175.2136727167, "121"],
[-37.82190125, 175.2123493, "130"],
[-37.8207519667, 175.2102467333, "150"],
[-37.8212159, 175.2096407, "159"],
[-37.8208313833, 175.2067756, "172"],
[-37.8214413333, 175.2222779833, "28"],
[-37.8206921333, 175.2182549, "54"],
[-37.82043975, 175.2181215, "56"],
[-37.8218791, 175.2252452167, "10"],
[-37.82029435, 175.2169818, "84"],
[-37.8215885167, 175.22308725, "22"],
[-37.8215897333, 175.2233113167, "20"],
[-37.82167455, 175.2183345, "61A"],
[-37.8217164667, 175.2179857333, "63"],
[-37.82147385, 175.22253565, "26"],
[-37.8206765333, 175.2160304333, "86"],
[-37.8188941, 175.2069437, "170A"],
[-37.8188068333, 175.2068104833, "170B"],
[-37.8193742667, 175.2085580333, "170"],
[-37.8214388167, 175.2200072, "45"],
[-37.8209547167, 175.2157149167, "92"],
[-37.82088565, 175.2164849333, "85"],
[-37.82136235, 175.2159546667, "97"],
[-37.8219607333, 175.2232987, "19"],
[-37.8210501, 175.2179753833, "69"],
[-37.8212466667, 175.2222175833, "28A"],
[-37.8213836167, 175.22300555, "22A"],
[-37.821339, 175.2227439167, "24A"],
[-37.8208144333, 175.2173117167, "77"],
[-37.8189363667, 175.2211582333, "25"],
[-37.8196676167, 175.2209947333, "26B"],
[-37.8194113, 175.2211991, "26"],
[-37.81883205, 175.2209747, "27"],
[-37.8186925833, 175.2207728833, "29"],
[-37.8199931833, 175.2240802167, "2"],
[-37.8191759333, 175.2208279333, "30"],
[-37.81835395, 175.2196571667, "39"],
[-37.8198807333, 175.2235938167, "6"],
[-37.8194567833, 175.22349015, "7"],
[-37.8200507833, 175.21933875, "58"],
[-37.8197902167, 175.2182408, "59A"],
[-37.81991635, 175.21797195, "59B"],
[-37.8198223833, 175.2179361833, "59C"],
[-37.8201049333, 175.2197347167, "60"],
[-37.8199380333, 175.21836645, "61A"],
[-37.82003775, 175.2182443833, "61B"],
[-37.8200944167, 175.21803015, "61C"],
[-37.8201259667, 175.2185610667, "63"],
[-37.82026275, 175.2188001167, "65"],
[-37.8188917833, 175.2203729333, "34"],
[-37.8184921333, 175.2203832, "33"],
[-37.8190387167, 175.2206181333, "32"],
[-37.81968705, 175.2224253667, "16"],
[-37.81981205, 175.223119, "10"],
[-37.8193882833, 175.2229798333, "11"],
[-37.8190901167, 175.2227829833, "13B"],
[-37.8193593, 175.2227247833, "13"],
[-37.81993935, 175.2226893333, "14B"],
[-37.81842725, 175.2201474167, "35"],
[-37.8187965833, 175.2200475333, "36"],
[-37.8183878167, 175.2198735667, "37"],
[-37.8188702167, 175.2196982333, "38B"],
[-37.82027885, 175.2209890667, "82"],
[-37.8199839667, 175.2190668, "56"],
[-37.8187008333, 175.21973745, "38A"],
[-37.8196820167, 175.22262455, "14"],
[-37.8186528333, 175.2191018, "42"],
[-37.8182912167, 175.21915535, "43"],
[-37.81870525, 175.21945675, "40"],
[-37.8195044333, 175.2214081833, "24"],
[-37.81857075, 175.2205925167, "31"],
[-37.8195656167, 175.2181396, "57"],
[-37.8198411667, 175.2213911167, "24A"],
[-37.8195851667, 175.2240869667, "3"],
[-37.8192829167, 175.2239720167, "3A"],
[-37.8193257, 175.2224725667, "15"],
[-37.8197290167, 175.2224129833, "16A"],
[-37.8196499333, 175.2221262667, "18"],
[-37.8196755333, 175.2243193333, "1"],
[-37.8192091667, 175.22166805, "21"],
[-37.81957585, 175.22166585, "22"],
[-37.8199106833, 175.2238436, "4"],
[-37.81953715, 175.22372785, "5A"],
[-37.8193377833, 175.22378105, "5"],
[-37.8189702833, 175.2184597333, "46"],
[-37.8185876167, 175.21821495, "47A"],
[-37.8185706333, 175.2178869167, "47B"],
[-37.8191945667, 175.21845965, "48"],
[-37.8188482167, 175.2176680833, "49"],
[-37.8194043667, 175.21852395, "50"],
[-37.8196233333, 175.2186248333, "52"],
[-37.81920055, 175.2179787167, "53"],
[-37.8198255, 175.2188011167, "54"],
[-37.8205994333, 175.2207248667, "81"],
[-37.8193045333, 175.2222075667, "17"],
[-37.8205621167, 175.2204520167, "79"],
[-37.8180799333, 175.2194407, "41A"],
[-37.8208301833, 175.2206735833, "81A"],
[-37.8202558, 175.2206809333, "80"],
[-37.81941275, 175.21804965, "55"],
[-37.8190239, 175.2179808833, "51"],
[-37.8187854, 175.2180712167, "47"],
[-37.8187476667, 175.2186516333, "44"],
[-37.8182977, 175.21889655, "45"],
[-37.81831675, 175.2194069833, "41"],
[-37.8192735167, 175.2219502167, "19"],
[-37.8196219167, 175.22189825, "20"],
[-37.81962665, 175.2216432667, "22A"],
[-37.8192782833, 175.2209942, "28"],
[-37.8208129833, 175.2209176833, "83A"],
[-37.8206351167, 175.2209705667, "83"],
[-37.8203109333, 175.2212402667, "84"],
[-37.81909575, 175.22139795, "23"],
[-37.8197787167, 175.2228814, "12"],
[-37.8195628333, 175.21791605, "57A"],
[-37.8198373833, 175.2233606833, "8"],
[-37.8194342167, 175.22322975, "9"]
];

25006
public/lib/leaflet.markercluster/example/realworld.50000.1.js

File diff suppressed because it is too large Load Diff

25000
public/lib/leaflet.markercluster/example/realworld.50000.2.js

File diff suppressed because it is too large Load Diff

83
public/lib/leaflet.markercluster/example/remove-geoJSON-when-spiderfied.html

@ -0,0 +1,83 @@
<!DOCTYPE html>
<html>
<head>
<title>Leaflet debug page</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.0.3/dist/leaflet.css" integrity="sha512-07I2e+7D8p6he1SIM+1twR5TIrhUQn9+I6yjqD53JQjFiMf8EtC93ty0/5vJTZGF8aAocvHYNEDJajGdNx1IsQ==" crossorigin="" />
<script src="https://unpkg.com/leaflet@1.0.3/dist/leaflet-src.js" integrity="sha512-WXoSHqw/t26DszhdMhOXOkI7qCiv5QWXhH9R7CgvgZMHz1ImlkVQ3uNsiQKu5wwbbxtPzFXd1hK4tzno2VqhpA==" crossorigin=""></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="screen.css" />
<link rel="stylesheet" href="../dist/MarkerCluster.css" />
<link rel="stylesheet" href="../dist/MarkerCluster.Default.css" />
<script src="../dist/leaflet.markercluster-src.js"></script>
</head>
<body>
<div id="map"></div>
<button id="doit">Remove marker #1</button><button id="doit2">Remove marker #2</button><br/>
<span>New Bug. Spiderfy the cluster then click the button #1. All markers disapear, but it should remain marker #2.</span><br/>
<span>New Bug. Spiderfy the cluster then click the button #2. All markers disapear, but it should remain marker #1.</span><br/>
<script type="text/javascript">
var tiles = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 18,
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
}),
latlng = new L.LatLng(50.5, 30.51);
var map = new L.Map('map', {center: latlng, zoom: 15, layers: [tiles]});
var markers = new L.MarkerClusterGroup({ disableClusteringAtZoom: 19});
var markersList = [];
var m;
geoJsonFeature = { "type": "FeatureCollection",
"features": [ { "type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [30.51, 50.5]
}
}
]
};
m = L.geoJson(geoJsonFeature, {
pointToLayer: function (feature, latlng) {
return L.marker(latlng);
}
});
markersList.push(m);
markers.addLayer(m);
geoJsonFeature = { "type": "FeatureCollection",
"features": [ { "type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [30.5101, 50.5]
}
}
]
};
m = L.geoJson(geoJsonFeature, {
pointToLayer: function (feature, latlng) {
return L.marker(latlng);
}
});
markersList.push(m);
markers.addLayer(m);
map.addLayer(markers);
L.DomUtil.get('doit').onclick = function () {
markers.removeLayer(markersList[0]);
};
L.DomUtil.get('doit2').onclick = function () {
markers.removeLayer(markersList[1]);
};
</script>
</body>
</html>

28
public/lib/leaflet.markercluster/example/screen.css

@ -0,0 +1,28 @@
#map {
width: 100%;
height: 600px;
border: 1px solid #ccc;
}
#progress {
display: none;
position: absolute;
z-index: 1000;
left: 400px;
top: 300px;
width: 200px;
height: 20px;
margin-top: -20px;
margin-left: -100px;
background-color: #fff;
background-color: rgba(255, 255, 255, 0.7);
border-radius: 4px;
padding: 2px;
}
#progress-bar {
width: 0;
height: 100%;
background-color: #76A6FC;
border-radius: 4px;
}

43
public/lib/leaflet.markercluster/package.json

@ -0,0 +1,43 @@
{
"name": "leaflet.markercluster",
"repository": "https://github.com/Leaflet/Leaflet.markercluster",
"version": "1.4.1",
"description": "Provides Beautiful Animated Marker Clustering functionality for Leaflet",
"devDependencies": {
"git-rev-sync": "^1.8.0",
"happen": "^0.3.1",
"jake": "~0.5.16",
"jshint": "^2.9.4",
"karma": "^1.5.0",
"karma-chrome-launcher": "^2.0.0",
"karma-coverage": "^1.1.1",
"karma-firefox-launcher": "^1.0.1",
"karma-mocha": "^1.3.0",
"karma-phantomjs-launcher": "^1.0.4",
"karma-rollup-plugin": "^0.2.4",
"karma-safari-launcher": "^1.0.0",
"leaflet": "^1.3.1",
"mocha": "~1.10.0",
"phantomjs-prebuilt": "^2.1.14",
"rollup": "^0.41.4",
"rollup-plugin-git-version": "0.2.1",
"rollup-plugin-json": "^2.1.0",
"uglify-js": "~2.3.6"
},
"peerDependencies": {
"leaflet": "~1.3.1"
},
"main": "dist/leaflet.markercluster-src.js",
"scripts": {
"test": "karma start ./spec/karma.conf.js",
"prepublish": "jake",
"rollup": "rollup -c build/rollup-config.js",
"uglify": "uglifyjs dist/leaflet.markercluster-src.js -c -m -o dist/leaflet.markercluster.js --source-map dist/leaflet.markercluster.js.map --in-source-map dist/leaflet.markercluster-src.js.map --source-map-url leaflet.markercluster.js.map"
},
"keywords": [
"gis",
"map",
"cluster"
],
"license": "MIT"
}

2
public/lib/leaflet.markercluster/spec/after.js

@ -0,0 +1,2 @@
// put after Leaflet files as imagePath can't be detected in a PhantomJS env
L.Icon.Default.imagePath = "../dist/images";

1253
public/lib/leaflet.markercluster/spec/expect.js

File diff suppressed because it is too large Load Diff

76
public/lib/leaflet.markercluster/spec/index.html

@ -0,0 +1,76 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Spec Runner</title>
<link rel="stylesheet" type="text/css" href="../node_modules/mocha/mocha.css">
<link rel="stylesheet" type="text/css" href="../node_modules/leaflet/dist/leaflet.css">
<link rel="stylesheet" type="text/css" href="../dist/MarkerCluster.css">
<link rel="stylesheet" type="text/css" href="../dist/MarkerCluster.Default.css">
</head>
<body>
<div id="mocha"></div>
<script src="expect.js"></script>
<script type="text/javascript" src="../node_modules/mocha/mocha.js"></script>
<script type="text/javascript" src="../node_modules/happen/happen.js"></script>
<script type="text/javascript" src="sinon.js"></script>
<script type="text/javascript" src="../node_modules/leaflet/dist/leaflet-src.js"></script>
<!-- source files -->
<script type="text/javascript" src="../dist/leaflet.markercluster-src.js"></script>
<script>
mocha.setup('bdd');
mocha.ignoreLeaks();
</script>
<!-- spec files -->
<script type="text/javascript" src="suites/SpecHelper.js"></script>
<script type="text/javascript" src="suites/LeafletSpec.js"></script>
<script type="text/javascript" src="suites/DistanceGridSpec.js"></script>
<script type="text/javascript" src="suites/QuickHullSpec.js"></script>
<script type="text/javascript" src="suites/AddLayer.MultipleSpec.js"></script>
<script type="text/javascript" src="suites/AddLayer.SingleSpec.js"></script>
<script type="text/javascript" src="suites/AddLayersSpec.js"></script>
<script type="text/javascript" src="suites/animateOptionSpec.js"></script>
<script type="text/javascript" src="suites/singleMarkerModeSpec.js"></script>
<script type="text/javascript" src="suites/ChildChangingIconSupportSpec.js"></script>
<script type="text/javascript" src="suites/markerMoveSupportSpec.js"></script>
<script type="text/javascript" src="suites/CircleMarkerSupportSpec.js"></script>
<script type="text/javascript" src="suites/CircleSupportSpec.js"></script>
<script type="text/javascript" src="suites/onAddSpec.js"></script>
<script type="text/javascript" src="suites/onRemoveSpec.js"></script>
<script type="text/javascript" src="suites/clearLayersSpec.js"></script>
<script type="text/javascript" src="suites/eachLayerSpec.js"></script>
<script type="text/javascript" src="suites/eventsSpec.js"></script>
<script type="text/javascript" src="suites/getBoundsSpec.js"></script>
<script type="text/javascript" src="suites/getLayersSpec.js"></script>
<script type="text/javascript" src="suites/getVisibleParentSpec.js"></script>
<script type="text/javascript" src="suites/NonPointSpec.js"></script>
<script type="text/javascript" src="suites/RemoveLayerSpec.js"></script>
<script type="text/javascript" src="suites/removeLayersSpec.js"></script>
<script type="text/javascript" src="suites/spiderfySpec.js"></script>
<script type="text/javascript" src="suites/unspiderfySpec.js"></script>
<script type="text/javascript" src="suites/zoomAnimationSpec.js"></script>
<script type="text/javascript" src="suites/RememberOpacity.js"></script>
<script type="text/javascript" src="suites/supportNegativeZoomSpec.js"></script>
<script type="text/javascript" src="suites/RefreshSpec.js"></script>
<script type="text/javascript" src="suites/removeOutsideVisibleBoundsSpec.js"></script>
<script type="text/javascript" src="suites/nonIntegerZoomSpec.js"></script>
<script>
(window.mochaPhantomJS || window.mocha).run();
</script>
</body>
</html>

96
public/lib/leaflet.markercluster/spec/karma.conf.js

@ -0,0 +1,96 @@
var json = require('rollup-plugin-json');
// Karma configuration
module.exports = function (config) {
// var libSources = require(__dirname + '/../build/build.js').getFiles();
var files = [
"spec/sinon.js",
"spec/expect.js",
"node_modules/leaflet/dist/leaflet-src.js",
"src/index.js",
"spec/after.js",
"node_modules/happen/happen.js",
"spec/suites/SpecHelper.js",
"spec/suites/**/*.js",
"dist/*.css"
];
config.set({
// base path, that will be used to resolve files and exclude
basePath: '../',
plugins: [
'karma-rollup-plugin',
'karma-mocha',
'karma-coverage',
'karma-phantomjs-launcher',
'karma-chrome-launcher',
'karma-safari-launcher',
'karma-firefox-launcher'
],
// frameworks to use
frameworks: ['mocha'],
// list of files / patterns to load in the browser
files: files,
// proxies: {
// '/base/dist/images/': 'dist/images/'
// },
exclude: [],
// Rollup the ES6 Leaflet.markercluster sources into just one file, before tests
preprocessors: {
'src/index.js': ['rollup']
},
rollupPreprocessor: {
plugins: [
json()
],
format: 'umd',
moduleName: 'Leaflet.markercluster'
},
// test results reporter to use
// possible values: 'dots', 'progress', 'junit', 'growl', 'coverage'
reporters: ['dots'],
// web server port
port: 9876,
// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_WARN,
// enable / disable colors in the output (reporters and logs)
colors: true,
// enable / disable watching file and executing tests whenever any file changes
autoWatch: false,
// Start these browsers, currently available:
// - Chrome
// - ChromeCanary
// - Firefox
// - Opera
// - Safari (only Mac)
// - PhantomJS
// - IE (only Windows)
browsers: ['PhantomJS'],
// If browser does not capture in given timeout [ms], kill it
captureTimeout: 5000,
// Workaround for PhantomJS random DISCONNECTED error
browserDisconnectTimeout: 10000, // default 2000
browserDisconnectTolerance: 1, // default 0
// Continuous Integration mode
// if true, it capture browsers, run tests and exit
singleRun: true
});
};

4223
public/lib/leaflet.markercluster/spec/sinon.js

File diff suppressed because it is too large Load Diff

125
public/lib/leaflet.markercluster/spec/suites/AddLayer.MultipleSpec.js

@ -0,0 +1,125 @@
describe('addLayer adding multiple markers', function () {
/////////////////////////////
// SETUP FOR EACH TEST
/////////////////////////////
var map, div, clock;
beforeEach(function () {
clock = sinon.useFakeTimers();
div = document.createElement('div');
div.style.width = '200px';
div.style.height = '200px';
document.body.appendChild(div);
map = L.map(div, { maxZoom: 18, trackResize: false });
map.fitBounds(new L.LatLngBounds([
[1, 1],
[2, 2]
]));
});
afterEach(function () {
map.remove();
document.body.removeChild(div);
clock.restore();
map = div = clock = null;
});
/////////////////////////////
// TESTS
/////////////////////////////
it('creates a cluster when 2 overlapping markers are added before the group is added to the map', function () {
var group = new L.MarkerClusterGroup();
var marker = new L.Marker([1.5, 1.5]);
var marker2 = new L.Marker([1.5, 1.5]);
group.addLayer(marker);
group.addLayer(marker2);
map.addLayer(group);
expect(marker._icon).to.be(undefined);
expect(marker2._icon).to.be(undefined);
expect(map._panes.markerPane.childNodes.length).to.be(1);
});
it('creates a cluster when 2 overlapping markers are added after the group is added to the map', function () {
var group = new L.MarkerClusterGroup();
var marker = new L.Marker([1.5, 1.5]);
var marker2 = new L.Marker([1.5, 1.5]);
map.addLayer(group);
group.addLayer(marker);
group.addLayer(marker2);
expect(marker._icon).to.be(null); //Null as was added and then removed
expect(marker2._icon).to.be(undefined);
expect(map._panes.markerPane.childNodes.length).to.be(1);
});
it('creates a cluster with an animation when 2 overlapping markers are added after the group is added to the map', function () {
var group = new L.MarkerClusterGroup({ animateAddingMarkers: true });
var marker = new L.Marker([1.5, 1.5]);
var marker2 = new L.Marker([1.5, 1.5]);
map.addLayer(group);
group.addLayer(marker);
group.addLayer(marker2);
expect(marker._icon.parentNode).to.be(map._panes.markerPane);
expect(marker2._icon.parentNode).to.be(map._panes.markerPane);
expect(map._panes.markerPane.childNodes.length).to.be(3);
//Run the the animation
clock.tick(1000);
//Then markers should be removed from map
expect(marker._icon).to.be(null);
expect(marker2._icon).to.be(null);
expect(map._panes.markerPane.childNodes.length).to.be(1);
});
it('creates a cluster and marker when 2 overlapping markers and one non-overlapping are added before the group is added to the map', function () {
var group = new L.MarkerClusterGroup();
var marker = new L.Marker([1.5, 1.5]);
var marker2 = new L.Marker([1.5, 1.5]);
var marker3 = new L.Marker([3.0, 1.5]);
group.addLayer(marker);
group.addLayer(marker2);
group.addLayer(marker3);
map.addLayer(group);
expect(marker._icon).to.be(undefined);
expect(marker2._icon).to.be(undefined);
expect(marker3._icon.parentNode).to.be(map._panes.markerPane);
expect(map._panes.markerPane.childNodes.length).to.be(2);
});
it('creates a cluster and marker when 2 overlapping markers and one non-overlapping are added after the group is added to the map', function () {
var group = new L.MarkerClusterGroup();
var marker = new L.Marker([1.5, 1.5]);
var marker2 = new L.Marker([1.5, 1.5]);
var marker3 = new L.Marker([3.0, 1.5]);
map.addLayer(group);
group.addLayer(marker);
group.addLayer(marker2);
group.addLayer(marker3);
expect(marker._icon).to.be(null); //Null as was added and then removed
expect(marker2._icon).to.be(undefined);
expect(marker3._icon.parentNode).to.be(map._panes.markerPane);
expect(map._panes.markerPane.childNodes.length).to.be(2);
});
});

118
public/lib/leaflet.markercluster/spec/suites/AddLayer.SingleSpec.js

@ -0,0 +1,118 @@
describe('addLayer adding a single marker', function () {
/////////////////////////////
// SETUP FOR EACH TEST
/////////////////////////////
var div, map, group;
beforeEach(function () {
div = document.createElement('div');
div.style.width = '200px';
div.style.height = '200px';
document.body.appendChild(div);
map = L.map(div, { maxZoom: 18, trackResize: false });
// Corresponds to zoom level 8 for the above div dimensions.
map.fitBounds(new L.LatLngBounds([
[1, 1],
[2, 2]
]));
});
afterEach(function () {
if (group instanceof L.MarkerClusterGroup) {
group.clearLayers();
map.removeLayer(group);
}
map.remove();
div.remove()
div = map = group = null;
});
/////////////////////////////
// TESTS
/////////////////////////////
it('appears when added to the group before the group is added to the map', function () {
group = new L.MarkerClusterGroup();
var marker = new L.Marker([1.5, 1.5]);
group.addLayer(marker);
map.addLayer(group);
expect(marker._icon).to.not.be(undefined);
expect(marker._icon.parentNode).to.be(map._panes.markerPane);
});
it('appears when added to the group after the group is added to the map', function () {
group = new L.MarkerClusterGroup();
var marker = new L.Marker([1.5, 1.5]);
map.addLayer(group);
group.addLayer(marker);
expect(marker._icon).to.not.be(undefined);
expect(marker._icon.parentNode).to.be(map._panes.markerPane);
});
it('appears (using animations) when added after the group is added to the map', function () {
group = new L.MarkerClusterGroup({ animateAddingMarkers: true });
var marker = new L.Marker([1.5, 1.5]);
map.addLayer(group);
group.addLayer(marker);
expect(marker._icon).to.not.be(undefined);
expect(marker._icon.parentNode).to.be(map._panes.markerPane);
});
it('does not appear when too far away when added before the group is added to the map', function () {
group = new L.MarkerClusterGroup();
var marker = new L.Marker([3.5, 1.5]);
group.addLayer(marker);
map.addLayer(group);
expect(marker._icon).to.be(undefined);
});
it('does not appear when too far away when added after the group is added to the map', function () {
group = new L.MarkerClusterGroup();
var marker = new L.Marker([3.5, 1.5]);
map.addLayer(group);
group.addLayer(marker);
expect(marker._icon).to.be(undefined);
});
it('passes control to addLayers when marker is a Layer Group', function () {
group = new L.MarkerClusterGroup();
var marker1 = new L.Marker([1.5, 1.5]);
var marker2 = new L.Marker([1.5, 1.5]);
var layerGroup = new L.LayerGroup([marker1, marker2]);
map.addLayer(group);
group.addLayer(layerGroup);
expect(group._topClusterLevel.getChildCount()).to.equal(2);
expect(marker1._icon).to.be(undefined);
expect(marker2._icon).to.be(undefined);
expect(map._panes.markerPane.childNodes.length).to.be(1);
});
});

123
public/lib/leaflet.markercluster/spec/suites/AddLayersSpec.js

@ -0,0 +1,123 @@
describe('addLayers adding multiple markers', function () {
/////////////////////////////
// SETUP FOR EACH TEST
/////////////////////////////
var div, map, group;
beforeEach(function () {
div = document.createElement('div');
div.style.width = '200px';
div.style.height = '200px';
document.body.appendChild(div);
map = L.map(div, { maxZoom: 18, trackResize: false });
// Corresponds to zoom level 8 for the above div dimensions.
map.fitBounds(new L.LatLngBounds([
[1, 1],
[2, 2]
]));
});
afterEach(function () {
if (group instanceof L.MarkerClusterGroup) {
group.clearLayers();
map.removeLayer(group);
}
map.remove();
div.remove()
div = map = group = null;
});
/////////////////////////////
// TESTS
/////////////////////////////
it('creates a cluster when 2 overlapping markers are added before the group is added to the map', function () {
group = new L.MarkerClusterGroup();
var marker = new L.Marker([1.5, 1.5]);
var marker2 = new L.Marker([1.5, 1.5]);
group.addLayers([marker, marker2]);
map.addLayer(group);
expect(marker._icon).to.be(undefined);
expect(marker2._icon).to.be(undefined);
expect(map._panes.markerPane.childNodes.length).to.be(1);
});
it('creates a cluster when 2 overlapping markers are added after the group is added to the map', function () {
group = new L.MarkerClusterGroup();
var marker = new L.Marker([1.5, 1.5]);
var marker2 = new L.Marker([1.5, 1.5]);
map.addLayer(group);
group.addLayers([marker, marker2]);
expect(marker._icon).to.be(undefined);
expect(marker2._icon).to.be(undefined);
expect(map._panes.markerPane.childNodes.length).to.be(1);
});
it('creates a cluster and marker when 2 overlapping markers and one non-overlapping are added before the group is added to the map', function () {
group = new L.MarkerClusterGroup();
var marker = new L.Marker([1.5, 1.5]);
var marker2 = new L.Marker([1.5, 1.5]);
var marker3 = new L.Marker([3.0, 1.5]);
group.addLayers([marker, marker2, marker3]);
map.addLayer(group);
expect(marker._icon).to.be(undefined);
expect(marker2._icon).to.be(undefined);
expect(marker3._icon.parentNode).to.be(map._panes.markerPane);
expect(map._panes.markerPane.childNodes.length).to.be(2);
});
it('creates a cluster and marker when 2 overlapping markers and one non-overlapping are added after the group is added to the map', function () {
group = new L.MarkerClusterGroup();
var marker = new L.Marker([1.5, 1.5]);
var marker2 = new L.Marker([1.5, 1.5]);
var marker3 = new L.Marker([3.0, 1.5]);
map.addLayer(group);
group.addLayers([marker, marker2, marker3]);
expect(marker._icon).to.be(undefined);
expect(marker2._icon).to.be(undefined);
expect(marker3._icon.parentNode).to.be(map._panes.markerPane);
expect(map._panes.markerPane.childNodes.length).to.be(2);
});
it('handles nested Layer Groups', function () {
group = new L.MarkerClusterGroup();
var marker1 = new L.Marker([1.5, 1.5]);
var marker2 = new L.Marker([1.5, 1.5]);
var marker3 = new L.Marker([3.0, 1.5]);
var layerGroup = new L.LayerGroup([marker1, new L.LayerGroup([marker2])]);
map.addLayer(group);
group.addLayers([layerGroup, marker3]);
expect(marker1._icon).to.be(undefined);
expect(marker2._icon).to.be(undefined);
expect(marker3._icon.parentNode).to.be(map._panes.markerPane);
expect(map._panes.markerPane.childNodes.length).to.be(2);
});
});

56
public/lib/leaflet.markercluster/spec/suites/ChildChangingIconSupportSpec.js

@ -0,0 +1,56 @@
describe('support child markers changing icon', function () {
/////////////////////////////
// SETUP FOR EACH TEST
/////////////////////////////
var map, div, clock;
beforeEach(function () {
clock = sinon.useFakeTimers();
div = document.createElement('div');
div.style.width = '200px';
div.style.height = '200px';
document.body.appendChild(div);
map = L.map(div, { maxZoom: 18, trackResize: false });
map.fitBounds(new L.LatLngBounds([
[1, 1],
[2, 2]
]));
});
afterEach(function () {
map.remove();
document.body.removeChild(div);
clock.restore();
map = div = clock = null;
});
/////////////////////////////
// TESTS
/////////////////////////////
it('child markers end up with the right icon after becoming unclustered', function () {
var group = new L.MarkerClusterGroup();
var marker = new L.Marker([1.5, 1.5], { icon: new L.DivIcon({html: 'Inner1Text' }) });
var marker2 = new L.Marker([1.5, 1.5]);
map.addLayer(group);
group.addLayer(marker);
expect(marker._icon.parentNode).to.be(map._panes.markerPane);
expect(marker._icon.innerHTML).to.contain('Inner1Text');
group.addLayer(marker2);
expect(marker._icon).to.be(null); //Have been removed from the map
marker.setIcon(new L.DivIcon({ html: 'Inner2Text' })); //Change the icon
group.removeLayer(marker2); //Remove the other marker, so we'll become unclustered
expect(marker._icon.innerHTML).to.contain('Inner2Text');
});
});

147
public/lib/leaflet.markercluster/spec/suites/CircleMarkerSupportSpec.js

@ -0,0 +1,147 @@
describe('support for CircleMarker elements', function () {
/////////////////////////////
// SETUP FOR EACH TEST
/////////////////////////////
var clock, div, map, group;
beforeEach(function () {
clock = sinon.useFakeTimers();
div = document.createElement('div');
div.style.width = '200px';
div.style.height = '200px';
document.body.appendChild(div);
map = L.map(div, { maxZoom: 18, trackResize: false });
// Corresponds to zoom level 8 for the above div dimensions.
map.fitBounds(new L.LatLngBounds([
[1, 1],
[2, 2]
]));
});
afterEach(function () {
if (group instanceof L.MarkerClusterGroup) {
group.clearLayers();
map.removeLayer(group);
}
map.remove();
div.remove()
clock.restore();
clock = div = map = group = null;
});
/////////////////////////////
// TESTS
/////////////////////////////
it('appears when added to the group before the group is added to the map', function () {
group = new L.MarkerClusterGroup();
var marker = new L.CircleMarker([1.5, 1.5]);
group.addLayer(marker);
map.addLayer(group);
// Leaflet 1.0.0 now uses an intermediate L.Renderer.
// marker > _path > _rootGroup (g) > _container (svg) > pane (div)
expect(marker._path.parentNode.parentNode).to.not.be(undefined);
expect(marker._path.parentNode.parentNode.parentNode).to.be(map.getPane('overlayPane'));
clock.tick(1000);
});
it('appears when added to the group after the group is added to the map', function () {
group = new L.MarkerClusterGroup();
var marker = new L.CircleMarker([1.5, 1.5]);
group.addLayer(marker);
map.addLayer(group);
expect(marker._path.parentNode.parentNode).to.not.be(undefined);
expect(marker._path.parentNode.parentNode.parentNode).to.be(map.getPane('overlayPane'));
clock.tick(1000);
});
it('appears animated when added to the group after the group is added to the map', function () {
group = new L.MarkerClusterGroup({ animateAddingMarkers: true });
var marker = new L.CircleMarker([1.5, 1.5]);
var marker2 = new L.CircleMarker([1.5, 1.5]);
map.addLayer(group);
group.addLayer(marker);
group.addLayer(marker2);
expect(marker._path.parentNode.parentNode.parentNode).to.be(map.getPane('overlayPane'));
expect(marker2._path.parentNode.parentNode.parentNode).to.be(map.getPane('overlayPane'));
clock.tick(1000);
expect(marker._path.parentNode).to.be(null);
expect(marker2._path.parentNode).to.be(null);
});
it('creates a cluster when 2 overlapping markers are added before the group is added to the map', function () {
group = new L.MarkerClusterGroup();
var marker = new L.CircleMarker([1.5, 1.5]);
var marker2 = new L.CircleMarker([1.5, 1.5]);
group.addLayers([marker, marker2]);
map.addLayer(group);
expect(marker._path).to.be(undefined);
expect(marker2._path).to.be(undefined);
expect(map._panes.markerPane.childNodes.length).to.be(1);
clock.tick(1000);
});
it('creates a cluster when 2 overlapping markers are added after the group is added to the map', function () {
group = new L.MarkerClusterGroup();
var marker = new L.CircleMarker([1.5, 1.5]);
var marker2 = new L.CircleMarker([1.5, 1.5]);
map.addLayer(group);
group.addLayer(marker);
group.addLayer(marker2);
expect(marker._path.parentNode).to.be(null); //Removed then re-added, so null
expect(marker2._path).to.be(undefined);
expect(map._panes.markerPane.childNodes.length).to.be(1);
clock.tick(1000);
});
it('disappears when removed from the group', function () {
group = new L.MarkerClusterGroup();
var marker = new L.CircleMarker([1.5, 1.5]);
group.addLayer(marker);
map.addLayer(group);
expect(marker._path.parentNode).to.not.be(undefined);
expect(marker._path.parentNode.parentNode.parentNode).to.be(map.getPane('overlayPane'));
group.removeLayer(marker);
expect(marker._path.parentNode).to.be(null);
clock.tick(1000);
});
});

144
public/lib/leaflet.markercluster/spec/suites/CircleSupportSpec.js

@ -0,0 +1,144 @@
describe('support for Circle elements', function () {
/////////////////////////////
// SETUP FOR EACH TEST
/////////////////////////////
var clock, div, map, group;
beforeEach(function () {
clock = sinon.useFakeTimers();
div = document.createElement('div');
div.style.width = '200px';
div.style.height = '200px';
document.body.appendChild(div);
map = L.map(div, { maxZoom: 18, trackResize: false });
// Corresponds to zoom level 8 for the above div dimensions.
map.fitBounds(new L.LatLngBounds([
[1, 1],
[2, 2]
]));
});
afterEach(function () {
if (group instanceof L.MarkerClusterGroup) {
group.clearLayers();
map.removeLayer(group);
}
map.remove();
div.remove()
clock.restore();
clock = div = map = group = null;
});
/////////////////////////////
// TESTS
/////////////////////////////
it('appears when added to the group before the group is added to the map', function () {
group = new L.MarkerClusterGroup();
var marker = new L.Circle([1.5, 1.5], 200);
group.addLayer(marker);
map.addLayer(group);
// Leaflet 1.0.0 now uses an intermediate L.Renderer.
// marker > _path > _rootGroup (g) > _container (svg) > pane (div)
expect(marker._path.parentNode).to.not.be(undefined);
expect(marker._path.parentNode.parentNode.parentNode).to.be(map.getPane('overlayPane'));
clock.tick(1000);
});
it('appears when added to the group after the group is added to the map', function () {
group = new L.MarkerClusterGroup();
var marker = new L.Circle([1.5, 1.5], 200);
group.addLayer(marker);
map.addLayer(group);
expect(marker._path.parentNode).to.not.be(undefined);
expect(marker._path.parentNode.parentNode.parentNode).to.be(map.getPane('overlayPane'));
clock.tick(1000);
});
it('appears animated when added to the group after the group is added to the map', function () {
group = new L.MarkerClusterGroup({ animateAddingMarkers: true });
var marker = new L.Circle([1.5, 1.5], 200);
var marker2 = new L.Circle([1.5, 1.5], 200);
map.addLayer(group);
group.addLayer(marker);
group.addLayer(marker2);
expect(marker._path.parentNode.parentNode.parentNode).to.be(map.getPane('overlayPane'));
expect(marker2._path.parentNode.parentNode.parentNode).to.be(map.getPane('overlayPane'));
clock.tick(1000);
});
it('creates a cluster when 2 overlapping markers are added before the group is added to the map', function () {
group = new L.MarkerClusterGroup();
var marker = new L.Circle([1.5, 1.5], 200);
var marker2 = new L.Circle([1.5, 1.5], 200);
group.addLayers([marker, marker2]);
map.addLayer(group);
expect(marker._path).to.be(undefined);
expect(marker2._path).to.be(undefined);
expect(map._panes.markerPane.childNodes.length).to.be(1);
clock.tick(1000);
});
it('creates a cluster when 2 overlapping markers are added after the group is added to the map', function () {
group = new L.MarkerClusterGroup();
var marker = new L.Circle([1.5, 1.5], 200);
var marker2 = new L.Circle([1.5, 1.5], 200);
map.addLayer(group);
group.addLayer(marker);
group.addLayer(marker2);
expect(marker._path.parentNode).to.be(null); //Removed then re-added, so null
expect(marker2._path).to.be(undefined);
expect(map._panes.markerPane.childNodes.length).to.be(1);
clock.tick(1000);
});
it('disappears when removed from the group', function () {
group = new L.MarkerClusterGroup();
var marker = new L.Circle([1.5, 1.5], 200);
group.addLayer(marker);
map.addLayer(group);
expect(marker._path.parentNode).to.not.be(undefined);
expect(marker._path.parentNode.parentNode.parentNode).to.be(map.getPane('overlayPane'));
group.removeLayer(marker);
expect(marker._path.parentNode).to.be(null);
clock.tick(1000);
});
});

41
public/lib/leaflet.markercluster/spec/suites/DistanceGridSpec.js

@ -0,0 +1,41 @@
describe('distance grid', function () {
it('addObject', function () {
var grid = new L.DistanceGrid(100),
obj = {};
expect(grid.addObject(obj, { x: 0, y: 0 })).to.eql(undefined);
expect(grid.removeObject(obj, { x: 0, y: 0 })).to.eql(true);
});
it('eachObject', function (done) {
var grid = new L.DistanceGrid(100),
obj = {};
expect(grid.addObject(obj, { x: 0, y: 0 })).to.eql(undefined);
grid.eachObject(function(o) {
expect(o).to.eql(obj);
done();
});
});
it('getNearObject', function () {
var grid = new L.DistanceGrid(100),
obj = {};
grid.addObject(obj, { x: 0, y: 0 });
expect(grid.getNearObject({ x: 50, y: 50 })).to.equal(obj);
expect(grid.getNearObject({ x: 100, y: 0 })).to.equal(obj);
});
it('getNearObject with cellSize 0', function () {
var grid = new L.DistanceGrid(0),
obj = {};
grid.addObject(obj, { x: 0, y: 0 });
expect(grid.getNearObject({ x: 50, y: 50 })).to.equal(null);
expect(grid.getNearObject({ x: 0, y: 0 })).to.equal(obj);
});
});

6
public/lib/leaflet.markercluster/spec/suites/LeafletSpec.js

@ -0,0 +1,6 @@
describe('L#noConflict', function() {
it('restores the previous L value and returns Leaflet namespace', function(){
expect(L.version).to.be.ok();
});
});

240
public/lib/leaflet.markercluster/spec/suites/NonPointSpec.js

@ -0,0 +1,240 @@
describe('adding non point data works', function () {
/////////////////////////////
// SETUP FOR EACH TEST
/////////////////////////////
var div, map, group;
beforeEach(function () {
div = document.createElement('div');
div.style.width = '200px';
div.style.height = '200px';
document.body.appendChild(div);
map = L.map(div, { maxZoom: 18, trackResize: false });
// Corresponds to zoom level 8 for the above div dimensions.
map.fitBounds(new L.LatLngBounds([
[1, 1],
[2, 2]
]));
});
afterEach(function () {
if (group instanceof L.MarkerClusterGroup) {
group.clearLayers();
map.removeLayer(group);
}
map.remove();
div.remove()
div = map = group = null;
});
/////////////////////////////
// TESTS
/////////////////////////////
it('Allows adding a polygon before via addLayer', function () {
group = new L.MarkerClusterGroup();
var polygon = new L.Polygon([[1.5, 1.5], [2.0, 1.5], [2.0,2.0], [1.5, 2.0]]);
group.addLayer(polygon);
map.addLayer(group);
// Leaflet 1.0.0 now uses an intermediate L.Renderer.
// polygon > _path > _rootGroup (g) > _container (svg) > pane (div)
expect(polygon._path).to.not.be(undefined);
expect(polygon._path.parentNode.parentNode.parentNode).to.be(map.getPane('overlayPane'));
expect(group.hasLayer(polygon));
});
it('Allows adding a polygon before via addLayers([])', function () {
group = new L.MarkerClusterGroup();
var polygon = new L.Polygon([[1.5, 1.5], [2.0, 1.5], [2.0, 2.0], [1.5, 2.0]]);
group.addLayers([polygon]);
map.addLayer(group);
expect(polygon._path).to.not.be(undefined);
expect(polygon._path.parentNode.parentNode.parentNode).to.be(map.getPane('overlayPane'));
});
it('Removes polygons from map when removed', function () {
group = new L.MarkerClusterGroup();
var polygon = new L.Polygon([[1.5, 1.5], [2.0, 1.5], [2.0, 2.0], [1.5, 2.0]]);
group.addLayer(polygon);
map.addLayer(group);
map.removeLayer(group);
expect(polygon._path.parentNode).to.be(null);
});
describe('hasLayer', function () {
it('returns false when not added', function () {
group = new L.MarkerClusterGroup();
var polygon = new L.Polygon([[1.5, 1.5], [2.0, 1.5], [2.0, 2.0], [1.5, 2.0]]);
expect(group.hasLayer(polygon)).to.be(false);
map.addLayer(group);
expect(group.hasLayer(polygon)).to.be(false);
map.addLayer(polygon);
expect(group.hasLayer(polygon)).to.be(false);
});
it('returns true before adding to map', function() {
group = new L.MarkerClusterGroup();
var polygon = new L.Polygon([[1.5, 1.5], [2.0, 1.5], [2.0, 2.0], [1.5, 2.0]]);
group.addLayers([polygon]);
expect(group.hasLayer(polygon)).to.be(true);
});
it('returns true after adding to map after adding polygon', function () {
group = new L.MarkerClusterGroup();
var polygon = new L.Polygon([[1.5, 1.5], [2.0, 1.5], [2.0, 2.0], [1.5, 2.0]]);
group.addLayer(polygon);
map.addLayer(group);
expect(group.hasLayer(polygon)).to.be(true);
});
it('returns true after adding to map before adding polygon', function () {
group = new L.MarkerClusterGroup();
var polygon = new L.Polygon([[1.5, 1.5], [2.0, 1.5], [2.0, 2.0], [1.5, 2.0]]);
map.addLayer(group);
group.addLayer(polygon);
expect(group.hasLayer(polygon)).to.be(true);
});
});
describe('removeLayer', function() {
it('removes before adding to map', function () {
group = new L.MarkerClusterGroup();
var polygon = new L.Polygon([[1.5, 1.5], [2.0, 1.5], [2.0, 2.0], [1.5, 2.0]]);
group.addLayer(polygon);
expect(group.hasLayer(polygon)).to.be(true);
group.removeLayer(polygon);
expect(group.hasLayer(polygon)).to.be(false);
});
it('removes before adding to map', function () {
group = new L.MarkerClusterGroup();
var polygon = new L.Polygon([[1.5, 1.5], [2.0, 1.5], [2.0, 2.0], [1.5, 2.0]]);
group.addLayers([polygon]);
expect(group.hasLayer(polygon)).to.be(true);
group.removeLayer(polygon);
expect(group.hasLayer(polygon)).to.be(false);
});
it('removes after adding to map after adding polygon', function () {
group = new L.MarkerClusterGroup();
var polygon = new L.Polygon([[1.5, 1.5], [2.0, 1.5], [2.0, 2.0], [1.5, 2.0]]);
group.addLayer(polygon);
map.addLayer(group);
expect(group.hasLayer(polygon)).to.be(true);
group.removeLayer(polygon);
expect(group.hasLayer(polygon)).to.be(false);
});
it('removes after adding to map before adding polygon', function () {
group = new L.MarkerClusterGroup();
var polygon = new L.Polygon([[1.5, 1.5], [2.0, 1.5], [2.0, 2.0], [1.5, 2.0]]);
map.addLayer(group);
group.addLayer(polygon);
expect(group.hasLayer(polygon)).to.be(true);
group.removeLayer(polygon);
expect(group.hasLayer(polygon)).to.be(false);
});
});
describe('removeLayers', function () {
it('removes before adding to map', function () {
group = new L.MarkerClusterGroup();
var polygon = new L.Polygon([[1.5, 1.5], [2.0, 1.5], [2.0, 2.0], [1.5, 2.0]]);
group.addLayer(polygon);
expect(group.hasLayer(polygon)).to.be(true);
group.removeLayers([polygon]);
expect(group.hasLayer(polygon)).to.be(false);
});
it('removes before adding to map', function () {
group = new L.MarkerClusterGroup();
var polygon = new L.Polygon([[1.5, 1.5], [2.0, 1.5], [2.0, 2.0], [1.5, 2.0]]);
group.addLayers([polygon]);
expect(group.hasLayer(polygon)).to.be(true);
group.removeLayers([polygon]);
expect(group.hasLayer(polygon)).to.be(false);
});
it('removes after adding to map after adding polygon', function () {
group = new L.MarkerClusterGroup();
var polygon = new L.Polygon([[1.5, 1.5], [2.0, 1.5], [2.0, 2.0], [1.5, 2.0]]);
group.addLayer(polygon);
map.addLayer(group);
expect(group.hasLayer(polygon)).to.be(true);
group.removeLayers([polygon]);
expect(group.hasLayer(polygon)).to.be(false);
});
it('removes after adding to map before adding polygon', function () {
group = new L.MarkerClusterGroup();
var polygon = new L.Polygon([[1.5, 1.5], [2.0, 1.5], [2.0, 2.0], [1.5, 2.0]]);
map.addLayer(group);
group.addLayer(polygon);
expect(group.hasLayer(polygon)).to.be(true);
group.removeLayers([polygon]);
expect(group.hasLayer(polygon)).to.be(false);
});
});
});

63
public/lib/leaflet.markercluster/spec/suites/PaneSpec.js

@ -0,0 +1,63 @@
describe('Map pane selection', function() {
/////////////////////////////
// SETUP FOR EACH TEST
/////////////////////////////
var div, map, group;
beforeEach(function () {
div = document.createElement('div');
div.style.width = '200px';
div.style.height = '200px';
document.body.appendChild(div);
map = L.map(div, { maxZoom: 18, trackResize: false });
// Create map pane
map.createPane('testPane');
// Corresponds to zoom level 8 for the above div dimensions.
map.fitBounds(new L.LatLngBounds([
[1, 1],
[2, 2]
]));
});
afterEach(function () {
if (group instanceof L.MarkerClusterGroup) {
group.clearLayers();
map.removeLayer(group);
}
map.remove();
div.remove()
div = map = group = null;
});
/////////////////////////////
// TESTS
/////////////////////////////
it('recognizes and applies option', function() {
group = new L.MarkerClusterGroup({clusterPane: 'testPane'});
var marker = new L.Marker([1.5, 1.5]);
var marker2 = new L.Marker([1.5, 1.5]);
group.addLayers([marker, marker2]);
map.addLayer(group);
expect(map._panes.testPane.childNodes.length).to.be(1);
});
it('defaults to default marker pane', function() {
group = new L.MarkerClusterGroup();
var marker = new L.Marker([1.5, 1.5]);
var marker2 = new L.Marker([1.5, 1.5]);
group.addLayers([marker, marker2]);
map.addLayer(group);
expect(map._panes[L.Marker.prototype.options.pane].childNodes.length).to.be(1);
});
});

52
public/lib/leaflet.markercluster/spec/suites/QuickHullSpec.js

@ -0,0 +1,52 @@
describe('quickhull', function () {
describe('getDistant', function () {
it('zero distance', function () {
var bl = [
{ lat: 0, lng: 0 },
{ lat: 0, lng: 10 }
];
expect(L.QuickHull.getDistant({ lat: 0, lng: 0 }, bl)).to.eql(0);
});
it('non-zero distance', function () {
var bl = [
{ lat: 0, lng: 0 },
{ lat: 0, lng: 10 }
];
expect(L.QuickHull.getDistant({ lat: 5, lng: 5 }, bl)).to.eql(-50);
});
});
describe('getConvexHull', function () {
it('creates a hull', function () {
expect(L.QuickHull.getConvexHull([ { lat: 0, lng: 0 },
{ lat: 10, lng: 0 },
{ lat: 10, lng: 10 },
{ lat: 0, lng: 10 },
{ lat: 5, lng: 5 }
])).to.eql([
{ lat: 0, lng: 10 },
{ lat: 10, lng: 10 },
{ lat: 10, lng: 0 },
{ lat: 0, lng: 0 }
]);
});
it('creates a hull for vertically-aligned objects', function () {
expect(L.QuickHull.getConvexHull([ { lat: 0, lng: 0 },
{ lat: 5, lng: 0 },
{ lat: 10, lng: 0 }
])).to.eql([
{ lat: 0, lng: 0 },
{ lat: 10, lng: 0 }
]);
});
it('creates a hull for horizontally-aligned objects', function () {
expect(L.QuickHull.getConvexHull([ { lat: 0, lng: 0 },
{ lat: 0, lng: 5 },
{ lat: 0, lng: 10 }
])).to.eql([
{ lat: 0, lng: 0 },
{ lat: 0, lng: 10 }
]);
});
});
});

435
public/lib/leaflet.markercluster/spec/suites/RefreshSpec.js

@ -0,0 +1,435 @@
describe('refreshClusters', function () {
/////////////////////////////
// SETUP FOR EACH TEST
/////////////////////////////
var clock, div, map, group;
beforeEach(function () {
clock = sinon.useFakeTimers();
div = document.createElement('div');
div.style.width = '200px';
div.style.height = '200px';
document.body.appendChild(div);
map = L.map(div, { maxZoom: 18, trackResize: false });
// Corresponds to zoom level 8 for the above div dimensions.
map.fitBounds(new L.LatLngBounds([
[1, 1],
[2, 2]
]));
});
afterEach(function () {
if (group instanceof L.MarkerClusterGroup) {
group.clearLayers();
map.removeLayer(group);
}
map.remove();
div.remove()
clock.restore();
clock = div = map = group = null;
});
function getClusterAtZoom(marker, zoom) {
var parent = marker.__parent;
while (parent && parent._zoom !== zoom) {
parent = parent.__parent;
}
return parent;
}
function setMapView() {
// Now look at the markers to force cluster icons drawing.
// Corresponds to zoom level 8 for the above div dimensions.
map.fitBounds(new L.LatLngBounds([
[1, 1],
[2, 2]
]));
}
/////////////////////////////
// TESTS
/////////////////////////////
it('flags all non-visible parent clusters of a given marker', function () {
group = L.markerClusterGroup().addTo(map);
var marker1 = L.marker([1.5, 1.5]).addTo(group),
marker2 = L.marker([1.5, 1.5]).addTo(group); // Needed to force a cluster.
setMapView();
var marker1cluster10 = getClusterAtZoom(marker1, 10),
marker1cluster2 = getClusterAtZoom(marker1, 2),
marker1cluster5 = getClusterAtZoom(marker1, 5);
// First go to some zoom levels so that Leaflet initializes clusters icons.
expect(marker1cluster10._iconNeedsUpdate).to.be.ok();
map.setZoom(10, {animate: false});
expect(marker1cluster10._iconNeedsUpdate).to.not.be.ok();
expect(marker1cluster2._iconNeedsUpdate).to.be.ok();
map.setZoom(2, {animate: false});
expect(marker1cluster2._iconNeedsUpdate).to.not.be.ok();
// Finish on an intermediate zoom level.
expect(marker1cluster5._iconNeedsUpdate).to.be.ok();
map.setZoom(5, {animate: false});
expect(marker1cluster5._iconNeedsUpdate).to.not.be.ok();
// Run any animation.
clock.tick(1000);
// Then request clusters refresh.
// No need to actually modify the marker.
group.refreshClusters(marker1);
// Now check that non-visible clusters are flagged as "dirty".
expect(marker1cluster10._iconNeedsUpdate).to.be.ok();
expect(marker1cluster2._iconNeedsUpdate).to.be.ok();
// Also check that visible clusters are "un-flagged" since they should be re-drawn.
expect(marker1cluster5._iconNeedsUpdate).to.not.be.ok();
});
it('re-draws visible clusters', function () {
group = L.markerClusterGroup({
iconCreateFunction: function (cluster) {
var markers = cluster.getAllChildMarkers();
for(var i in markers) {
if (markers[i].changed) {
return new L.DivIcon({
className: "changed"
});
}
}
return new L.DivIcon({
className: "original"
});
}
}).addTo(map);
var marker1 = L.marker([1.5, 1.5]).addTo(group),
marker2 = L.marker([1.5, 1.5]).addTo(group); // Needed to force a cluster.
setMapView();
var marker1cluster9 = getClusterAtZoom(marker1, 9);
// First go to some zoom levels so that Leaflet initializes clusters icons.
expect(marker1cluster9._iconNeedsUpdate).to.be.ok();
map.setZoom(9, {animate: false});
expect(marker1cluster9._iconNeedsUpdate).to.not.be.ok();
expect(marker1cluster9._icon.className).to.contain("original");
expect(marker1cluster9._icon.className).to.not.contain("changed");
// Run any animation.
clock.tick(1000);
// Alter the marker.
marker1.changed = true;
// Then request clusters refresh.
group.refreshClusters(marker1);
// Now check that visible clusters icon is re-drawn.
expect(marker1cluster9._icon.className).to.contain("changed");
expect(marker1cluster9._icon.className).to.not.contain("original");
});
// Shared code for the 2 below tests
function iconCreateFunction(cluster) {
var markers = cluster.getAllChildMarkers();
for(var i in markers) {
if (markers[i].changed) {
return new L.DivIcon({
className: "changed"
});
}
}
return new L.DivIcon({
className: "original"
});
}
it('re-draws markers in singleMarkerMode', function () {
group = L.markerClusterGroup({
singleMarkerMode: true,
iconCreateFunction: iconCreateFunction
}).addTo(map);
var marker1 = L.marker([1.5, 1.5]).addTo(group);
setMapView();
expect(marker1._icon.className).to.contain("original");
// Alter the marker.
marker1.changed = true;
// Then request clusters refresh.
group.refreshClusters(marker1);
expect(marker1._icon.className).to.contain("changed");
expect(marker1._icon.className).to.not.contain("original");
});
it('does not modify markers that do not belong to the current group (in singleMarkerMode)', function () {
group = L.markerClusterGroup({
singleMarkerMode: true,
iconCreateFunction: iconCreateFunction
}).addTo(map);
var marker1 = L.marker([1.5, 1.5]).addTo(group),
marker2 = L.marker([1.5, 1.5], {
icon: iconCreateFunction({
getAllChildMarkers: function () {
return marker2;
}
})
}).addTo(map);
setMapView();
expect(marker1._icon.className).to.contain("original");
expect(marker2._icon.className).to.contain("original");
// Alter the markers.
marker1.changed = true;
marker2.changed = true;
// Then request clusters refresh.
group.refreshClusters([marker1, marker2]);
expect(marker1._icon.className).to.contain("changed");
expect(marker1._icon.className).to.not.contain("original");
expect(marker2._icon.className).to.contain("original");
expect(marker2._icon.className).to.not.contain("changed");
});
// Shared code for below tests.
var marker1 = L.marker([1.5, 1.5]),
marker2 = L.marker([1.5, 1.5]), // Needed to force a cluster.
marker3 = L.marker([1.1, 1.1]),
marker4 = L.marker([1.1, 1.1]), // Needed to force a cluster.
marker5 = L.marker([1.9, 1.9]),
marker6 = L.marker([1.9, 1.9]), // Needed to force a cluster.
marker1cluster8,
marker1cluster3,
marker1cluster5,
marker3cluster8,
marker3cluster3,
marker3cluster5,
marker5cluster8,
marker5cluster3,
marker5cluster5;
function init3clusterBranches() {
group = L.markerClusterGroup({
maxClusterRadius: 2 // Make sure we keep distinct clusters.
}).addTo(map);
// Populate Marker Cluster Group.
marker1.addTo(group);
marker2.addTo(group);
marker3.addTo(group);
marker4.addTo(group);
marker5.addTo(group);
marker6.addTo(group);
setMapView();
marker1cluster8 = getClusterAtZoom(marker1, 8);
marker1cluster3 = getClusterAtZoom(marker1, 3);
marker1cluster5 = getClusterAtZoom(marker1, 5);
marker3cluster8 = getClusterAtZoom(marker3, 8);
marker3cluster3 = getClusterAtZoom(marker3, 3);
marker3cluster5 = getClusterAtZoom(marker3, 5);
marker5cluster8 = getClusterAtZoom(marker5, 8);
marker5cluster3 = getClusterAtZoom(marker5, 3);
marker5cluster5 = getClusterAtZoom(marker5, 5);
// Make sure we have 3 distinct clusters up to zoom level Z (let's choose Z = 3)
expect(marker1cluster3._childCount).to.equal(2);
expect(marker3cluster3._childCount).to.equal(2);
expect(marker5cluster3._childCount).to.equal(2);
// First go to some zoom levels so that Leaflet initializes clusters icons.
expect(marker1cluster8._iconNeedsUpdate).to.not.be.ok();
expect(marker3cluster8._iconNeedsUpdate).to.not.be.ok();
expect(marker5cluster8._iconNeedsUpdate).to.not.be.ok();
expect(marker1cluster3._iconNeedsUpdate).to.be.ok();
expect(marker3cluster3._iconNeedsUpdate).to.be.ok();
expect(marker5cluster3._iconNeedsUpdate).to.be.ok();
map.setZoom(3, {animate: false});
expect(marker1cluster3._iconNeedsUpdate).to.not.be.ok();
expect(marker3cluster3._iconNeedsUpdate).to.not.be.ok();
expect(marker5cluster3._iconNeedsUpdate).to.not.be.ok();
// Finish on an intermediate zoom level.
expect(marker1cluster5._iconNeedsUpdate).to.be.ok();
expect(marker3cluster5._iconNeedsUpdate).to.be.ok();
expect(marker5cluster5._iconNeedsUpdate).to.be.ok();
map.setZoom(5, {animate: false});
expect(marker1cluster5._iconNeedsUpdate).to.not.be.ok();
expect(marker3cluster5._iconNeedsUpdate).to.not.be.ok();
expect(marker5cluster5._iconNeedsUpdate).to.not.be.ok();
// Run any animation.
clock.tick(1000);
// Ready to refresh clusters with method of choice and assess result.
}
it('does not flag clusters of other markers', function () {
init3clusterBranches();
// Then request clusters refresh.
// No need to actually modify the marker.
group.refreshClusters(marker1);
// Now check that non-visible clusters are flagged as "dirty".
expect(marker1cluster8._iconNeedsUpdate).to.be.ok();
expect(marker1cluster3._iconNeedsUpdate).to.be.ok();
// Finally check that non-involved clusters are not "dirty".
expect(marker3cluster8._iconNeedsUpdate).to.not.be.ok();
expect(marker3cluster3._iconNeedsUpdate).to.not.be.ok();
expect(marker5cluster8._iconNeedsUpdate).to.not.be.ok();
expect(marker5cluster3._iconNeedsUpdate).to.not.be.ok();
});
it('processes itself when no argument is passed', function () {
init3clusterBranches();
// Then request clusters refresh.
// No need to actually modify the marker.
group.refreshClusters();
// Now check that non-visible clusters are flagged as "dirty".
expect(marker1cluster8._iconNeedsUpdate).to.be.ok();
expect(marker1cluster3._iconNeedsUpdate).to.be.ok();
expect(marker3cluster8._iconNeedsUpdate).to.be.ok();
expect(marker3cluster3._iconNeedsUpdate).to.be.ok();
expect(marker5cluster8._iconNeedsUpdate).to.be.ok();
expect(marker5cluster3._iconNeedsUpdate).to.be.ok();
});
it('accepts an array of markers', function () {
init3clusterBranches();
// Then request clusters refresh.
// No need to actually modify the markers.
group.refreshClusters([marker1, marker5]);
// Clusters of marker3 and 4 shall not be flagged.
// Now check that non-visible clusters are flagged as "dirty".
expect(marker1cluster8._iconNeedsUpdate).to.be.ok();
expect(marker1cluster3._iconNeedsUpdate).to.be.ok();
expect(marker5cluster8._iconNeedsUpdate).to.be.ok();
expect(marker5cluster3._iconNeedsUpdate).to.be.ok();
// Clusters of marker3 and 4 shall not be flagged.
expect(marker3cluster8._iconNeedsUpdate).to.not.be.ok();
expect(marker3cluster3._iconNeedsUpdate).to.not.be.ok();
});
it('accepts a mapping of markers', function () {
init3clusterBranches();
// Then request clusters refresh.
// No need to actually modify the markers.
group.refreshClusters({
id1: marker1,
id2: marker5
}); // Clusters of marker3 and 4 shall not be flagged.
// Now check that non-visible clusters are flagged as "dirty".
expect(marker1cluster8._iconNeedsUpdate).to.be.ok();
expect(marker1cluster3._iconNeedsUpdate).to.be.ok();
expect(marker5cluster8._iconNeedsUpdate).to.be.ok();
expect(marker5cluster3._iconNeedsUpdate).to.be.ok();
// Clusters of marker3 and 4 shall not be flagged.
expect(marker3cluster8._iconNeedsUpdate).to.not.be.ok();
expect(marker3cluster3._iconNeedsUpdate).to.not.be.ok();
});
it('accepts an L.LayerGroup', function () {
init3clusterBranches();
// Then request clusters refresh.
// No need to actually modify the markers.
var layerGroup = new L.LayerGroup([marker1, marker5]);
group.refreshClusters(layerGroup);
// Clusters of marker3 and 4 shall not be flagged.
// Now check that non-visible clusters are flagged as "dirty".
expect(marker1cluster8._iconNeedsUpdate).to.be.ok();
expect(marker1cluster3._iconNeedsUpdate).to.be.ok();
expect(marker5cluster8._iconNeedsUpdate).to.be.ok();
expect(marker5cluster3._iconNeedsUpdate).to.be.ok();
// Clusters of marker3 and 4 shall not be flagged.
expect(marker3cluster8._iconNeedsUpdate).to.not.be.ok();
expect(marker3cluster3._iconNeedsUpdate).to.not.be.ok();
});
it('accepts an L.MarkerCluster', function () {
init3clusterBranches();
// Then request clusters refresh.
// No need to actually modify the markers.
group.refreshClusters(marker1cluster8);
// Clusters of marker3, 4, 5 and 6 shall not be flagged.
// Now check that non-visible clusters are flagged as "dirty".
expect(marker1cluster8._iconNeedsUpdate).to.be.ok();
expect(marker1cluster3._iconNeedsUpdate).to.be.ok();
// Clusters of marker3 and 4 shall not be flagged.
expect(marker3cluster8._iconNeedsUpdate).to.not.be.ok();
expect(marker3cluster3._iconNeedsUpdate).to.not.be.ok();
expect(marker5cluster8._iconNeedsUpdate).to.not.be.ok();
expect(marker5cluster3._iconNeedsUpdate).to.not.be.ok();
});
});

162
public/lib/leaflet.markercluster/spec/suites/RememberOpacity.js

@ -0,0 +1,162 @@
describe('Remember opacity', function () {
/////////////////////////////
// SETUP FOR EACH TEST
/////////////////////////////
var map, div, clock, markers, group;
var markerDefs = [
{latLng: [ 0, 0], opts: {opacity: 0.9}},
{latLng: [ 0, 1], opts: {opacity: 0.5}},
{latLng: [ 0,-1], opts: {opacity: 0.5}},
{latLng: [ 1, 0], opts: {opacity: 0.5}},
{latLng: [-1, 0], opts: {opacity: 0.5}},
{latLng: [ 1, 1], opts: {opacity: 0.2}},
{latLng: [ 1,-1], opts: {opacity: 0.2}},
{latLng: [-1, 1], opts: {opacity: 0.2}},
{latLng: [-1,-1], opts: {opacity: 0.2}}
];
var bounds = L.latLngBounds( L.latLng( -1.1, -1.1),
L.latLng( 1.1, 1.1) );
beforeEach(function () {
clock = sinon.useFakeTimers();
div = document.createElement('div');
div.style.width = '200px';
div.style.height = '200px';
document.body.appendChild(div);
map = L.map(div, { maxZoom: 18, trackResize: false });
markers = [];
for (var i = 0; i < markerDefs.length; i++) {
markers.push( L.marker(markerDefs[i].latLng, markerDefs[i].opts ) );
}
});
afterEach(function () {
group.clearLayers();
map.removeLayer(group);
map.remove();
document.body.removeChild(div);
clock.restore();
clock = div = map = markers = group = null;
});
/////////////////////////////
// TESTS
/////////////////////////////
it('clusters semitransparent markers into an opaque one', function () {
map.setView(new L.LatLng(0,0), 1);
group = new L.MarkerClusterGroup({
maxClusterRadius: 20
});
group.addLayers(markers);
map.addLayer(group);
var visibleClusters = group._featureGroup.getLayers();
expect(visibleClusters.length).to.be(1);
expect(visibleClusters[0].options.opacity).to.be(1);
});
it('unclusters an opaque marker into semitransparent ones', function () {
map.setView(new L.LatLng(0,0), 1);
var visibleClusters;
group = new L.MarkerClusterGroup({
maxClusterRadius: 20
});
group.addLayers(markers);
map.addLayer(group);
map.fitBounds(bounds);
clock.tick(1000);
visibleClusters = group._featureGroup.getLayers();
expect(visibleClusters.length).to.be(9);
for (var i=0; i<9; i++) {
expect(visibleClusters[i].options.opacity).to.be.within(0.2,0.9);
}
// It shall also work after zooming in/out a second time.
map.setView(new L.LatLng(0,0), 1);
clock.tick(1000);
map.fitBounds(bounds);
clock.tick(1000);
visibleClusters = group._featureGroup.getLayers();
expect(visibleClusters.length).to.be(9);
for (var i=0; i<9; i++) {
expect(visibleClusters[i].options.opacity).to.be.within(0.2,0.9);
}
});
it('has no problems zooming in and out several times', function () {
var visibleClusters;
group = new L.MarkerClusterGroup({
maxClusterRadius: 20
});
group.addLayers(markers);
map.addLayer(group);
// Zoom in and out a couple times
for (var i=0; i<10; i++) {
map.fitBounds(bounds);
clock.tick(1000);
visibleClusters = group._featureGroup.getLayers();
expect(visibleClusters.length).to.be(9);
for (var i=0; i<9; i++) {
expect(visibleClusters[i].options.opacity).to.be.within(0.2,0.9);
}
map.setView(new L.LatLng(0,0), 1);
clock.tick(1000);
visibleClusters = group._featureGroup.getLayers();
expect(visibleClusters.length).to.be(1);
expect(visibleClusters[0].options.opacity).to.be(1);
}
});
it('retains the opacity of each individual marker', function () {
map.setView(new L.LatLng(0,0), 1);
var visibleClusters;
group = new L.MarkerClusterGroup({
maxClusterRadius: 20
});
group.addLayers(markers);
map.addLayer(group);
// Zoom in and out a couple times
for (var i=0; i<5; i++) {
map.fitBounds(bounds);
clock.tick(1000);
map.setView(new L.LatLng(0,0), 1);
clock.tick(1000);
}
for (var i=0; i<markerDefs.length; i++) {
// console.log(markerDefs[i].latLng, markerDefs[i].opts.opacity);
map.setView(L.latLng(markerDefs[i].latLng), 18);
clock.tick(1000);
visibleClusters = group._featureGroup.getLayers();
expect(visibleClusters.length).to.be(1);
expect(visibleClusters[0].options.opacity).to.be(markerDefs[i].opts.opacity);
}
});
});

204
public/lib/leaflet.markercluster/spec/suites/RemoveLayerSpec.js

@ -0,0 +1,204 @@
describe('removeLayer', function () {
/////////////////////////////
// SETUP FOR EACH TEST
/////////////////////////////
var clock, div, map, group;
beforeEach(function () {
clock = sinon.useFakeTimers();
div = document.createElement('div');
div.style.width = '200px';
div.style.height = '200px';
document.body.appendChild(div);
map = L.map(div, { maxZoom: 18, trackResize: false });
// Corresponds to zoom level 8 for the above div dimensions.
map.fitBounds(new L.LatLngBounds([
[1, 1],
[2, 2]
]));
});
afterEach(function () {
if (group instanceof L.MarkerClusterGroup) {
group.clearLayers();
map.removeLayer(group);
}
map.remove();
div.remove()
clock.restore();
clock = div = map = group = null;
});
/////////////////////////////
// TESTS
/////////////////////////////
it('removes a layer that was added to it', function () {
group = new L.MarkerClusterGroup();
var marker = new L.Marker([1.5, 1.5]);
map.addLayer(group);
group.addLayer(marker);
expect(marker._icon.parentNode).to.be(map._panes.markerPane);
group.removeLayer(marker);
expect(marker._icon).to.be(null);
});
it('doesnt remove a layer not added to it', function () {
group = new L.MarkerClusterGroup();
var marker = new L.Marker([1.5, 1.5]);
map.addLayer(group);
map.addLayer(marker);
expect(marker._icon.parentNode).to.be(map._panes.markerPane);
group.removeLayer(marker);
expect(marker._icon.parentNode).to.be(map._panes.markerPane);
});
it('removes a layer that was added to it (before being on the map) that is shown in a cluster', function () {
group = new L.MarkerClusterGroup();
var marker = new L.Marker([1.5, 1.5]);
var marker2 = new L.Marker([1.5, 1.5]);
group.addLayers([marker, marker2]);
map.addLayer(group);
group.removeLayer(marker);
expect(marker._icon).to.be(undefined);
expect(marker2._icon.parentNode).to.be(map._panes.markerPane);
});
it('removes a layer that was added to it (after being on the map) that is shown in a cluster', function () {
group = new L.MarkerClusterGroup();
var marker = new L.Marker([1.5, 1.5]);
var marker2 = new L.Marker([1.5, 1.5]);
map.addLayer(group);
group.addLayer(marker);
group.addLayer(marker2);
group.removeLayer(marker);
expect(marker._icon).to.be(null);
expect(marker2._icon.parentNode).to.be(map._panes.markerPane);
});
it('removes a layer that was added to it (before being on the map) that is individually', function () {
group = new L.MarkerClusterGroup();
var marker = new L.Marker([1, 1.5]);
var marker2 = new L.Marker([3, 1.5]);
map.addLayer(group);
group.addLayer(marker);
group.addLayer(marker2);
expect(marker._icon.parentNode).to.be(map._panes.markerPane);
expect(marker2._icon.parentNode).to.be(map._panes.markerPane);
group.removeLayer(marker);
expect(marker._icon).to.be(null);
expect(marker2._icon.parentNode).to.be(map._panes.markerPane);
});
it('removes a layer (with animation) that was added to it (after being on the map) that is shown in a cluster', function () {
group = new L.MarkerClusterGroup({ animateAddingMarkers: true });
var marker = new L.Marker([1.5, 1.5]);
var marker2 = new L.Marker([1.5, 1.5]);
map.addLayer(group);
group.addLayer(marker);
group.addLayer(marker2);
//Run the the animation
clock.tick(1000);
expect(marker._icon).to.be(null);
expect(marker2._icon).to.be(null);
group.removeLayer(marker);
//Run the the animation
clock.tick(1000);
expect(marker._icon).to.be(null);
expect(marker2._icon.parentNode).to.be(map._panes.markerPane);
});
it('removes the layers that are in the given LayerGroup', function () {
group = new L.MarkerClusterGroup();
var marker = new L.Marker([1.5, 1.5]);
var marker2 = new L.Marker([1.5, 1.5]);
map.addLayer(group);
group.addLayers([marker, marker2]);
var layer = L.layerGroup();
layer.addLayer(marker2);
group.removeLayer(layer);
expect(marker._icon).to.not.be(undefined);
expect(marker2._icon).to.be(undefined);
});
it('removes the layers that are in the given LayerGroup when not on the map', function () {
group = new L.MarkerClusterGroup();
var marker = new L.Marker([1.5, 1.5]);
var marker2 = new L.Marker([1.5, 1.5]);
group.addLayers([marker, marker2]);
var layer = L.layerGroup();
layer.addLayer(marker2);
group.removeLayer(layer);
expect(group.hasLayer(marker)).to.be(true);
expect(group.hasLayer(marker2)).to.be(false);
});
it('passes control to removeLayers when marker is a Layer Group', function () {
group = new L.MarkerClusterGroup();
var marker1 = new L.Marker([1.5, 1.5]);
var marker2 = new L.Marker([1.5, 1.5]);
group.addLayers([marker1, marker2]);
var layer = L.layerGroup();
layer.addLayer(marker2);
group.removeLayer(new L.LayerGroup([layer]));
expect(group.hasLayer(marker1)).to.be(true);
expect(group.hasLayer(marker2)).to.be(false);
});
});

30
public/lib/leaflet.markercluster/spec/suites/SpecHelper.js

@ -0,0 +1,30 @@
function noSpecs() {
xit('has no specs');
}
if (!Array.prototype.map) {
Array.prototype.map = function(fun /*, thisp */) {
"use strict";
if (this === void 0 || this === null)
throw new TypeError();
var t = Object(this);
var len = t.length >>> 0;
if (typeof fun !== "function")
throw new TypeError();
var res = new Array(len);
var thisp = arguments[1];
for (var i = 0; i < len; i++) {
if (i in t)
res[i] = fun.call(thisp, t[i], i, t);
}
return res;
};
}
Number.isFinite = Number.isFinite || function(value) {
return typeof value === 'number' && isFinite(value);
}

117
public/lib/leaflet.markercluster/spec/suites/animateOptionSpec.js

@ -0,0 +1,117 @@
describe('animate option', function () {
/////////////////////////////
// SETUP FOR EACH TEST
/////////////////////////////
var div, map, group;
beforeEach(function () {
div = document.createElement('div');
div.style.width = '200px';
div.style.height = '200px';
document.body.appendChild(div);
map = L.map(div, { maxZoom: 18, trackResize: false });
// Corresponds to zoom level 8 for the above div dimensions.
map.fitBounds(new L.LatLngBounds([
[1, 1],
[2, 2]
]));
});
afterEach(function () {
if (group instanceof L.MarkerClusterGroup) {
group.removeLayers(group.getLayers());
map.removeLayer(group);
}
map.remove();
div.remove();
div = map = group = null;
});
/////////////////////////////
// TESTS
/////////////////////////////
it('hooks animated methods version by default', function () {
// Need to add to map so that we have the top cluster level created.
group = L.markerClusterGroup().addTo(map);
var withAnimation = L.MarkerClusterGroup.prototype._withAnimation;
// MCG animated methods.
expect(group._animationStart).to.be(withAnimation._animationStart);
expect(group._animationZoomIn).to.be(withAnimation._animationZoomIn);
expect(group._animationZoomOut).to.be(withAnimation._animationZoomOut);
expect(group._animationAddLayer).to.be(withAnimation._animationAddLayer);
// MarkerCluster spiderfy animated methods
var cluster = group._topClusterLevel;
withAnimation = L.MarkerCluster.prototype;
expect(cluster._animationSpiderfy).to.be(withAnimation._animationSpiderfy);
expect(cluster._animationUnspiderfy).to.be(withAnimation._animationUnspiderfy);
});
it('hooks non-animated methods version when set to false', function () {
// Need to add to map so that we have the top cluster level created.
group = L.markerClusterGroup({animate: false}).addTo(map);
var noAnimation = L.MarkerClusterGroup.prototype._noAnimation;
// MCG non-animated methods.
expect(group._animationStart).to.be(noAnimation._animationStart);
expect(group._animationZoomIn).to.be(noAnimation._animationZoomIn);
expect(group._animationZoomOut).to.be(noAnimation._animationZoomOut);
expect(group._animationAddLayer).to.be(noAnimation._animationAddLayer);
// MarkerCluster spiderfy non-animated methods
var cluster = group._topClusterLevel;
noAnimation = L.MarkerClusterNonAnimated.prototype;
expect(cluster._animationSpiderfy).to.be(noAnimation._animationSpiderfy);
expect(cluster._animationUnspiderfy).to.be(noAnimation._animationUnspiderfy);
});
it('always hooks non-animated methods version when L.DomUtil.TRANSITION is false', function () {
// Fool Leaflet, make it think the browser does not support transitions.
var realDomUtil = L.DomUtil;
var fakeDomUtil = {};
for (k in realDomUtil) {
fakeDomUtil[k] = realDomUtil[k];
}
fakeDomUtil.TRANSITION = false;
L.DomUtil = fakeDomUtil;
try {
// Need to add to map so that we have the top cluster level created.
group = L.markerClusterGroup({animate: true}).addTo(map);
var noAnimation = L.MarkerClusterGroup.prototype._noAnimation;
// MCG non-animated methods.
expect(group._animationStart).to.be(noAnimation._animationStart);
expect(group._animationZoomIn).to.be(noAnimation._animationZoomIn);
expect(group._animationZoomOut).to.be(noAnimation._animationZoomOut);
expect(group._animationAddLayer).to.be(noAnimation._animationAddLayer);
// MarkerCluster spiderfy non-animated methods
var cluster = group._topClusterLevel;
noAnimation = L.MarkerClusterNonAnimated.prototype;
expect(cluster._animationSpiderfy).to.be(noAnimation._animationSpiderfy);
expect(cluster._animationUnspiderfy).to.be(noAnimation._animationUnspiderfy);
} finally {
//Undo the DomUtil replacement hack
L.DomUtil = realDomUtil;
}
});
});

54
public/lib/leaflet.markercluster/spec/suites/clearLayersSpec.js

@ -0,0 +1,54 @@
describe('clearLayer', function () {
/////////////////////////////
// SETUP FOR EACH TEST
/////////////////////////////
var map, div;
beforeEach(function () {
div = document.createElement('div');
div.style.width = '200px';
div.style.height = '200px';
document.body.appendChild(div);
map = L.map(div, { maxZoom: 18, trackResize: false });
map.fitBounds(new L.LatLngBounds([
[1, 1],
[2, 2]
]));
});
afterEach(function () {
map.remove();
document.body.removeChild(div);
map = div = null;
});
/////////////////////////////
// TESTS
/////////////////////////////
it('clears everything before adding to map', function () {
var group = new L.MarkerClusterGroup();
var polygon = new L.Polygon([[1.5, 1.5], [2.0, 1.5], [2.0, 2.0], [1.5, 2.0]]);
var marker = new L.Marker([1.5, 1.5]);
group.addLayers([polygon, marker]);
group.clearLayers();
expect(group.hasLayer(polygon)).to.be(false);
expect(group.hasLayer(marker)).to.be(false);
});
it('hits polygons and markers after adding to map', function () {
var group = new L.MarkerClusterGroup();
var polygon = new L.Polygon([[1.5, 1.5], [2.0, 1.5], [2.0, 2.0], [1.5, 2.0]]);
var marker = new L.Marker([1.5, 1.5]);
group.addLayers([polygon, marker]);
map.addLayer(group);
group.clearLayers();
expect(group.hasLayer(polygon)).to.be(false);
expect(group.hasLayer(marker)).to.be(false);
});
});

63
public/lib/leaflet.markercluster/spec/suites/disableClusteringAtZoomSpec.js

@ -0,0 +1,63 @@
describe('disableClusteringAtZoom option', function () {
/////////////////////////////
// SETUP FOR EACH TEST
/////////////////////////////
var div, map, group, clock;
beforeEach(function () {
clock = sinon.useFakeTimers();
div = document.createElement('div');
div.style.width = '200px';
div.style.height = '200px';
document.body.appendChild(div);
map = L.map(div, { maxZoom: 18, trackResize: false });
// Corresponds to zoom level 8 for the above div dimensions.
map.fitBounds(new L.LatLngBounds([
[1, 1],
[2, 2]
]));
});
afterEach(function () {
group.clearLayers();
map.removeLayer(group);
map.remove();
div.remove();
clock.restore();
div, map, group, clock = null;
});
/////////////////////////////
// TESTS
/////////////////////////////
it('unclusters at zoom level equal or higher', function () {
var maxZoom = 15;
group = new L.MarkerClusterGroup({
disableClusteringAtZoom: maxZoom
});
group.addLayers([
new L.Marker([1.5, 1.5]),
new L.Marker([1.5, 1.5])
]);
map.addLayer(group);
expect(group._maxZoom).to.equal(maxZoom - 1);
expect(map._panes.markerPane.childNodes.length).to.equal(1); // 1 cluster.
map.setZoom(14);
clock.tick(1000);
expect(map._panes.markerPane.childNodes.length).to.equal(1); // 1 cluster.
map.setZoom(15);
clock.tick(1000);
expect(map._panes.markerPane.childNodes.length).to.equal(2); // 2 markers.
});
});

65
public/lib/leaflet.markercluster/spec/suites/eachLayerSpec.js

@ -0,0 +1,65 @@
describe('eachLayer', function () {
/////////////////////////////
// SETUP FOR EACH TEST
/////////////////////////////
var map, div;
beforeEach(function () {
div = document.createElement('div');
div.style.width = '200px';
div.style.height = '200px';
document.body.appendChild(div);
map = L.map(div, { maxZoom: 18, trackResize: false });
map.fitBounds(new L.LatLngBounds([
[1, 1],
[2, 2]
]));
});
afterEach(function () {
map.remove();
document.body.removeChild(div);
map = div = null;
});
/////////////////////////////
// TESTS
/////////////////////////////
it('hits polygons and markers before adding to map', function () {
var group = new L.MarkerClusterGroup();
var polygon = new L.Polygon([[1.5, 1.5], [2.0, 1.5], [2.0, 2.0], [1.5, 2.0]]);
var marker = new L.Marker([1.5, 1.5]);
group.addLayers([polygon, marker]);
var layers = [];
group.eachLayer(function (l) {
layers.push(l);
});
expect(layers.length).to.be(2);
expect(layers).to.contain(marker);
expect(layers).to.contain(polygon);
});
it('hits polygons and markers after adding to map', function () {
var group = new L.MarkerClusterGroup();
var polygon = new L.Polygon([[1.5, 1.5], [2.0, 1.5], [2.0, 2.0], [1.5, 2.0]]);
var marker = new L.Marker([1.5, 1.5]);
group.addLayers([polygon, marker]);
map.addLayer(group);
var layers = [];
group.eachLayer(function (l) {
layers.push(l);
});
expect(layers.length).to.be(2);
expect(layers).to.contain(marker);
expect(layers).to.contain(polygon);
});
});

373
public/lib/leaflet.markercluster/spec/suites/eventsSpec.js

@ -0,0 +1,373 @@
describe('events', function() {
/////////////////////////////
// SETUP FOR EACH TEST
/////////////////////////////
var div, map, group;
beforeEach(function () {
div = document.createElement('div');
div.style.width = '200px';
div.style.height = '200px';
document.body.appendChild(div);
map = L.map(div, { maxZoom: 18, trackResize: false });
// Corresponds to zoom level 8 for the above div dimensions.
map.fitBounds(new L.LatLngBounds([
[1, 1],
[2, 2]
]));
});
afterEach(function () {
if (group instanceof L.MarkerClusterGroup) {
group.removeLayers(group.getLayers());
map.removeLayer(group);
}
map.remove();
div.remove();
div = map = group = null;
});
/////////////////////////////
// TESTS
/////////////////////////////
it('is fired for a single child marker', function () {
var callback = sinon.spy();
group = new L.MarkerClusterGroup();
var marker = new L.Marker([1.5, 1.5]);
group.on('click', callback);
group.addLayer(marker);
map.addLayer(group);
// In Leaflet 1.0.0, event propagation must be explicitly set by 3rd argument.
marker.fire('click', null, true);
expect(callback.called).to.be(true);
});
it('is fired for a child polygon', function () {
var callback = sinon.spy();
group = new L.MarkerClusterGroup();
var polygon = new L.Polygon([[1.5, 1.5], [2.0, 1.5], [2.0, 2.0], [1.5, 2.0]]);
group.on('click', callback);
group.addLayer(polygon);
map.addLayer(group);
polygon.fire('click', null, true);
expect(callback.called).to.be(true);
});
it('is fired for a cluster click', function () {
var callback = sinon.spy();
group = new L.MarkerClusterGroup();
var marker = new L.Marker([1.5, 1.5]);
var marker2 = new L.Marker([1.5, 1.5]);
group.on('clusterclick', callback);
group.addLayers([marker, marker2]);
map.addLayer(group);
var cluster = group.getVisibleParent(marker);
expect(cluster instanceof L.MarkerCluster).to.be(true);
cluster.fire('click', null, true);
expect(callback.called).to.be(true);
});
describe('after being added, removed, re-added from the map', function() {
it('still fires events for nonpoint data', function() {
var callback = sinon.spy();
group = new L.MarkerClusterGroup();
var polygon = new L.Polygon([[1.5, 1.5], [2.0, 1.5], [2.0, 2.0], [1.5, 2.0]]);
group.on('click', callback);
group.addLayer(polygon);
map.addLayer(group);
map.removeLayer(group);
map.addLayer(group);
polygon.fire('click', null, true);
expect(callback.called).to.be(true);
});
it('still fires events for point data', function() {
var callback = sinon.spy();
group = new L.MarkerClusterGroup();
var marker = new L.Marker([1.5, 1.5]);
group.on('click', callback);
group.addLayer(marker);
map.addLayer(group);
map.removeLayer(group);
map.addLayer(group);
marker.fire('click', null, true);
expect(callback.called).to.be(true);
});
it('still fires cluster events', function() {
var callback = sinon.spy();
group = new L.MarkerClusterGroup();
var marker = new L.Marker([1.5, 1.5]);
var marker2 = new L.Marker([1.5, 1.5]);
group.on('clusterclick', callback);
group.addLayers([marker, marker2]);
map.addLayer(group);
map.removeLayer(group);
map.addLayer(group);
var cluster = group.getVisibleParent(marker);
expect(cluster instanceof L.MarkerCluster).to.be(true);
cluster.fire('click', null, true);
expect(callback.called).to.be(true);
});
it('does not break map events', function () {
var callback = sinon.spy();
group = new L.MarkerClusterGroup();
map.on('zoomend', callback);
map.addLayer(group);
map.removeLayer(group);
map.addLayer(group);
map.fire('zoomend');
expect(callback.called).to.be(true);
});
//layeradd
it('fires layeradd when markers are added while not on the map', function() {
var callback = sinon.spy();
group = new L.MarkerClusterGroup();
group.on('layeradd', callback);
var marker = new L.Marker([1.5, 1.5]);
group.addLayer(marker);
expect(callback.callCount).to.be(1);
});
it('fires layeradd when vectors are added while not on the map', function() {
var callback = sinon.spy();
group = new L.MarkerClusterGroup();
group.on('layeradd', callback);
var polygon = new L.Polygon([[1.5, 1.5], [2.0, 1.5], [2.0, 2.0], [1.5, 2.0]]);
group.addLayer(polygon);
expect(callback.callCount).to.be(1);
});
it('fires layeradd when markers are added while on the map', function() {
var callback = sinon.spy();
group = new L.MarkerClusterGroup();
group.on('layeradd', callback);
map.addLayer(group);
var marker = new L.Marker([1.5, 1.5]);
group.addLayer(marker);
expect(callback.callCount).to.be(1);
});
it('fires layeradd when vectors are added while on the map', function() {
var callback = sinon.spy();
group = new L.MarkerClusterGroup();
group.on('layeradd', callback);
map.addLayer(group);
var polygon = new L.Polygon([[1.5, 1.5], [2.0, 1.5], [2.0, 2.0], [1.5, 2.0]]);
group.addLayer(polygon);
expect(callback.callCount).to.be(1);
});
it('fires layeradd when markers are added using addLayers while on the map with chunked loading', function() {
var callback = sinon.spy();
group = new L.MarkerClusterGroup({ chunkedLoading: true });
group.on('layeradd', callback);
map.addLayer(group);
var marker = new L.Marker([1.5, 1.5]);
group.addLayers([marker]);
expect(callback.callCount).to.be(1);
});
it('fires layeradd when vectors are added using addLayers while on the map with chunked loading', function() {
var callback = sinon.spy();
group = new L.MarkerClusterGroup({ chunkedLoading: true });
group.on('layeradd', callback);
map.addLayer(group);
var polygon = new L.Polygon([[1.5, 1.5], [2.0, 1.5], [2.0, 2.0], [1.5, 2.0]]);
group.addLayers([polygon]);
expect(callback.callCount).to.be(1);
});
//layerremove
it('fires layerremove when a marker is removed while not on the map', function() {
var callback = sinon.spy();
group = new L.MarkerClusterGroup();
group.on('layerremove', callback);
var marker = new L.Marker([1.5, 1.5]);
group.addLayer(marker);
group.removeLayer(marker);
expect(callback.callCount).to.be(1);
});
it('fires layerremove when a vector is removed while not on the map', function() {
var callback = sinon.spy();
group = new L.MarkerClusterGroup();
group.on('layerremove', callback);
var polygon = new L.Polygon([[1.5, 1.5], [2.0, 1.5], [2.0, 2.0], [1.5, 2.0]]);
group.addLayer(polygon);
group.removeLayer(polygon);
expect(callback.callCount).to.be(1);
});
it('fires layerremove when a marker is removed while on the map', function() {
var callback = sinon.spy();
group = new L.MarkerClusterGroup();
group.on('layerremove', callback);
map.addLayer(group);
var marker = new L.Marker([1.5, 1.5]);
group.addLayer(marker);
group.removeLayer(marker);
expect(callback.callCount).to.be(1);
});
it('fires layerremove when a vector is removed while on the map', function() {
var callback = sinon.spy();
group = new L.MarkerClusterGroup();
group.on('layerremove', callback);
map.addLayer(group);
var polygon = new L.Polygon([[1.5, 1.5], [2.0, 1.5], [2.0, 2.0], [1.5, 2.0]]);
group.addLayer(polygon);
group.removeLayer(polygon);
expect(callback.callCount).to.be(1);
});
it('fires layerremove when a marker is removed using removeLayers while on the map with chunked loading', function() {
var callback = sinon.spy();
group = new L.MarkerClusterGroup({ chunkedLoading: true });
group.on('layerremove', callback);
map.addLayer(group);
var marker = new L.Marker([1.5, 1.5]);
group.addLayers([marker]);
group.removeLayers([marker]);
expect(callback.callCount).to.be(1);
});
it('fires layerremove when a vector is removed using removeLayers while on the map with chunked loading', function() {
var callback = sinon.spy();
group = new L.MarkerClusterGroup({ chunkedLoading: true });
group.on('layerremove', callback);
map.addLayer(group);
var polygon = new L.Polygon([[1.5, 1.5], [2.0, 1.5], [2.0, 2.0], [1.5, 2.0]]);
group.addLayers([polygon]);
group.removeLayers([polygon]);
expect(callback.callCount).to.be(1);
});
it('fires layerremove when a marker is removed using removeLayers while not on the map with chunked loading', function() {
var callback = sinon.spy();
group = new L.MarkerClusterGroup({ chunkedLoading: true });
group.on('layerremove', callback);
var marker = new L.Marker([1.5, 1.5]);
group.addLayers([marker]);
group.removeLayers([marker]);
expect(callback.callCount).to.be(1);
});
it('fires layerremove when a vector is removed using removeLayers while not on the map with chunked loading', function() {
var callback = sinon.spy();
group = new L.MarkerClusterGroup({ chunkedLoading: true });
group.on('layerremove', callback);
var polygon = new L.Polygon([[1.5, 1.5], [2.0, 1.5], [2.0, 2.0], [1.5, 2.0]]);
group.addLayers([polygon]);
group.removeLayers([polygon]);
expect(callback.callCount).to.be(1);
});
});
/*
//No normal events can be fired by a clustered marker, so probably don't need this.
it('is fired for a clustered child marker', function() {
var callback = sinon.spy();
group = new L.MarkerClusterGroup();
var marker = new L.Marker([1.5, 1.5]);
var marker2 = new L.Marker([1.5, 1.5]);
group.on('click', callback);
group.addLayers([marker, marker2]);
map.addLayer(group);
marker.fire('click');
expect(callback.called).to.be(true);
});
*/
});

128
public/lib/leaflet.markercluster/spec/suites/getBoundsSpec.js

@ -0,0 +1,128 @@
describe('getBounds', function() {
/////////////////////////////
// SETUP FOR EACH TEST
/////////////////////////////
var map, div;
beforeEach(function() {
div = document.createElement('div');
div.style.width = '200px';
div.style.height = '200px';
document.body.appendChild(div);
map = L.map(div, { maxZoom: 18, trackResize: false });
map.fitBounds(new L.LatLngBounds([
[1, 1],
[2, 2]
]));
});
afterEach(function() {
map.remove();
document.body.removeChild(div);
map = div = null;
});
/////////////////////////////
// TESTS
/////////////////////////////
describe('polygon layer', function() {
it('returns the correct bounds before adding to the map', function() {
var group = new L.MarkerClusterGroup();
var polygon = new L.Polygon([[1.5, 1.5], [2.0, 1.5], [2.0, 2.0], [1.5, 2.0]]);
group.addLayer(polygon);
expect(group.getBounds().equals(polygon.getBounds())).to.be(true);
});
it('returns the correct bounds after adding to the map after adding polygon', function() {
var group = new L.MarkerClusterGroup();
var polygon = new L.Polygon([[1.5, 1.5], [2.0, 1.5], [2.0, 2.0], [1.5, 2.0]]);
group.addLayer(polygon);
map.addLayer(group);
expect(group.getBounds().equals(polygon.getBounds())).to.be(true);
});
it('returns the correct bounds after adding to the map before adding polygon', function() {
var group = new L.MarkerClusterGroup();
var polygon = new L.Polygon([[1.5, 1.5], [2.0, 1.5], [2.0, 2.0], [1.5, 2.0]]);
map.addLayer(group);
group.addLayer(polygon);
expect(group.getBounds().equals(polygon.getBounds())).to.be(true);
});
});
describe('marker layers', function () {
it('returns the correct bounds before adding to the map', function () {
var group = new L.MarkerClusterGroup();
var marker = new L.Marker([1.5, 1.5]);
var marker2 = new L.Marker([1.0, 5.0]);
var marker3 = new L.Marker([6.0, 2.0]);
group.addLayers([marker, marker2, marker3]);
expect(group.getBounds().equals(L.latLngBounds([1.0, 5.0], [6.0, 1.5]))).to.be(true);
});
it('returns the correct bounds after adding to the map after adding markers', function () {
var group = new L.MarkerClusterGroup();
var marker = new L.Marker([1.5, 1.5]);
var marker2 = new L.Marker([1.0, 5.0]);
var marker3 = new L.Marker([6.0, 2.0]);
group.addLayers([marker, marker2, marker3]);
map.addLayer(group);
expect(group.getBounds().equals(L.latLngBounds([1.0, 5.0], [6.0, 1.5]))).to.be(true);
});
it('returns the correct bounds after adding to the map before adding markers', function () {
var group = new L.MarkerClusterGroup();
var marker = new L.Marker([1.5, 1.5]);
var marker2 = new L.Marker([1.0, 5.0]);
var marker3 = new L.Marker([6.0, 2.0]);
map.addLayer(group);
group.addLayers([marker, marker2, marker3]);
expect(group.getBounds().equals(L.latLngBounds([1.0, 5.0], [6.0, 1.5]))).to.be(true);
});
});
describe('marker and polygon layers', function() {
it('returns the correct bounds before adding to the map', function() {
var group = new L.MarkerClusterGroup();
var marker = new L.Marker([6.0, 3.0]);
var polygon = new L.Polygon([[1.5, 1.5], [2.0, 1.5], [2.0, 2.0], [1.5, 2.0]]);
group.addLayers([marker, polygon]);
expect(group.getBounds().equals(L.latLngBounds([1.5, 1.5], [6.0, 3.0]))).to.be(true);
});
it('returns the correct bounds after adding to the map', function () {
var group = new L.MarkerClusterGroup();
var marker = new L.Marker([6.0, 3.0]);
var polygon = new L.Polygon([[1.5, 1.5], [2.0, 1.5], [2.0, 2.0], [1.5, 2.0]]);
map.addLayer(group);
group.addLayers([marker, polygon]);
expect(group.getBounds().equals(L.latLngBounds([1.5, 1.5], [6.0, 3.0]))).to.be(true);
});
});
describe('blank layer', function () {
it('returns a blank bounds', function () {
var group = new L.MarkerClusterGroup();
expect(group.getBounds().isValid()).to.be(false);
});
});
});

75
public/lib/leaflet.markercluster/spec/suites/getLayersSpec.js

@ -0,0 +1,75 @@
describe('getLayers', function () {
/////////////////////////////
// SETUP FOR EACH TEST
/////////////////////////////
var map, div;
beforeEach(function () {
div = document.createElement('div');
div.style.width = '200px';
div.style.height = '200px';
document.body.appendChild(div);
map = L.map(div, { maxZoom: 18, trackResize: false });
map.fitBounds(new L.LatLngBounds([
[1, 1],
[2, 2]
]));
});
afterEach(function () {
map.remove();
document.body.removeChild(div);
map = div = null;
});
/////////////////////////////
// TESTS
/////////////////////////////
it('hits polygons and markers before adding to map', function () {
var group = new L.MarkerClusterGroup();
var polygon = new L.Polygon([[1.5, 1.5], [2.0, 1.5], [2.0, 2.0], [1.5, 2.0]]);
var marker = new L.Marker([1.5, 1.5]);
group.addLayers([polygon, marker]);
var layers = group.getLayers();
expect(layers.length).to.be(2);
expect(layers).to.contain(marker);
expect(layers).to.contain(polygon);
});
it('hits polygons and markers after adding to map', function () {
var group = new L.MarkerClusterGroup();
var polygon = new L.Polygon([[1.5, 1.5], [2.0, 1.5], [2.0, 2.0], [1.5, 2.0]]);
var marker = new L.Marker([1.5, 1.5]);
group.addLayers([polygon, marker]);
map.addLayer(group);
var layers = group.getLayers();
expect(layers.length).to.be(2);
expect(layers).to.contain(marker);
expect(layers).to.contain(polygon);
});
it('skips markers and polygons removed while not on the map', function () {
var group = new L.MarkerClusterGroup();
var polygon = new L.Polygon([[1.5, 1.5], [2.0, 1.5], [2.0, 2.0], [1.5, 2.0]]);
var marker = new L.Marker([1.5, 1.5]);
group.addLayers([polygon, marker]);
map.addLayer(group);
map.removeLayer(group);
group.removeLayers([polygon, marker]);
var layers = group.getLayers();
expect(layers.length).to.be(0);
});
});

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save