umap-project 1.10.0__py3-none-any.whl → 1.11.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of umap-project might be problematic. Click here for more details.
- umap/__init__.py +1 -1
- umap/admin.py +7 -3
- umap/autocomplete.py +3 -5
- umap/bin/__init__.py +2 -5
- umap/decorators.py +4 -5
- umap/forms.py +5 -5
- umap/locale/en/LC_MESSAGES/django.po +23 -23
- umap/locale/fr/LC_MESSAGES/django.mo +0 -0
- umap/locale/fr/LC_MESSAGES/django.po +28 -27
- umap/management/commands/generate_js_locale.py +9 -11
- umap/management/commands/import_pictograms.py +49 -28
- umap/managers.py +5 -3
- umap/middleware.py +2 -3
- umap/migrations/0001_initial.py +204 -56
- umap/migrations/0002_tilelayer_tms.py +3 -4
- umap/migrations/0003_add_tilelayer.py +13 -9
- umap/migrations/0004_add_licence.py +3 -6
- umap/migrations/0005_remove_map_tilelayer.py +3 -4
- umap/migrations/0006_auto_20190407_0719.py +6 -5
- umap/migrations/0007_auto_20190416_1757.py +13 -5
- umap/migrations/0008_alter_map_settings.py +0 -1
- umap/migrations/0009_star.py +27 -8
- umap/migrations/0010_alter_map_edit_status_alter_map_share_status.py +20 -8
- umap/migrations/0011_alter_map_edit_status_alter_map_share_status.py +21 -8
- umap/migrations/0014_map_created_at.py +1 -1
- umap/migrations/0015_alter_pictogram_pictogram.py +17 -0
- umap/migrations/0016_pictogram_category.py +17 -0
- umap/models.py +9 -7
- umap/settings/base.py +1 -4
- umap/static/umap/base.css +59 -20
- umap/static/umap/content.css +2 -13
- umap/static/umap/favicons/apple-touch-icon.png +0 -0
- umap/static/umap/favicons/favicon.ico +0 -0
- umap/static/umap/favicons/icon-192.png +0 -0
- umap/static/umap/favicons/icon-512.png +0 -0
- umap/static/umap/favicons/icon.svg +5 -0
- umap/static/umap/img/16-white.svg +20 -9
- umap/static/umap/img/24-white.svg +2 -2
- umap/static/umap/img/source/16-white.svg +25 -13
- umap/static/umap/img/source/24-white.svg +5 -5
- umap/static/umap/js/umap.controls.js +15 -23
- umap/static/umap/js/umap.core.js +33 -24
- umap/static/umap/js/umap.features.js +24 -2
- umap/static/umap/js/umap.forms.js +182 -84
- umap/static/umap/js/umap.icon.js +19 -14
- umap/static/umap/js/umap.js +14 -32
- umap/static/umap/js/umap.layer.js +13 -2
- umap/static/umap/js/umap.popup.js +21 -0
- umap/static/umap/locale/am_ET.js +9 -4
- umap/static/umap/locale/am_ET.json +9 -4
- umap/static/umap/locale/ar.js +9 -4
- umap/static/umap/locale/ar.json +9 -4
- umap/static/umap/locale/ast.js +9 -4
- umap/static/umap/locale/ast.json +9 -4
- umap/static/umap/locale/bg.js +9 -4
- umap/static/umap/locale/bg.json +9 -4
- umap/static/umap/locale/br.js +20 -15
- umap/static/umap/locale/br.json +20 -15
- umap/static/umap/locale/ca.js +9 -4
- umap/static/umap/locale/ca.json +9 -4
- umap/static/umap/locale/cs_CZ.js +9 -4
- umap/static/umap/locale/cs_CZ.json +9 -4
- umap/static/umap/locale/da.js +9 -4
- umap/static/umap/locale/da.json +9 -4
- umap/static/umap/locale/de.js +9 -4
- umap/static/umap/locale/de.json +9 -4
- umap/static/umap/locale/el.js +9 -4
- umap/static/umap/locale/el.json +9 -4
- umap/static/umap/locale/en.js +9 -4
- umap/static/umap/locale/en.json +9 -4
- umap/static/umap/locale/en_US.json +9 -4
- umap/static/umap/locale/es.js +15 -10
- umap/static/umap/locale/es.json +15 -10
- umap/static/umap/locale/et.js +9 -4
- umap/static/umap/locale/et.json +9 -4
- umap/static/umap/locale/fa_IR.js +9 -4
- umap/static/umap/locale/fa_IR.json +9 -4
- umap/static/umap/locale/fi.js +9 -4
- umap/static/umap/locale/fi.json +9 -4
- umap/static/umap/locale/fr.js +10 -5
- umap/static/umap/locale/fr.json +10 -5
- umap/static/umap/locale/gl.js +9 -4
- umap/static/umap/locale/gl.json +9 -4
- umap/static/umap/locale/he.js +9 -4
- umap/static/umap/locale/he.json +9 -4
- umap/static/umap/locale/hr.js +9 -4
- umap/static/umap/locale/hr.json +9 -4
- umap/static/umap/locale/hu.js +64 -59
- umap/static/umap/locale/hu.json +64 -59
- umap/static/umap/locale/id.js +9 -4
- umap/static/umap/locale/id.json +9 -4
- umap/static/umap/locale/is.js +9 -4
- umap/static/umap/locale/is.json +9 -4
- umap/static/umap/locale/it.js +9 -4
- umap/static/umap/locale/it.json +9 -4
- umap/static/umap/locale/ja.js +9 -4
- umap/static/umap/locale/ja.json +9 -4
- umap/static/umap/locale/ko.js +9 -4
- umap/static/umap/locale/ko.json +9 -4
- umap/static/umap/locale/lt.js +9 -4
- umap/static/umap/locale/lt.json +9 -4
- umap/static/umap/locale/ms.js +15 -10
- umap/static/umap/locale/ms.json +15 -10
- umap/static/umap/locale/nl.js +9 -4
- umap/static/umap/locale/nl.json +9 -4
- umap/static/umap/locale/no.js +9 -4
- umap/static/umap/locale/no.json +9 -4
- umap/static/umap/locale/pl.js +9 -4
- umap/static/umap/locale/pl.json +9 -4
- umap/static/umap/locale/pl_PL.json +9 -4
- umap/static/umap/locale/pt.js +9 -4
- umap/static/umap/locale/pt.json +9 -4
- umap/static/umap/locale/pt_BR.js +9 -4
- umap/static/umap/locale/pt_BR.json +9 -4
- umap/static/umap/locale/pt_PT.js +9 -4
- umap/static/umap/locale/pt_PT.json +9 -4
- umap/static/umap/locale/ro.js +9 -4
- umap/static/umap/locale/ro.json +9 -4
- umap/static/umap/locale/ru.js +9 -4
- umap/static/umap/locale/ru.json +9 -4
- umap/static/umap/locale/si.js +55 -20
- umap/static/umap/locale/si.json +55 -20
- umap/static/umap/locale/sk_SK.js +9 -4
- umap/static/umap/locale/sk_SK.json +9 -4
- umap/static/umap/locale/sl.js +9 -4
- umap/static/umap/locale/sl.json +9 -4
- umap/static/umap/locale/sr.js +9 -4
- umap/static/umap/locale/sr.json +9 -4
- umap/static/umap/locale/sv.js +9 -4
- umap/static/umap/locale/sv.json +9 -4
- umap/static/umap/locale/th_TH.js +9 -4
- umap/static/umap/locale/th_TH.json +9 -4
- umap/static/umap/locale/tr.js +9 -4
- umap/static/umap/locale/tr.json +9 -4
- umap/static/umap/locale/uk_UA.js +9 -4
- umap/static/umap/locale/uk_UA.json +9 -4
- umap/static/umap/locale/vi.js +9 -4
- umap/static/umap/locale/vi.json +9 -4
- umap/static/umap/locale/vi_VN.json +9 -4
- umap/static/umap/locale/zh.js +9 -4
- umap/static/umap/locale/zh.json +9 -4
- umap/static/umap/locale/zh_CN.json +9 -4
- umap/static/umap/locale/zh_TW.Big5.json +9 -4
- umap/static/umap/locale/zh_TW.js +9 -4
- umap/static/umap/locale/zh_TW.json +9 -4
- umap/static/umap/map.css +104 -21
- umap/static/umap/nav.css +0 -1
- umap/static/umap/test/Controls.js +0 -1
- umap/static/umap/test/Feature.js +29 -0
- umap/static/umap/test/Map.Export.js +2 -127
- umap/static/umap/test/Util.js +10 -0
- umap/static/umap/test/_pre.js +2 -3
- umap/static/umap/vendors/formbuilder/Leaflet.FormBuilder.js +13 -2
- umap/static/umap/vendors/leaflet/leaflet-src.js +7144 -7144
- umap/templates/auth/user_form.html +2 -2
- umap/templates/base.html +11 -0
- umap/templates/umap/map_table.html +3 -3
- umap/templatetags/umap_tags.py +32 -34
- umap/tests/base.py +4 -4
- umap/tests/conftest.py +3 -6
- umap/tests/fixtures/circle.svg +4 -0
- umap/tests/fixtures/star.svg +4 -0
- umap/tests/integration/test_export_map.py +5 -18
- umap/tests/integration/test_picto.py +217 -0
- umap/tests/integration/test_slideshow.py +70 -0
- umap/tests/settings.py +11 -5
- umap/tests/test_datalayer.py +7 -6
- umap/tests/test_map.py +6 -5
- umap/tests/test_map_views.py +82 -10
- umap/tests/test_tilelayer.py +17 -11
- umap/tests/test_views.py +36 -9
- umap/urls.py +27 -4
- umap/utils.py +1 -2
- umap/views.py +67 -35
- umap/wsgi.py +2 -2
- {umap_project-1.10.0.dist-info → umap_project-1.11.1.dist-info}/METADATA +11 -9
- {umap_project-1.10.0.dist-info → umap_project-1.11.1.dist-info}/RECORD +180 -170
- umap/static/favicon.ico +0 -0
- {umap_project-1.10.0.dist-info → umap_project-1.11.1.dist-info}/WHEEL +0 -0
- {umap_project-1.10.0.dist-info → umap_project-1.11.1.dist-info}/entry_points.txt +0 -0
- {umap_project-1.10.0.dist-info → umap_project-1.11.1.dist-info}/licenses/LICENSE +0 -0
umap/static/umap/map.css
CHANGED
|
@@ -445,9 +445,8 @@ ul.photon-autocomplete {
|
|
|
445
445
|
font-size: 12px;
|
|
446
446
|
border-radius: 20px;
|
|
447
447
|
color: #f8f8f8;
|
|
448
|
-
height:
|
|
449
|
-
line-height:
|
|
450
|
-
min-height: 36px;
|
|
448
|
+
height: 32px;
|
|
449
|
+
line-height: 30px;
|
|
451
450
|
padding: 0 20px;
|
|
452
451
|
}
|
|
453
452
|
.leaflet-container .leaflet-control-edit-disable:before,
|
|
@@ -466,27 +465,47 @@ ul.photon-autocomplete {
|
|
|
466
465
|
.leaflet-container .leaflet-control-edit-disable span,
|
|
467
466
|
.leaflet-container .leaflet-control-edit-save span,
|
|
468
467
|
.leaflet-container .leaflet-control-edit-cancel span {
|
|
469
|
-
margin-left:
|
|
468
|
+
margin-left: 10px;
|
|
470
469
|
}
|
|
471
470
|
.leaflet-container .leaflet-control-edit-save:before {
|
|
472
|
-
background-position: -
|
|
471
|
+
background-position: -148px -2px;
|
|
473
472
|
}
|
|
474
473
|
.leaflet-container .leaflet-control-edit-disable:before {
|
|
475
474
|
background-position: -50px -25px;
|
|
476
475
|
}
|
|
477
476
|
.leaflet-container .leaflet-control-edit-cancel,
|
|
478
477
|
.leaflet-container .leaflet-control-edit-disable {
|
|
479
|
-
border:
|
|
478
|
+
border: 0.5px solid rgba(153, 153, 153, 0.40);
|
|
479
|
+
}
|
|
480
|
+
.leaflet-container .leaflet-control-edit-cancel:hover,
|
|
481
|
+
.leaflet-container .leaflet-control-edit-disable:hover {
|
|
482
|
+
border: 0.5px solid rgba(153, 153, 153, 0.80);
|
|
483
|
+
text-decoration: none;
|
|
480
484
|
}
|
|
481
485
|
.leaflet-container .leaflet-control-edit-save {
|
|
482
486
|
opacity: 0.5;
|
|
483
487
|
cursor: not-allowed;
|
|
484
|
-
border:
|
|
485
|
-
|
|
488
|
+
border-radius: 16px;
|
|
489
|
+
border: 0.5px solid rgba(153, 153, 153, 0.40);
|
|
490
|
+
background: rgba(153, 153, 153, 0.10);
|
|
491
|
+
}
|
|
492
|
+
.dark [type="button"].leaflet-control-edit-save:hover {
|
|
493
|
+
background: rgba(153, 153, 153, 0.10);
|
|
494
|
+
text-decoration: none;
|
|
486
495
|
}
|
|
487
496
|
.umap-is-dirty .leaflet-control-edit-save {
|
|
488
497
|
opacity: 1;
|
|
489
498
|
cursor: pointer;
|
|
499
|
+
border: 0.5px solid rgba(66, 236, 230, 0.40);
|
|
500
|
+
background: rgba(66, 236, 230, 0.10);
|
|
501
|
+
color: #42ECE6;
|
|
502
|
+
}
|
|
503
|
+
.umap-is-dirty .leaflet-control-edit-save:before {
|
|
504
|
+
background-position: -148px -26px;
|
|
505
|
+
}
|
|
506
|
+
.umap-is-dirty .dark [type="button"].leaflet-control-edit-save:hover {
|
|
507
|
+
border-color: rgba(66, 236, 230, 0.80);
|
|
508
|
+
background: rgba(66, 236, 230, 0.10);
|
|
490
509
|
}
|
|
491
510
|
.leaflet-container .leaflet-control-edit-save,
|
|
492
511
|
.leaflet-container .leaflet-control-edit-cancel,
|
|
@@ -581,6 +600,13 @@ ul.photon-autocomplete {
|
|
|
581
600
|
.umap-main-edit-toolbox h3 {
|
|
582
601
|
display: inline;
|
|
583
602
|
}
|
|
603
|
+
.umap-caption-bar button {
|
|
604
|
+
margin-left: 10px;
|
|
605
|
+
}
|
|
606
|
+
.umap-caption-bar button + button:before {
|
|
607
|
+
content: '|';
|
|
608
|
+
padding-right: 10px;
|
|
609
|
+
}
|
|
584
610
|
.umap-main-edit-toolbox .umap-user {
|
|
585
611
|
color: #fff;
|
|
586
612
|
}
|
|
@@ -705,18 +731,14 @@ ul.photon-autocomplete {
|
|
|
705
731
|
padding: 5px 0;
|
|
706
732
|
border-bottom: 1px solid #202425;
|
|
707
733
|
}
|
|
708
|
-
.umap-datalayer-version
|
|
734
|
+
.umap-datalayer-version button {
|
|
709
735
|
display: inline-block;
|
|
710
|
-
width:
|
|
711
|
-
height:
|
|
712
|
-
|
|
713
|
-
background-position: -123px -75px;
|
|
736
|
+
width: 24px;
|
|
737
|
+
min-height: 24px;
|
|
738
|
+
background-position: -122px -73px;
|
|
714
739
|
background-repeat: no-repeat;
|
|
715
740
|
background-image: url('./img/16-white.svg');
|
|
716
|
-
|
|
717
|
-
margin-right: 5px;
|
|
718
|
-
border: 1px solid #202425;
|
|
719
|
-
background-color: #2c3233;
|
|
741
|
+
margin-right: 10px;
|
|
720
742
|
}
|
|
721
743
|
|
|
722
744
|
|
|
@@ -831,13 +853,13 @@ ul.photon-autocomplete {
|
|
|
831
853
|
background-position: -119px -48px;
|
|
832
854
|
}
|
|
833
855
|
.umap-delete-vertex {
|
|
834
|
-
background-position: -119px -
|
|
856
|
+
background-position: -119px -94px;
|
|
835
857
|
}
|
|
836
858
|
.umap-continue-line {
|
|
837
859
|
background-position: -96px 1px;
|
|
838
860
|
}
|
|
839
861
|
.umap-split-line {
|
|
840
|
-
background-position: -
|
|
862
|
+
background-position: -119px -22px;
|
|
841
863
|
}
|
|
842
864
|
.umap-extract-shape-from-multi{
|
|
843
865
|
background-position: -119px 2px;
|
|
@@ -1188,7 +1210,9 @@ a.add-datalayer:hover,
|
|
|
1188
1210
|
.umap-popup-footer li.next:before {
|
|
1189
1211
|
background-position: -5px -77px;
|
|
1190
1212
|
}
|
|
1191
|
-
|
|
1213
|
+
.umap-popup a:hover {
|
|
1214
|
+
text-decoration: underline;
|
|
1215
|
+
}
|
|
1192
1216
|
|
|
1193
1217
|
/* ************* */
|
|
1194
1218
|
/* Marker's Icon */
|
|
@@ -1204,6 +1228,16 @@ a.add-datalayer:hover,
|
|
|
1204
1228
|
text-align: center;
|
|
1205
1229
|
line-height: 32px;
|
|
1206
1230
|
}
|
|
1231
|
+
.umap-div-icon.umap-icon-active .icon_container {
|
|
1232
|
+
border-radius: 5px;
|
|
1233
|
+
box-shadow: 7px 10px 10px -1px black;
|
|
1234
|
+
height: 36px;
|
|
1235
|
+
line-height: 36px;
|
|
1236
|
+
margin-left: -2px;
|
|
1237
|
+
margin-top: -4px;
|
|
1238
|
+
opacity: 1.0!important;
|
|
1239
|
+
width: 36px;
|
|
1240
|
+
}
|
|
1207
1241
|
.umap-div-icon .icon_container img {
|
|
1208
1242
|
vertical-align: middle;
|
|
1209
1243
|
max-width: 24px!important; /* leaflet.css has !important, so... */
|
|
@@ -1218,7 +1252,9 @@ a.add-datalayer:hover,
|
|
|
1218
1252
|
position: relative;
|
|
1219
1253
|
width: 0;
|
|
1220
1254
|
opacity: 0.9;
|
|
1221
|
-
|
|
1255
|
+
}
|
|
1256
|
+
.umap-div-icon.umap-icon-active .icon_arrow {
|
|
1257
|
+
opacity: 1.0!important;
|
|
1222
1258
|
}
|
|
1223
1259
|
.umap-drop-icon .icon_arrow {
|
|
1224
1260
|
border-left: 10px solid transparent;
|
|
@@ -1230,6 +1266,13 @@ a.add-datalayer:hover,
|
|
|
1230
1266
|
top: -4px;
|
|
1231
1267
|
width: 0;
|
|
1232
1268
|
}
|
|
1269
|
+
.umap-drop-icon.umap-icon-active .icon_arrow {
|
|
1270
|
+
border-left-width: 12px;
|
|
1271
|
+
border-right-width: 12px;
|
|
1272
|
+
border-top-width: 18px;
|
|
1273
|
+
left: 4px;
|
|
1274
|
+
opacity: 1.0!important;
|
|
1275
|
+
}
|
|
1233
1276
|
.umap-drop-icon .icon_container {
|
|
1234
1277
|
background-color: #2470B5;
|
|
1235
1278
|
border-radius: 16px 16px 16px 16px;
|
|
@@ -1240,6 +1283,16 @@ a.add-datalayer:hover,
|
|
|
1240
1283
|
text-align: center;
|
|
1241
1284
|
width: 32px;
|
|
1242
1285
|
}
|
|
1286
|
+
.umap-drop-icon.umap-icon-active .icon_container {
|
|
1287
|
+
box-shadow: 4px 11px 10px -2px black;
|
|
1288
|
+
border-radius: 18px 18px 18px 18px;
|
|
1289
|
+
height: 36px;
|
|
1290
|
+
line-height: 36px;
|
|
1291
|
+
margin-left: -2px;
|
|
1292
|
+
margin-top: -6px;
|
|
1293
|
+
opacity: 1.0!important;
|
|
1294
|
+
width: 36px;
|
|
1295
|
+
}
|
|
1243
1296
|
.umap-drop-icon .icon_container img {
|
|
1244
1297
|
vertical-align: middle;
|
|
1245
1298
|
max-width: 24px !important;
|
|
@@ -1254,9 +1307,18 @@ a.add-datalayer:hover,
|
|
|
1254
1307
|
.umap-circle-icon {
|
|
1255
1308
|
border: 1px solid white;
|
|
1256
1309
|
border-radius: 10px 10px 10px 10px;
|
|
1310
|
+
margin-left: -6px;
|
|
1311
|
+
margin-top: -6px;
|
|
1257
1312
|
height: 12px;
|
|
1258
1313
|
width: 12px;
|
|
1259
1314
|
}
|
|
1315
|
+
.umap-circle-icon.umap-icon-active {
|
|
1316
|
+
height: 16px;
|
|
1317
|
+
margin-left: -8px;
|
|
1318
|
+
margin-top: -8px;
|
|
1319
|
+
opacity: 1.0!important;
|
|
1320
|
+
width: 16px;
|
|
1321
|
+
}
|
|
1260
1322
|
.umap-ball-icon .icon_container {
|
|
1261
1323
|
background-color: darkblue;
|
|
1262
1324
|
background: radial-gradient(circle at 6px 38% , white -4px, darkblue 8px) repeat scroll 0 0 transparent;
|
|
@@ -1267,6 +1329,15 @@ a.add-datalayer:hover,
|
|
|
1267
1329
|
text-align: center;
|
|
1268
1330
|
width: 16px;
|
|
1269
1331
|
}
|
|
1332
|
+
.umap-ball-icon.umap-icon-active .icon_container {
|
|
1333
|
+
border-radius: 10px 10px 10px 10px;
|
|
1334
|
+
box-shadow: 1px 23px 7px -1px black;
|
|
1335
|
+
margin-left: -2px;
|
|
1336
|
+
margin-top: -4px;
|
|
1337
|
+
height: 20px;
|
|
1338
|
+
opacity: 1.0!important;
|
|
1339
|
+
width: 20px;
|
|
1340
|
+
}
|
|
1270
1341
|
.umap-ball-icon .icon_arrow {
|
|
1271
1342
|
background-color: black;
|
|
1272
1343
|
height: 16px;
|
|
@@ -1276,6 +1347,10 @@ a.add-datalayer:hover,
|
|
|
1276
1347
|
top: -1px;
|
|
1277
1348
|
width: 2px;
|
|
1278
1349
|
}
|
|
1350
|
+
.umap-icon-active {
|
|
1351
|
+
z-index: 9500!important;
|
|
1352
|
+
opacity: 1.0!important;
|
|
1353
|
+
}
|
|
1279
1354
|
.umap-edit-enabled .readonly {
|
|
1280
1355
|
cursor: not-allowed;
|
|
1281
1356
|
}
|
|
@@ -1549,6 +1624,14 @@ a.add-datalayer:hover,
|
|
|
1549
1624
|
height: 36px;
|
|
1550
1625
|
line-height: 34px;
|
|
1551
1626
|
}
|
|
1627
|
+
/* Links are blue by default */
|
|
1628
|
+
.leaflet-container a {
|
|
1629
|
+
color: #0078a8;
|
|
1630
|
+
}
|
|
1631
|
+
/* But not in controls */
|
|
1632
|
+
.leaflet-bar a {
|
|
1633
|
+
color: black;
|
|
1634
|
+
}
|
|
1552
1635
|
|
|
1553
1636
|
/* ****** */
|
|
1554
1637
|
/* Mobile */
|
umap/static/umap/nav.css
CHANGED
umap/static/umap/test/Feature.js
CHANGED
|
@@ -223,6 +223,35 @@ describe('L.U.FeatureMixin', function () {
|
|
|
223
223
|
})
|
|
224
224
|
})
|
|
225
225
|
|
|
226
|
+
describe('#highlight()', function () {
|
|
227
|
+
it('should highlight marker on click', function () {
|
|
228
|
+
assert.notOk(qs('.umap-icon-active'))
|
|
229
|
+
happen.click(qs('div.leaflet-marker-icon'))
|
|
230
|
+
assert.ok(qs('.umap-icon-active'))
|
|
231
|
+
happen.click(qs('#map')) // Close popup
|
|
232
|
+
assert.notOk(qs('.umap-icon-active'))
|
|
233
|
+
})
|
|
234
|
+
|
|
235
|
+
it('should still highlight marker after hide() and show()', function () {
|
|
236
|
+
this.datalayer.hide()
|
|
237
|
+
this.datalayer.show()
|
|
238
|
+
happen.click(qs('div.leaflet-marker-icon'))
|
|
239
|
+
assert.ok(qs('.umap-icon-active'))
|
|
240
|
+
})
|
|
241
|
+
|
|
242
|
+
it('should highlight path', function () {
|
|
243
|
+
happen.click(qs('path[stroke-opacity="0.6"]'))
|
|
244
|
+
var path = qs('path[stroke-opacity="1"]')
|
|
245
|
+
assert.ok(path)
|
|
246
|
+
})
|
|
247
|
+
|
|
248
|
+
it('should highlight polygon', function () {
|
|
249
|
+
var path = qs('path[fill="DarkBlue"]')
|
|
250
|
+
happen.click(path)
|
|
251
|
+
assert.isAbove(path.attributes['fill-opacity'].value, 0.5)
|
|
252
|
+
})
|
|
253
|
+
})
|
|
254
|
+
|
|
226
255
|
describe('#tooltip', function () {
|
|
227
256
|
it('should have a tooltip when active and allow variables', function () {
|
|
228
257
|
this.map.options.showLabel = true
|
|
@@ -64,6 +64,7 @@ describe('L.U.Map.Export', function () {
|
|
|
64
64
|
properties: {
|
|
65
65
|
_umap_options: {
|
|
66
66
|
fill: false,
|
|
67
|
+
opacity: 0.6,
|
|
67
68
|
},
|
|
68
69
|
name: 'test',
|
|
69
70
|
},
|
|
@@ -93,7 +94,7 @@ describe('L.U.Map.Export', function () {
|
|
|
93
94
|
assert.equal(content, expected)
|
|
94
95
|
})
|
|
95
96
|
|
|
96
|
-
it('should export to
|
|
97
|
+
it('should export to kml', function () {
|
|
97
98
|
const { content, filetype, filename } = this.map.format('kml')
|
|
98
99
|
assert.equal(filetype, 'application/vnd.google-earth.kml+xml')
|
|
99
100
|
assert.equal(filename, 'name_of_the_map.kml')
|
|
@@ -101,131 +102,5 @@ describe('L.U.Map.Export', function () {
|
|
|
101
102
|
'<?xml version="1.0" encoding="UTF-8"?><kml xmlns="http://www.opengis.net/kml/2.2"><Document><Placemark><name>name poly</name><ExtendedData><Data name="name"><value>name poly</value></Data></ExtendedData><Polygon><outerBoundaryIs><LinearRing><coordinates>11.25,53.585984 10.151367,52.975108 12.689209,52.167194 14.084473,53.199452 12.634277,53.618579 11.25,53.585984 11.25,53.585984</coordinates></LinearRing></outerBoundaryIs></Polygon></Placemark><Placemark><name>test</name><ExtendedData><Data name="_umap_options"><value>[object Object]</value></Data><Data name="name"><value>test</value></Data></ExtendedData><Point><coordinates>-0.274658,52.57635</coordinates></Point></Placemark><Placemark><name>test</name><ExtendedData><Data name="_umap_options"><value>[object Object]</value></Data><Data name="name"><value>test</value></Data></ExtendedData><LineString><coordinates>-0.571289,54.476422 0.439453,54.610255 1.724854,53.448807 4.163818,53.988395 5.306396,53.533778 6.591797,53.709714 7.042236,53.350551</coordinates></LineString></Placemark></Document></kml>'
|
|
102
103
|
assert.equal(content, expected)
|
|
103
104
|
})
|
|
104
|
-
|
|
105
|
-
it('should export to umap', function () {
|
|
106
|
-
const { content, filetype, filename } = this.map.format('umap')
|
|
107
|
-
assert.equal(filetype, 'application/json')
|
|
108
|
-
assert.equal(filename, 'name_of_the_map.umap')
|
|
109
|
-
const expected = {
|
|
110
|
-
type: 'umap',
|
|
111
|
-
uri: null,
|
|
112
|
-
properties: {
|
|
113
|
-
easing: false,
|
|
114
|
-
embedControl: true,
|
|
115
|
-
fullscreenControl: true,
|
|
116
|
-
searchControl: true,
|
|
117
|
-
datalayersControl: true,
|
|
118
|
-
zoomControl: true,
|
|
119
|
-
permanentCreditBackground: true,
|
|
120
|
-
slideshow: {},
|
|
121
|
-
captionMenus: true,
|
|
122
|
-
captionBar: false,
|
|
123
|
-
limitBounds: {},
|
|
124
|
-
overlay: null,
|
|
125
|
-
tilelayer: {
|
|
126
|
-
attribution: 'HOT and friends',
|
|
127
|
-
name: 'HOT OSM-fr server',
|
|
128
|
-
url_template: 'http://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png',
|
|
129
|
-
rank: 99,
|
|
130
|
-
minZoom: 0,
|
|
131
|
-
maxZoom: 20,
|
|
132
|
-
id: 2,
|
|
133
|
-
},
|
|
134
|
-
licence: '',
|
|
135
|
-
description: 'The description of the map',
|
|
136
|
-
name: 'name of the map',
|
|
137
|
-
displayPopupFooter: false,
|
|
138
|
-
miniMap: false,
|
|
139
|
-
moreControl: true,
|
|
140
|
-
scaleControl: true,
|
|
141
|
-
scrollWheelZoom: true,
|
|
142
|
-
zoom: 6,
|
|
143
|
-
},
|
|
144
|
-
geometry: {
|
|
145
|
-
type: 'Point',
|
|
146
|
-
coordinates: [5.0592041015625, 52.05924589011585],
|
|
147
|
-
},
|
|
148
|
-
layers: [
|
|
149
|
-
{
|
|
150
|
-
type: 'FeatureCollection',
|
|
151
|
-
features: [
|
|
152
|
-
{
|
|
153
|
-
type: 'Feature',
|
|
154
|
-
properties: {
|
|
155
|
-
name: 'name poly',
|
|
156
|
-
},
|
|
157
|
-
geometry: {
|
|
158
|
-
type: 'Polygon',
|
|
159
|
-
coordinates: [
|
|
160
|
-
[
|
|
161
|
-
[11.25, 53.585984],
|
|
162
|
-
[10.151367, 52.975108],
|
|
163
|
-
[12.689209, 52.167194],
|
|
164
|
-
[14.084473, 53.199452],
|
|
165
|
-
[12.634277, 53.618579],
|
|
166
|
-
[11.25, 53.585984],
|
|
167
|
-
[11.25, 53.585984],
|
|
168
|
-
],
|
|
169
|
-
],
|
|
170
|
-
},
|
|
171
|
-
},
|
|
172
|
-
{
|
|
173
|
-
type: 'Feature',
|
|
174
|
-
properties: {
|
|
175
|
-
_umap_options: {
|
|
176
|
-
color: 'OliveDrab',
|
|
177
|
-
},
|
|
178
|
-
name: 'test',
|
|
179
|
-
},
|
|
180
|
-
geometry: {
|
|
181
|
-
type: 'Point',
|
|
182
|
-
coordinates: [-0.274658, 52.57635],
|
|
183
|
-
},
|
|
184
|
-
},
|
|
185
|
-
{
|
|
186
|
-
type: 'Feature',
|
|
187
|
-
properties: {
|
|
188
|
-
_umap_options: {
|
|
189
|
-
fill: false,
|
|
190
|
-
},
|
|
191
|
-
name: 'test',
|
|
192
|
-
},
|
|
193
|
-
geometry: {
|
|
194
|
-
type: 'LineString',
|
|
195
|
-
coordinates: [
|
|
196
|
-
[-0.571289, 54.476422],
|
|
197
|
-
[0.439453, 54.610255],
|
|
198
|
-
[1.724854, 53.448807],
|
|
199
|
-
[4.163818, 53.988395],
|
|
200
|
-
[5.306396, 53.533778],
|
|
201
|
-
[6.591797, 53.709714],
|
|
202
|
-
[7.042236, 53.350551],
|
|
203
|
-
],
|
|
204
|
-
},
|
|
205
|
-
},
|
|
206
|
-
],
|
|
207
|
-
_umap_options: {
|
|
208
|
-
displayOnLoad: true,
|
|
209
|
-
browsable: true,
|
|
210
|
-
editMode: 'advanced',
|
|
211
|
-
iconClass: 'Default',
|
|
212
|
-
name: 'Elephants',
|
|
213
|
-
id: 62,
|
|
214
|
-
pictogram_url: null,
|
|
215
|
-
opacity: null,
|
|
216
|
-
weight: null,
|
|
217
|
-
fillColor: '',
|
|
218
|
-
color: '',
|
|
219
|
-
stroke: true,
|
|
220
|
-
smoothFactor: null,
|
|
221
|
-
dashArray: '',
|
|
222
|
-
fillOpacity: null,
|
|
223
|
-
fill: true,
|
|
224
|
-
},
|
|
225
|
-
},
|
|
226
|
-
],
|
|
227
|
-
}
|
|
228
|
-
assert.deepEqual(JSON.parse(content), expected)
|
|
229
|
-
})
|
|
230
105
|
})
|
|
231
106
|
})
|
umap/static/umap/test/Util.js
CHANGED
|
@@ -475,6 +475,16 @@ describe('L.Util', function () {
|
|
|
475
475
|
})
|
|
476
476
|
})
|
|
477
477
|
|
|
478
|
+
describe("#normalize()", function () {
|
|
479
|
+
|
|
480
|
+
if('should remove accents', function () {
|
|
481
|
+
// French é
|
|
482
|
+
assert.equal(L.Util.normalize('aéroport'), 'aeroport')
|
|
483
|
+
// American é
|
|
484
|
+
assert.equal(L.Util.normalize('aéroport'), 'aeroport')
|
|
485
|
+
})
|
|
486
|
+
})
|
|
487
|
+
|
|
478
488
|
describe("#sortFeatures()", function () {
|
|
479
489
|
let feat1, feat2, feat3
|
|
480
490
|
before(function () {
|
umap/static/umap/test/_pre.js
CHANGED
|
@@ -92,14 +92,12 @@ var defaultDatalayerData = function (custom) {
|
|
|
92
92
|
displayOnLoad: true,
|
|
93
93
|
id: 62,
|
|
94
94
|
pictogram_url: null,
|
|
95
|
-
opacity: null,
|
|
96
95
|
weight: null,
|
|
97
96
|
fillColor: '',
|
|
98
97
|
color: '',
|
|
99
98
|
stroke: true,
|
|
100
99
|
smoothFactor: null,
|
|
101
100
|
dashArray: '',
|
|
102
|
-
fillOpacity: null,
|
|
103
101
|
fill: true,
|
|
104
102
|
}
|
|
105
103
|
return L.extend({}, _default, custom)
|
|
@@ -132,6 +130,7 @@ function initMap(options) {
|
|
|
132
130
|
datalayer_version: '/datalayer/{pk}/{name}',
|
|
133
131
|
pictogram_list_json: '/pictogram/json/',
|
|
134
132
|
map_update_permissions: '/map/{map_id}/update/permissions/',
|
|
133
|
+
map_download: '/map/{map_id}/download/',
|
|
135
134
|
},
|
|
136
135
|
default_iconUrl: '../src/img/marker.png',
|
|
137
136
|
zoom: 6,
|
|
@@ -254,7 +253,7 @@ var RESPONSES = {
|
|
|
254
253
|
},
|
|
255
254
|
type: 'Feature',
|
|
256
255
|
id: 20,
|
|
257
|
-
properties: { _umap_options: { fill: false }, name: 'test' },
|
|
256
|
+
properties: { _umap_options: { fill: false, opacity: 0.6 }, name: 'test' },
|
|
258
257
|
},
|
|
259
258
|
{
|
|
260
259
|
geometry: {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
L.FormBuilder = L.Evented.extend({
|
|
3
2
|
|
|
4
3
|
options: {
|
|
@@ -125,12 +124,14 @@ L.FormBuilder = L.Evented.extend({
|
|
|
125
124
|
|
|
126
125
|
L.FormBuilder.Element = L.Evented.extend({
|
|
127
126
|
|
|
127
|
+
options: {},
|
|
128
|
+
|
|
128
129
|
initialize: function (builder, field, options) {
|
|
129
130
|
this.builder = builder;
|
|
130
131
|
this.obj = this.builder.obj;
|
|
131
132
|
this.form = this.builder.form;
|
|
132
133
|
this.field = field;
|
|
133
|
-
this
|
|
134
|
+
L.setOptions(this, options);
|
|
134
135
|
this.fieldEls = this.field.split('.');
|
|
135
136
|
this.name = this.builder.getName(field);
|
|
136
137
|
this.parentNode = this.getParentNode();
|
|
@@ -341,10 +342,20 @@ L.FormBuilder.FloatMixin = {
|
|
|
341
342
|
};
|
|
342
343
|
|
|
343
344
|
L.FormBuilder.FloatInput = L.FormBuilder.Input.extend({
|
|
345
|
+
|
|
346
|
+
options: {
|
|
347
|
+
step: 'any'
|
|
348
|
+
},
|
|
349
|
+
|
|
344
350
|
includes: [L.FormBuilder.FloatMixin]
|
|
345
351
|
});
|
|
346
352
|
|
|
347
353
|
L.FormBuilder.BlurFloatInput = L.FormBuilder.BlurInput.extend({
|
|
354
|
+
|
|
355
|
+
options: {
|
|
356
|
+
step: 'any'
|
|
357
|
+
},
|
|
358
|
+
|
|
348
359
|
includes: [L.FormBuilder.FloatMixin]
|
|
349
360
|
});
|
|
350
361
|
|