Compare commits

...

110 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
Сергей Аксенов 58c38a5c1e #38 3 years ago
Алексей Безбородов 137432613d Изменилась стартовая вкладка с Кода на Вики #35 3 years ago
Сергей Аксенов abff6b56f3 Изменил(а) на 'options/locale/locale_ru-RU.ini' 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
Сергей Аксенов 65ec0bf03f Изменил(а) на 'options/locale/locale_ru-RU.ini' 3 years ago
Сергей Аксенов a95f75ad67 Изменил(а) на 'options/locale/locale_ru-RU.ini' 3 years ago
Сергей Аксенов ccde6c5b8c Изменил(а) на 'options/locale/Код' 3 years ago
Алексей Безбородов f310ff2fa0 Исправлена работа с родителями и комментариями #31 3 years ago
Алексей Безбородов 9ec307e7fd Небольшие правки по родителям #31 3 years ago
Алексей Безбородов 0c3e6d6355 Merge pull request 'sub_task' (#28) from sub_task into dev_mirocod 3 years ago
Алексей Безбородов 86f641fd9d Оформлена информация 'О себе' на карте пользователей #14 3 years ago
Алексей Безбородов 4c860a61d7 Дерево подзадач #23 3 years ago
Алексей Безбородов e5039e9956 Начальный функционал для подзадач #6 3 years ago
Gitea f3340f9234 Переключение работы карты пользователей на LocationCoordinate #16 3 years ago
Алексей Безбородов 4776f60b69 Merge pull request 'user_coordinate' (#13) from user_coordinate into dev_mirocod 3 years ago
Алексей Безбородов 59e8c8a689 Merge pull request 'usermap' (#11) from usermap into dev_mirocod 3 years ago
Алексей Безбородов e37b5bb58b Merge pull request 'Изменён порядок вкладок в репозитории #5' (#8) from tab_reorder into dev_mirocod 3 years ago
Алексей Безбородов 60c3cc06c7 Изменён порядок вкладок в репозитории #5 3 years ago
Gitea 1f55588e64 Merge branch 'dev_mirocod' of git.mirocod.ru:Bezborodov/gitea into user_coordinate #2 3 years ago
Gitea fc30082480 Расширились ограничения в поле "О себе" до 1024 #4 3 years ago
Gitea c62d1a2570 Добавлены новые поля координат для пользователей #2 3 years ago
Gitea 76e532f00c Исправлена навигация над картой 3 years ago
Алексей Безбородов a8e49709bb Реалзизована грубая версия карты с пользователями 3 years ago
  1. 130
      README.md
  2. 7
      custom/conf/app.example.ini
  3. 2
      integrations/api_repo_edit_test.go
  4. 85
      models/error.go
  5. 52
      models/issue.go
  6. 52
      models/issue_comment.go
  7. 67
      models/issue_comment_list.go
  8. 134
      models/issue_parent.go
  9. 61
      models/issue_parent_test.go
  10. 6
      models/migrations/migrations.go
  11. 28
      models/migrations/v211.go
  12. 28
      models/migrations/v212.go
  13. 28
      models/migrations/v213.go
  14. 3
      models/migrations/v70.go
  15. 4
      models/org_team.go
  16. 5
      models/repo.go
  17. 16
      models/repo/issue.go
  18. 3
      models/repo/repo.go
  19. 1
      models/repo/repo_unit.go
  20. 32
      models/user/search.go
  21. 12
      models/user/user.go
  22. 5
      modules/context/repo.go
  23. 1
      modules/convert/convert.go
  24. 10
      modules/convert/issue_comment.go
  25. 1
      modules/convert/repository.go
  26. 2
      modules/convert/user.go
  27. 4
      modules/doctor/fix16961.go
  28. 4
      modules/doctor/fix16961_test.go
  29. 4
      modules/setting/service.go
  30. 1
      modules/structs/admin_user.go
  31. 2
      modules/structs/issue_comment.go
  32. 7
      modules/structs/org.go
  33. 4
      modules/structs/org_team.go
  34. 10
      modules/structs/repo.go
  35. 6
      modules/structs/user.go
  36. 582
      options/locale/locale_ru-RU.ini
  37. 39
      package-lock.json
  38. BIN
      public/img/logo.png
  39. 108
      public/img/logo.svg
  40. 102
      public/img/logo1.svg
  41. 51
      public/img/logo2.svg
  42. 7
      public/lib/leaflet.markercluster/.gitignore
  43. 20
      public/lib/leaflet.markercluster/.travis.yml
  44. 242
      public/lib/leaflet.markercluster/CHANGELOG.md
  45. 70
      public/lib/leaflet.markercluster/CONTRIBUTING.md
  46. 23
      public/lib/leaflet.markercluster/ISSUE_TEMPLATE.md
  47. 86
      public/lib/leaflet.markercluster/Jakefile.js
  48. 20
      public/lib/leaflet.markercluster/MIT-LICENCE.txt
  49. 292
      public/lib/leaflet.markercluster/README.md
  50. 27
      public/lib/leaflet.markercluster/bower.json
  51. 37
      public/lib/leaflet.markercluster/build/hintrc.js
  52. 41
      public/lib/leaflet.markercluster/build/rollup-config.js
  53. 60
      public/lib/leaflet.markercluster/dist/MarkerCluster.Default.css
  54. 14
      public/lib/leaflet.markercluster/dist/MarkerCluster.css
  55. 5
      public/lib/leaflet.markercluster/dist/WhereAreTheJavascriptFiles.txt
  56. 2690
      public/lib/leaflet.markercluster/dist/leaflet.markercluster-src.js
  57. 1
      public/lib/leaflet.markercluster/dist/leaflet.markercluster-src.js.map
  58. 3
      public/lib/leaflet.markercluster/dist/leaflet.markercluster.js
  59. 1
      public/lib/leaflet.markercluster/dist/leaflet.markercluster.js.map
  60. 53
      public/lib/leaflet.markercluster/example/geojson-sample.js
  61. 54
      public/lib/leaflet.markercluster/example/geojson.html
  62. BIN
      public/lib/leaflet.markercluster/example/map.png
  63. 81
      public/lib/leaflet.markercluster/example/marker-clustering-convexhull.html
  64. 114
      public/lib/leaflet.markercluster/example/marker-clustering-custom.html
  65. 83
      public/lib/leaflet.markercluster/example/marker-clustering-dragging.html
  66. 80
      public/lib/leaflet.markercluster/example/marker-clustering-everything.html
  67. 70
      public/lib/leaflet.markercluster/example/marker-clustering-geojson.html
  68. 104
      public/lib/leaflet.markercluster/example/marker-clustering-pane.html
  69. 45
      public/lib/leaflet.markercluster/example/marker-clustering-realworld-maxzoom.388.html
  70. 44
      public/lib/leaflet.markercluster/example/marker-clustering-realworld-mobile.388.html
  71. 46
      public/lib/leaflet.markercluster/example/marker-clustering-realworld.10000.html
  72. 45
      public/lib/leaflet.markercluster/example/marker-clustering-realworld.388.html
  73. 78
      public/lib/leaflet.markercluster/example/marker-clustering-realworld.50000.html
  74. 60
      public/lib/leaflet.markercluster/example/marker-clustering-singlemarkermode.html
  75. 60
      public/lib/leaflet.markercluster/example/marker-clustering-spiderfier.html
  76. 60
      public/lib/leaflet.markercluster/example/marker-clustering-zoomtobounds.html
  77. 59
      public/lib/leaflet.markercluster/example/marker-clustering-zoomtoshowlayer.html
  78. 88
      public/lib/leaflet.markercluster/example/marker-clustering.html
  79. 6
      public/lib/leaflet.markercluster/example/mobile.css
  80. 83
      public/lib/leaflet.markercluster/example/old-bugs/add-1000-after.html
  81. 52
      public/lib/leaflet.markercluster/example/old-bugs/add-markers-offscreen.html
  82. 62
      public/lib/leaflet.markercluster/example/old-bugs/add-remove-before-addtomap.html
  83. 47
      public/lib/leaflet.markercluster/example/old-bugs/animationless-zoom.html
  84. 59
      public/lib/leaflet.markercluster/example/old-bugs/click-cluster-at-screen-edge.html
  85. 106
      public/lib/leaflet.markercluster/example/old-bugs/disappearing-marker-from-spider.html
  86. 69
      public/lib/leaflet.markercluster/example/old-bugs/doesnt-update-cluster-on-bottom-level.html
  87. 75
      public/lib/leaflet.markercluster/example/old-bugs/drag-with-spiderfying.html
  88. 74
      public/lib/leaflet.markercluster/example/old-bugs/remove-add-clustering.html
  89. 65
      public/lib/leaflet.markercluster/example/old-bugs/remove-when-spiderfied.html
  90. 69
      public/lib/leaflet.markercluster/example/old-bugs/removelayer-after-remove-from-map.html
  91. 69
      public/lib/leaflet.markercluster/example/old-bugs/setView-doesnt-remove.html
  92. 63
      public/lib/leaflet.markercluster/example/old-bugs/zoomtoshowlayer-doesnt-need-to-zoom.html
  93. 56
      public/lib/leaflet.markercluster/example/old-bugs/zoomtoshowlayer-doesnt-zoom-if-centered-on.html
  94. 10004
      public/lib/leaflet.markercluster/example/realworld.10000.js
  95. 393
      public/lib/leaflet.markercluster/example/realworld.388.js
  96. 25006
      public/lib/leaflet.markercluster/example/realworld.50000.1.js
  97. 25000
      public/lib/leaflet.markercluster/example/realworld.50000.2.js
  98. 83
      public/lib/leaflet.markercluster/example/remove-geoJSON-when-spiderfied.html
  99. 28
      public/lib/leaflet.markercluster/example/screen.css
  100. 43
      public/lib/leaflet.markercluster/package.json
  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

7
custom/conf/app.example.ini

@ -701,6 +701,13 @@ PATH =
;; Dependencies can be added from any repository where the user is granted access or only from the current repository depending on this setting.
;ALLOW_CROSS_REPOSITORY_DEPENDENCIES = true
;;
;; Default value for EnableParents
;; Repositories will use parents by default depending on this setting
;DEFAULT_ENABLE_PARENTS = true
;;
;; Parents can be added from any repository where the user is granted access or only from the current repository depending on this setting.
;ALLOW_CROSS_REPOSITORY_PARENTS = true
;;
;; Enable heatmap on users profiles.
;ENABLE_USER_HEATMAP = true
;;

2
integrations/api_repo_edit_test.go

@ -35,6 +35,7 @@ func getRepoEditOptionFromRepo(repo *repo_model.Repository) *api.EditRepoOption
EnableTimeTracker: config.EnableTimetracker,
AllowOnlyContributorsToTrackTime: config.AllowOnlyContributorsToTrackTime,
EnableIssueDependencies: config.EnableDependencies,
EnableIssueParents: config.EnableParents,
}
} else if unit, err := repo.GetUnit(unit_model.TypeExternalTracker); err == nil {
config := unit.ExternalTrackerConfig()
@ -182,6 +183,7 @@ func TestAPIRepoEdit(t *testing.T) {
EnableTimeTracker: false,
AllowOnlyContributorsToTrackTime: false,
EnableIssueDependencies: false,
EnableIssueParents: false,
}
*repoEditOption.HasWiki = true
repoEditOption.ExternalWiki = nil

85
models/error.go

@ -1340,6 +1340,91 @@ func (err ErrUnknownDependencyType) Error() string {
return fmt.Sprintf("unknown dependency type [type: %d]", err.Type)
}
// .___ ________ .___ .__
// | | ______ ________ __ ____ \______ \ ____ ______ ____ ____ __| _/____ ____ ____ |__| ____ ______
// | |/ ___// ___/ | \_/ __ \ | | \_/ __ \\____ \_/ __ \ / \ / __ |/ __ \ / \_/ ___\| |/ __ \ / ___/
// | |\___ \ \___ \| | /\ ___/ | ` \ ___/| |_> > ___/| | \/ /_/ \ ___/| | \ \___| \ ___/ \___ \
// |___/____ >____ >____/ \___ >_______ /\___ > __/ \___ >___| /\____ |\___ >___| /\___ >__|\___ >____ >
// \/ \/ \/ \/ \/|__| \/ \/ \/ \/ \/ \/ \/ \/
// ErrParentExists represents a "ParentAlreadyExists" kind of error.
type ErrParentExists struct {
IssueID int64
ParentID int64
}
// IsErrParentExists checks if an error is a ErrParentExists.
func IsErrParentExists(err error) bool {
_, ok := err.(ErrParentExists)
return ok
}
func (err ErrParentExists) Error() string {
return fmt.Sprintf("issue parent does already exist [issue id: %d, parent id: %d]", err.IssueID, err.ParentID)
}
// ErrParentNotExists represents a "ParentAlreadyExists" kind of error.
type ErrParentNotExists struct {
IssueID int64
ParentID int64
}
// IsErrParentNotExists checks if an error is a ErrParentExists.
func IsErrParentNotExists(err error) bool {
_, ok := err.(ErrParentNotExists)
return ok
}
func (err ErrParentNotExists) Error() string {
return fmt.Sprintf("issue parent does not exist [issue id: %d, parent id: %d]", err.IssueID, err.ParentID)
}
// ErrCircularParent represents a "ParentCircular" kind of error.
type ErrCircularParent struct {
IssueID int64
ParentID int64
}
// IsErrCircularParent checks if an error is a ErrCircularParent.
func IsErrCircularParent(err error) bool {
_, ok := err.(ErrCircularParent)
return ok
}
func (err ErrCircularParent) Error() string {
return fmt.Sprintf("circular parents exists (two issues blocking each other) [issue id: %d, parent id: %d]", err.IssueID, err.ParentID)
}
// ErrParentsLeft represents an error where the issue you're trying to close still has parents left.
type ErrParentsLeft struct {
IssueID int64
}
// IsErrParentsLeft checks if an error is a ErrParentsLeft.
func IsErrParentsLeft(err error) bool {
_, ok := err.(ErrParentsLeft)
return ok
}
func (err ErrParentsLeft) Error() string {
return fmt.Sprintf("issue has open parents [issue id: %d]", err.IssueID)
}
// ErrUnknownParentType represents an error where an unknown parent type was passed
type ErrUnknownParentType struct {
Type ParentType
}
// IsErrUnknownParentType checks if an error is ErrUnknownParentType
func IsErrUnknownParentType(err error) bool {
_, ok := err.(ErrUnknownParentType)
return ok
}
func (err ErrUnknownParentType) Error() string {
return fmt.Sprintf("unknown parent type [type: %d]", err.Type)
}
// __________ .__
// \______ \ _______ _|__| ______ _ __
// | _// __ \ \/ / |/ __ \ \/ \/ /

52
models/issue.go

@ -1990,6 +1990,12 @@ type DependencyInfo struct {
repo_model.Repository `xorm:"extends"`
}
// ParentInfo represents high level information about an issue which is a parent of another issue.
type ParentInfo struct {
Issue `xorm:"extends"`
repo_model.Repository `xorm:"extends"`
}
// getParticipantIDsByIssue returns all userIDs who are participated in comments of an issue and issue author
func (issue *Issue) getParticipantIDsByIssue(e db.Engine) ([]int64, error) {
if issue == nil {
@ -2048,6 +2054,42 @@ func (issue *Issue) getBlockingDependencies(e db.Engine) (issueDeps []*Dependenc
return issueDeps, err
}
// Get Blocked By Parents, aka all issues this issue is blocked by.
func (issue *Issue) getBlockedByParents(e db.Engine) (issueParents []*ParentInfo, err error) {
err = e.
Table("issue").
Join("INNER", "repository", "repository.id = issue.repo_id").
Join("INNER", "issue_parent", "issue_parent.parent_id = issue.id").
Where("issue_id = ?", issue.ID).
// sort by repo id then created date, with the issues of the same repo at the beginning of the list
OrderBy("CASE WHEN issue.repo_id = " + strconv.FormatInt(issue.RepoID, 10) + " THEN 0 ELSE issue.repo_id END, issue.created_unix DESC").
Find(&issueParents)
for _, parentInfo := range issueParents {
parentInfo.Issue.Repo = &parentInfo.Repository
}
return issueParents, err
}
// Get Blocking Parents, aka all issues this issue blocks.
func (issue *Issue) getBlockingParents(e db.Engine) (issueParents []*ParentInfo, err error) {
err = e.
Table("issue").
Join("INNER", "repository", "repository.id = issue.repo_id").
Join("INNER", "issue_parent", "issue_parent.issue_id = issue.id").
Where("parent_id = ?", issue.ID).
// sort by repo id then created date, with the issues of the same repo at the beginning of the list
OrderBy("CASE WHEN issue.repo_id = " + strconv.FormatInt(issue.RepoID, 10) + " THEN 0 ELSE issue.repo_id END, issue.created_unix DESC").
Find(&issueParents)
for _, parentInfo := range issueParents {
parentInfo.Issue.Repo = &parentInfo.Repository
}
return issueParents, err
}
// BlockedByDependencies finds all Dependencies an issue is blocked by
func (issue *Issue) BlockedByDependencies() ([]*DependencyInfo, error) {
return issue.getBlockedByDependencies(db.GetEngine(db.DefaultContext))
@ -2058,6 +2100,16 @@ func (issue *Issue) BlockingDependencies() ([]*DependencyInfo, error) {
return issue.getBlockingDependencies(db.GetEngine(db.DefaultContext))
}
// BlockedByParents finds all Parents an issue is blocked by
func (issue *Issue) BlockedByParents() ([]*ParentInfo, error) {
return issue.getBlockedByParents(db.GetEngine(db.DefaultContext))
}
// BlockingParents returns all blocking dependencies, aka all other issues a given issue blocks
func (issue *Issue) BlockingParents() ([]*ParentInfo, error) {
return issue.getBlockingParents(db.GetEngine(db.DefaultContext))
}
func (issue *Issue) updateClosedNum(ctx context.Context) (err error) {
if issue.IsPull {
err = repoStatsCorrectNumClosed(ctx, issue.RepoID, true, "num_closed_pulls")

52
models/issue_comment.go

@ -108,6 +108,10 @@ const (
CommentTypeDismissReview
// 33 Change issue ref
CommentTypeChangeIssueRef
// 34 Parent added
CommentTypeAddParent
// 35 Parent removed
CommentTypeRemoveParent
)
var commentStrings = []string{
@ -145,6 +149,8 @@ var commentStrings = []string{
"project_board",
"dismiss_review",
"change_issue_ref",
"add_parent",
"remove_parent",
}
func (t CommentType) String() string {
@ -224,6 +230,8 @@ type Comment struct {
NewRef string
DependentIssueID int64
DependentIssue *Issue `xorm:"-"`
ParentIssueID int64
ParentIssue *Issue `xorm:"-"`
CommitID int64
Line int64 // - previous line / + proposed line
@ -619,6 +627,15 @@ func (c *Comment) LoadDepIssueDetails() (err error) {
return err
}
// LoadParentIssueDetails loads Parent Issue Details
func (c *Comment) LoadParentIssueDetails() (err error) {
if c.ParentIssueID <= 0 || c.ParentIssue != nil {
return nil
}
c.ParentIssue, err = getIssueByID(db.GetEngine(db.DefaultContext), c.ParentIssueID)
return err
}
// LoadTime loads the associated time for a CommentTypeAddTimeManual
func (c *Comment) LoadTime() error {
if c.Time != nil || c.TimeID == 0 {
@ -789,6 +806,7 @@ func createComment(ctx context.Context, opts *CreateCommentOptions) (_ *Comment,
OldRef: opts.OldRef,
NewRef: opts.NewRef,
DependentIssueID: opts.DependentIssueID,
ParentIssueID: opts.ParentIssueID,
TreePath: opts.TreePath,
ReviewID: opts.ReviewID,
Patch: opts.Patch,
@ -933,6 +951,39 @@ func createIssueDependencyComment(ctx context.Context, doer *user_model.User, is
return
}
// Creates issue parent comment
func createIssueParentComment(ctx context.Context, doer *user_model.User, issue, parentIssue *Issue, add bool) (err error) {
cType := CommentTypeAddParent
if !add {
cType = CommentTypeRemoveParent
}
if err = issue.loadRepo(ctx); err != nil {
return
}
// Make two comments, one in each issue
opts := &CreateCommentOptions{
Type: cType,
Doer: doer,
Repo: issue.Repo,
Issue: issue,
ParentIssueID: parentIssue.ID,
}
if _, err = createComment(ctx, opts); err != nil {
return
}
opts = &CreateCommentOptions{
Type: cType,
Doer: doer,
Repo: issue.Repo,
Issue: parentIssue,
ParentIssueID: issue.ID,
}
_, err = createComment(ctx, opts)
return
}
// CreateCommentOptions defines options for creating comment
type CreateCommentOptions struct {
Type CommentType
@ -942,6 +993,7 @@ type CreateCommentOptions struct {
Label *Label
DependentIssueID int64
ParentIssueID int64
OldMilestoneID int64
MilestoneID int64
OldProjectID int64

67
models/issue_comment_list.go

@ -395,6 +395,69 @@ func (comments CommentList) loadDependentIssues(ctx context.Context) error {
return nil
}
func (comments CommentList) getParentIssueIDs() []int64 {
ids := make(map[int64]struct{}, len(comments))
for _, comment := range comments {
if comment.ParentIssue != nil {
continue
}
if _, ok := ids[comment.ParentIssueID]; !ok {
ids[comment.ParentIssueID] = struct{}{}
}
}
return keysInt64(ids)
}
func (comments CommentList) loadParentIssues(ctx context.Context) error {
if len(comments) == 0 {
return nil
}
e := db.GetEngine(ctx)
issueIDs := comments.getParentIssueIDs()
issues := make(map[int64]*Issue, len(issueIDs))
left := len(issueIDs)
for left > 0 {
limit := defaultMaxInSize
if left < limit {
limit = left
}
rows, err := e.
In("id", issueIDs[:limit]).
Rows(new(Issue))
if err != nil {
return err
}
for rows.Next() {
var issue Issue
err = rows.Scan(&issue)
if err != nil {
_ = rows.Close()
return err
}
issues[issue.ID] = &issue
}
_ = rows.Close()
left -= limit
issueIDs = issueIDs[limit:]
}
for _, comment := range comments {
if comment.ParentIssue == nil {
comment.ParentIssue = issues[comment.ParentIssueID]
if comment.ParentIssue != nil {
if err := comment.ParentIssue.loadRepo(ctx); err != nil {
return err
}
}
}
}
return nil
}
func (comments CommentList) loadAttachments(e db.Engine) (err error) {
if len(comments) == 0 {
return nil
@ -528,6 +591,10 @@ func (comments CommentList) loadAttributes(ctx context.Context) (err error) {
return
}
if err = comments.loadParentIssues(ctx); err != nil {
return
}
return nil
}

134
models/issue_parent.go

@ -0,0 +1,134 @@
// Copyright 2018-2022 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package models
import (
"code.gitea.io/gitea/models/db"
user_model "code.gitea.io/gitea/models/user"
"code.gitea.io/gitea/modules/timeutil"
)
// IssueParent represents an issue parent
type IssueParent struct {
ID int64 `xorm:"pk autoincr"`
UserID int64 `xorm:"NOT NULL"`
IssueID int64 `xorm:"UNIQUE(issue_parent) NOT NULL"`
ParentID int64 `xorm:"UNIQUE(issue_parent) NOT NULL"`
CreatedUnix timeutil.TimeStamp `xorm:"created"`
UpdatedUnix timeutil.TimeStamp `xorm:"updated"`
}
func init() {
db.RegisterModel(new(IssueParent))
}
// ParentType Defines Parent Type Constants
type ParentType int
// Define Parent Types
const (
ParentTypeFather ParentType = iota
ParentTypeChild
)
// CreateIssueParent creates a new parent for an issue
func CreateIssueParent(user *user_model.User, issue, parent *Issue) error {
ctx, committer, err := db.TxContext()
if err != nil {
return err
}
defer committer.Close()
sess := db.GetEngine(ctx)
// Check if it aleready exists
exists, err := issueParentExists(sess, issue.ID, parent.ID)
if err != nil {
return err
}
if exists {
return ErrParentExists{issue.ID, parent.ID}
}
// And if it would be circular
circular, err := issueParentExists(sess, parent.ID, issue.ID)
if err != nil {
return err
}
if circular {
return ErrCircularParent{issue.ID, parent.ID}
}
if err := db.Insert(ctx, &IssueParent{
UserID: user.ID,
IssueID: issue.ID,
ParentID: parent.ID,
}); err != nil {
return err
}
// Add comment referencing the new parent
if err = createIssueParentComment(ctx, user, issue, parent, true); err != nil {
return err
}
return committer.Commit()
}
// RemoveIssueParent removes a parent from an issue
func RemoveIssueParent(user *user_model.User, issue, parent *Issue, parentType ParentType) (err error) {
ctx, committer, err := db.TxContext()
if err != nil {
return err
}
defer committer.Close()
var issueParentToDelete IssueParent
switch parentType {
case ParentTypeFather:
issueParentToDelete = IssueParent{IssueID: issue.ID, ParentID: parent.ID}
case ParentTypeChild:
issueParentToDelete = IssueParent{IssueID: parent.ID, ParentID: issue.ID}
default:
return ErrUnknownParentType{parentType}
}
affected, err := db.GetEngine(ctx).Delete(&issueParentToDelete)
if err != nil {
return err
}
// If we deleted nothing, the parent did not exist
if affected <= 0 {
return ErrParentNotExists{issue.ID, parent.ID}
}
// Add comment referencing the removed parent
if err = createIssueParentComment(ctx, user, issue, parent, false); err != nil {
return err
}
return committer.Commit()
}
// Check if the parent already exists
func issueParentExists(e db.Engine, issueID, depID int64) (bool, error) {
return e.Where("(issue_id = ? AND parent_id = ?)", issueID, depID).Exist(&IssueParent{})
}
// IssueNoParentsLeft checks if issue can be closed
func IssueNoParentsLeft(issue *Issue) (bool, error) {
return issueNoParentsLeft(db.GetEngine(db.DefaultContext), issue)
}
func issueNoParentsLeft(e db.Engine, issue *Issue) (bool, error) {
exists, err := e.
Table("issue_parent").
Select("issue.*").
Join("INNER", "issue", "issue.id = issue_parent.parent_id").
Where("issue_parent.issue_id = ?", issue.ID).
And("issue.is_closed = ?", "0").
Exist(&Issue{})
return !exists, err
}

61
models/issue_parent_test.go

@ -0,0 +1,61 @@
// Copyright 2018 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package models
import (
"testing"
"code.gitea.io/gitea/models/unittest"
user_model "code.gitea.io/gitea/models/user"
"github.com/stretchr/testify/assert"
)
func TestCreateIssueParent(t *testing.T) {
// Prepare
assert.NoError(t, unittest.PrepareTestDatabase())
user1, err := user_model.GetUserByID(1)
assert.NoError(t, err)
issue1, err := GetIssueByID(1)
assert.NoError(t, err)
issue2, err := GetIssueByID(2)
assert.NoError(t, err)
// Create a dependency and check if it was successful
err = CreateIssueParent(user1, issue1, issue2)
assert.NoError(t, err)
// Do it again to see if it will check if the dependency already exists
err = CreateIssueParent(user1, issue1, issue2)
assert.Error(t, err)
assert.True(t, IsErrParentExists(err))
// Check for circular dependencies
err = CreateIssueParent(user1, issue2, issue1)
assert.Error(t, err)
assert.True(t, IsErrCircularParent(err))
_ = unittest.AssertExistsAndLoadBean(t, &Comment{Type: CommentTypeAddParent, PosterID: user1.ID, IssueID: issue1.ID})
// Check if dependencies left is correct
left, err := IssueNoParentsLeft(issue1)
assert.NoError(t, err)
assert.False(t, left)
// Close #2 and check again
_, err = issue2.ChangeStatus(user1, true)
assert.NoError(t, err)
left, err = IssueNoParentsLeft(issue1)
assert.NoError(t, err)
assert.True(t, left)
// Test removing the dependency
err = RemoveIssueParent(user1, issue1, issue2, ParentTypeFather)
assert.NoError(t, err)
}

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/migrations/v70.go

@ -102,6 +102,9 @@ func addIssueDependencies(x *xorm.Engine) (err error) {
if _, ok := unit.Config["EnableDependencies"]; !ok {
unit.Config["EnableDependencies"] = setting.Service.DefaultEnableDependencies
}
if _, ok := unit.Config["EnableParents"]; !ok {
unit.Config["EnableParents"] = setting.Service.DefaultEnableParents
}
if _, err := x.ID(unit.ID).Cols("config").Update(unit); err != nil {
return err
}

4
models/org_team.go

@ -691,8 +691,8 @@ func UpdateTeam(t *Team, authChanged, includeAllChanged bool) (err error) {
return errors.New("empty team name")
}
if len(t.Description) > 255 {
t.Description = t.Description[:255]
if len(t.Description) > 1024 {
t.Description = t.Description[:1024]
}
ctx, committer, err := db.TxContext()

5
models/repo.go

@ -515,6 +515,7 @@ func CreateRepository(ctx context.Context, doer, u *user_model.User, repo *repo_
EnableTimetracker: setting.Service.DefaultEnableTimetracking,
AllowOnlyContributorsToTrackTime: setting.Service.DefaultAllowOnlyContributorsToTrackTime,
EnableDependencies: setting.Service.DefaultEnableDependencies,
EnableParents: setting.Service.DefaultEnableParents,
},
})
} else if tp == unit.TypePullRequests {
@ -635,8 +636,8 @@ func DecrementRepoForkNum(ctx context.Context, repoID int64) error {
func updateRepository(ctx context.Context, repo *repo_model.Repository, visibilityChanged bool) (err error) {
repo.LowerName = strings.ToLower(repo.Name)
if utf8.RuneCountInString(repo.Description) > 255 {
repo.Description = string([]rune(repo.Description)[:255])
if utf8.RuneCountInString(repo.Description) > 1024 {
repo.Description = string([]rune(repo.Description)[:1024])
}
if utf8.RuneCountInString(repo.Website) > 255 {
repo.Website = string([]rune(repo.Website)[:255])

16
models/repo/issue.go

@ -70,3 +70,19 @@ func (repo *Repository) IsDependenciesEnabledCtx(ctx context.Context) bool {
}
return u.IssuesConfig().EnableDependencies
}
// IsParentsEnabled returns if parents are enabled and returns the default setting if not set.
func (repo *Repository) IsParentsEnabled() bool {
return repo.IsParentsEnabledCtx(db.DefaultContext)
}
// IsParentsEnabledCtx returns if parents are enabled and returns the default setting if not set.
func (repo *Repository) IsParentsEnabledCtx(ctx context.Context) bool {
var u *RepoUnit
var err error
if u, err = repo.GetUnitCtx(ctx, unit.TypeIssues); err != nil {
log.Trace("%s", err)
return setting.Service.DefaultEnableParents
}
return u.IssuesConfig().EnableParents
}

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

1
models/repo/repo_unit.go

@ -94,6 +94,7 @@ type IssuesConfig struct {
EnableTimetracker bool
AllowOnlyContributorsToTrackTime bool
EnableDependencies bool
EnableParents bool
}
// FromDB fills up a IssuesConfig from serialized format.

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})
}

12
models/user/user.go

@ -46,6 +46,9 @@ const (
// UserTypeOrganization defines an organization
UserTypeOrganization
// UserTypeIdentity defines individual + organization
UserTypeIdentity
)
const (
@ -94,11 +97,15 @@ type User struct {
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
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"`
@ -187,8 +194,9 @@ func (u *User) BeforeUpdate() {
u.LowerName = strings.ToLower(u.Name)
u.Location = base.TruncateString(u.Location, 255)
u.LocationCoordinate = base.TruncateString(u.LocationCoordinate, 255)
u.Website = base.TruncateString(u.Website, 255)
u.Description = base.TruncateString(u.Description, 255)
u.Description = base.TruncateString(u.Description, 1024)
}
// AfterLoad is invoked from XORM after filling all the fields of this object.

5
modules/context/repo.go

@ -164,6 +164,11 @@ func (r *Repository) CanCreateIssueDependencies(user *user_model.User, isPull bo
return r.Repository.IsDependenciesEnabled() && r.Permission.CanWriteIssuesOrPulls(isPull)
}
// CanCreateIssueParents returns whether or not a user can create parents.
func (r *Repository) CanCreateIssueParents(user *user_model.User, isPull bool) bool {
return r.Repository.IsParentsEnabled() && r.Permission.CanWriteIssuesOrPulls(isPull)
}
// GetCommitsCount returns cached commit count for current view
func (r *Repository) GetCommitsCount() (int64, error) {
var contextName string

1
modules/convert/convert.go

@ -289,6 +289,7 @@ func ToOrganization(org *models.Organization) *api.Organization {
Description: org.Description,
Website: org.Website,
Location: org.Location,
LocationCoordinate: org.LocationCoordinate,
Visibility: org.Visibility.String(),
RepoAdminChangeTeamAccess: org.RepoAdminChangeTeamAccess,
}

10
modules/convert/issue_comment.go

@ -52,6 +52,12 @@ func ToTimelineComment(c *models.Comment, doer *user_model.User) *api.TimelineCo
return nil
}
err = c.LoadParentIssueDetails()
if err != nil {
log.Error("LoadParentIssueDetails: %v", err)
return nil
}
err = c.LoadTime()
if err != nil {
log.Error("LoadTime: %v", err)
@ -163,5 +169,9 @@ func ToTimelineComment(c *models.Comment, doer *user_model.User) *api.TimelineCo
comment.DependentIssue = ToAPIIssue(c.DependentIssue)
}
if c.ParentIssue != nil {
comment.ParentIssue = ToAPIIssue(c.ParentIssue)
}
return comment
}

1
modules/convert/repository.go

@ -51,6 +51,7 @@ func innerToRepo(repo *repo_model.Repository, mode perm.AccessMode, isParent boo
EnableTimeTracker: config.EnableTimetracker,
AllowOnlyContributorsToTrackTime: config.AllowOnlyContributorsToTrackTime,
EnableIssueDependencies: config.EnableDependencies,
EnableIssueParents: config.EnableParents,
}
} else if unit, err := repo.GetUnit(unit_model.TypeExternalTracker); err == nil {
config := unit.ExternalTrackerConfig()

2
modules/convert/user.go

@ -55,6 +55,7 @@ func toUser(user *user_model.User, signed, authed bool) *api.User {
Created: user.CreatedUnix.AsTime(),
Restricted: user.IsRestricted,
Location: user.Location,
LocationCoordinate: user.LocationCoordinate,
Website: user.Website,
Description: user.Description,
// counter's
@ -87,6 +88,7 @@ func User2UserSettings(user *user_model.User) api.UserSettings {
FullName: user.FullName,
Website: user.Website,
Location: user.Location,
LocationCoordinate: user.LocationCoordinate,
Language: user.Language,
Description: user.Description,
Theme: user.Theme,

4
modules/doctor/fix16961.go

@ -206,6 +206,10 @@ func fixIssuesConfig16961(bs []byte, cfg *repo_model.IssuesConfig) (fixed bool,
if parseErr != nil {
return
}
cfg.EnableParents, parseErr = parseBool16961(parts[3])
if parseErr != nil {
return
}
return true, nil
}

4
modules/doctor/fix16961_test.go

@ -237,11 +237,12 @@ func Test_fixIssuesConfig_16961(t *testing.T) {
}{
{
name: "normal",
bs: `{"EnableTimetracker":true,"AllowOnlyContributorsToTrackTime":true,"EnableDependencies":true}`,
bs: `{"EnableTimetracker":true,"AllowOnlyContributorsToTrackTime":true,"EnableDependencies":true,"EnableParents":true}`,
expected: repo_model.IssuesConfig{
EnableTimetracker: true,
AllowOnlyContributorsToTrackTime: true,
EnableDependencies: true,
EnableParents: true,
},
},
{
@ -251,6 +252,7 @@ func Test_fixIssuesConfig_16961(t *testing.T) {
EnableTimetracker: true,
AllowOnlyContributorsToTrackTime: true,
EnableDependencies: true,
EnableParents: true,
},
wantFixed: true,
},

4
modules/setting/service.go

@ -53,7 +53,9 @@ var Service = struct {
EnableTimetracking bool
DefaultEnableTimetracking bool
DefaultEnableDependencies bool
DefaultEnableParents bool
AllowCrossRepositoryDependencies bool
AllowCrossRepositoryParents bool
DefaultAllowOnlyContributorsToTrackTime bool
NoReplyAddress string
EnableUserHeatmap bool
@ -141,7 +143,9 @@ func newService() {
Service.DefaultEnableTimetracking = sec.Key("DEFAULT_ENABLE_TIMETRACKING").MustBool(true)
}
Service.DefaultEnableDependencies = sec.Key("DEFAULT_ENABLE_DEPENDENCIES").MustBool(true)
Service.DefaultEnableParents = sec.Key("DEFAULT_ENABLE_PARENTS").MustBool(true)
Service.AllowCrossRepositoryDependencies = sec.Key("ALLOW_CROSS_REPOSITORY_DEPENDENCIES").MustBool(true)
Service.AllowCrossRepositoryParents = sec.Key("ALLOW_CROSS_REPOSITORY_PARENTS").MustBool(true)
Service.DefaultAllowOnlyContributorsToTrackTime = sec.Key("DEFAULT_ALLOW_ONLY_CONTRIBUTORS_TO_TRACK_TIME").MustBool(true)
Service.NoReplyAddress = sec.Key("NO_REPLY_ADDRESS").MustString("noreply." + Domain)
Service.EnableUserHeatmap = sec.Key("ENABLE_USER_HEATMAP").MustBool(true)

1
modules/structs/admin_user.go

@ -36,6 +36,7 @@ type EditUserOption struct {
MustChangePassword *bool `json:"must_change_password"`
Website *string `json:"website" binding:"OmitEmpty;ValidUrl;MaxSize(255)"`
Location *string `json:"location" binding:"MaxSize(50)"`
LocationCoordinate *string `json:"location_coordinate" binding:"MaxSize(255)"`
Description *string `json:"description" binding:"MaxSize(255)"`
Active *bool `json:"active"`
Admin *bool `json:"admin"`

2
modules/structs/issue_comment.go

@ -79,4 +79,6 @@ type TimelineComment struct {
ResolveDoer *User `json:"resolve_doer"`
DependentIssue *Issue `json:"dependent_issue"`
ParentIssue *Issue `json:"parent_issue"`
}

7
modules/structs/org.go

@ -13,6 +13,7 @@ type Organization struct {
Description string `json:"description"`
Website string `json:"website"`
Location string `json:"location"`
LocationCoordinate string `json:"location_coordinate"`
Visibility string `json:"visibility"`
RepoAdminChangeTeamAccess bool `json:"repo_admin_change_team_access"`
}
@ -31,9 +32,10 @@ type CreateOrgOption struct {
// required: true
UserName string `json:"username" binding:"Required"`
FullName string `json:"full_name"`
Description string `json:"description" binding:"MaxSize(255)"`
Description string `json:"description" binding:"MaxSize(1024)"`
Website string `json:"website" binding:"ValidUrl;MaxSize(255)"`
Location string `json:"location" binding:"MaxSize(50)"`
LocationCoordinate string `json:"location_coordinate" binding:"MaxSize(255)"`
// possible values are `public` (default), `limited` or `private`
// enum: public,limited,private
Visibility string `json:"visibility" binding:"In(,public,limited,private)"`
@ -45,9 +47,10 @@ type CreateOrgOption struct {
// EditOrgOption options for editing an organization
type EditOrgOption struct {
FullName string `json:"full_name"`
Description string `json:"description" binding:"MaxSize(255)"`
Description string `json:"description" binding:"MaxSize(1024)"`
Website string `json:"website" binding:"ValidUrl;MaxSize(255)"`
Location string `json:"location" binding:"MaxSize(50)"`
LocationCoordinate string `json:"location_coordinate" binding:"MaxSize(255)"`
// possible values are `public`, `limited` or `private`
// enum: public,limited,private
Visibility string `json:"visibility" binding:"In(,public,limited,private)"`

4
modules/structs/org_team.go

@ -26,7 +26,7 @@ type Team struct {
type CreateTeamOption struct {
// required: true
Name string `json:"name" binding:"Required;AlphaDashDot;MaxSize(30)"`
Description string `json:"description" binding:"MaxSize(255)"`
Description string `json:"description" binding:"MaxSize(1024)"`
IncludesAllRepositories bool `json:"includes_all_repositories"`
// enum: read,write,admin
Permission string `json:"permission"`
@ -42,7 +42,7 @@ type CreateTeamOption struct {
type EditTeamOption struct {
// required: true
Name string `json:"name" binding:"AlphaDashDot;MaxSize(30)"`
Description *string `json:"description" binding:"MaxSize(255)"`
Description *string `json:"description" binding:"MaxSize(1024)"`
IncludesAllRepositories *bool `json:"includes_all_repositories"`
// enum: read,write,admin
Permission string `json:"permission"`

10
modules/structs/repo.go

@ -25,6 +25,8 @@ type InternalTracker struct {
AllowOnlyContributorsToTrackTime bool `json:"allow_only_contributors_to_track_time"`
// Enable dependencies for issues and pull requests (Built-in issue tracker)
EnableIssueDependencies bool `json:"enable_issue_dependencies"`
// Enable parents for issues and pull requests (Built-in issue tracker)
EnableIssueParents bool `json:"enable_issue_parents"`
}
// ExternalTracker represents settings for external tracker
@ -107,7 +109,7 @@ type CreateRepoOption struct {
// unique: true
Name string `json:"name" binding:"Required;AlphaDashDot;MaxSize(100)"`
// Description of the repository to create
Description string `json:"description" binding:"MaxSize(255)"`
Description string `json:"description" binding:"MaxSize(1024)"`
// Whether the repository is private
Private bool `json:"private"`
// Label-Set to use
@ -136,7 +138,7 @@ type EditRepoOption struct {
// unique: true
Name *string `json:"name,omitempty" binding:"OmitEmpty;AlphaDashDot;MaxSize(100);"`
// a short description of the repository.
Description *string `json:"description,omitempty" binding:"MaxSize(255)"`
Description *string `json:"description,omitempty" binding:"MaxSize(1024)"`
// a URL with more information about the repository.
Website *string `json:"website,omitempty" binding:"MaxSize(255)"`
// either `true` to make the repository private or `false` to make it public.
@ -200,7 +202,7 @@ type GenerateRepoOption struct {
// unique: true
Name string `json:"name" binding:"Required;AlphaDashDot;MaxSize(100)"`
// Description of the repository to create
Description string `json:"description" binding:"MaxSize(255)"`
Description string `json:"description" binding:"MaxSize(1024)"`
// Whether the repository is private
Private bool `json:"private"`
// include git content of default branch in template repo
@ -309,7 +311,7 @@ type MigrateRepoOptions struct {
LFS bool `json:"lfs"`
LFSEndpoint string `json:"lfs_endpoint"`
Private bool `json:"private"`
Description string `json:"description" binding:"MaxSize(255)"`
Description string `json:"description" binding:"MaxSize(1024)"`
Wiki bool `json:"wiki"`
Milestones bool `json:"milestones"`
Labels bool `json:"labels"`

6
modules/structs/user.go

@ -39,6 +39,8 @@ type User struct {
ProhibitLogin bool `json:"prohibit_login"`
// the user's location
Location string `json:"location"`
// the user's location coordinate
LocationCoordinate string `json:"location_coordinate"`
// the user's website
Website string `json:"website"`
// the user's description
@ -69,6 +71,7 @@ type UserSettings struct {
Website string `json:"website"`
Description string `json:"description"`
Location string `json:"location"`
LocationCoordinate string `json:"location_coordinate"`
Language string `json:"language"`
Theme string `json:"theme"`
DiffViewStyle string `json:"diff_view_style"`
@ -82,8 +85,9 @@ type UserSettings struct {
type UserSettingsOptions struct {
FullName *string `json:"full_name" binding:"MaxSize(100)"`
Website *string `json:"website" binding:"OmitEmpty;ValidUrl;MaxSize(255)"`
Description *string `json:"description" binding:"MaxSize(255)"`
Description *string `json:"description" binding:"MaxSize(1024)"`
Location *string `json:"location" binding:"MaxSize(50)"`
LocationCoordinate *string `json:"location_coordinate" binding:"MaxSize(255)"`
Language *string `json:"language"`
Theme *string `json:"theme"`
DiffViewStyle *string `json:"diff_view_style"`

582
options/locale/locale_ru-RU.ini

File diff suppressed because it is too large Load Diff

39
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": {
"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"
}

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

Loading…
Cancel
Save