diff --git a/umap/static/umap/css/form.css b/umap/static/umap/css/form.css index ae1b0c57..b68441e5 100644 --- a/umap/static/umap/css/form.css +++ b/umap/static/umap/css/form.css @@ -528,6 +528,7 @@ i.info { display: inline-block; color: black; font-weight: bold; + overflow: hidden; } .umap-pictogram-choice img { vertical-align: middle; diff --git a/umap/static/umap/img/marker.svg b/umap/static/umap/img/marker.svg index eefae220..7ad2b2ca 100644 --- a/umap/static/umap/img/marker.svg +++ b/umap/static/umap/img/marker.svg @@ -1,6 +1,6 @@ - + - - + + diff --git a/umap/static/umap/js/modules/rendering/icon.js b/umap/static/umap/js/modules/rendering/icon.js index 0aaa5cb0..0f280005 100644 --- a/umap/static/umap/js/modules/rendering/icon.js +++ b/umap/static/umap/js/modules/rendering/icon.js @@ -15,6 +15,8 @@ export function getClass(name) { return Ball case 'Drop': return Drop + case 'Raw': + return Raw default: return DefaultIcon } @@ -152,6 +154,17 @@ const Circle = BaseIcon.extend({ }, }) +const Raw = DefaultIcon.extend({ + default_options: { + iconSize: new L.Point(48, 48), + popupAnchor: new L.Point(0, 0), + tooltipAnchor: new L.Point(0, 0), + className: 'umap-raw-icon', + }, + + _getColor: () => 'transparent', +}) + const Drop = DefaultIcon.extend({ default_options: { iconAnchor: new L.Point(16, 42), diff --git a/umap/static/umap/js/modules/schema.js b/umap/static/umap/js/modules/schema.js index 1deac31b..900243d8 100644 --- a/umap/static/umap/js/modules/schema.js +++ b/umap/static/umap/js/modules/schema.js @@ -214,6 +214,7 @@ export const SCHEMA = { ['Circle', translate('Circle')], ['Drop', translate('Drop')], ['Ball', translate('Ball')], + ['Raw', translate('None')], ], default: 'Default', }, diff --git a/umap/static/umap/map.css b/umap/static/umap/map.css index 64d036cd..6605fbac 100644 --- a/umap/static/umap/map.css +++ b/umap/static/umap/map.css @@ -892,7 +892,21 @@ a.umap-control-caption, .umap-edit-enabled .readonly { cursor: not-allowed; } - +.leaflet-container .umap-raw-icon img { + max-height: 48px !important; + max-width: 48px !important; +} +.umap-raw-icon { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + align-content: center; + overflow: hidden; +} +.umap-raw-icon.umap-icon-active { + box-shadow: var(--block-shadow); +} /* ********************************* */ /* Ajax loader */