do not draw icon and icon backdrop on "Circle" markers ( #111 )

dev-debian-12
Hartmut Holzgraefe 2024-03-23 14:39:30 +00:00
rodzic 2aeb4b81fd
commit 7f55ad3a4d
2 zmienionych plików z 7 dodań i 7 usunięć

Wyświetl plik

@ -207,10 +207,10 @@ class UmapStylesheet(Stylesheet):
marker_offsets = {
'Default': -18,
'Square': -18,
'Drop' : -18,
'Circle': 0,
'Ball' : -16
'Square' : -18,
'Drop' : -18,
'Circle' : 0,
'Ball' : -16,
}
http = urllib3.PoolManager()
@ -258,7 +258,7 @@ class UmapStylesheet(Stylesheet):
iconUrl = new_props['iconUrl']
# if icon class is one of those used by Umap:
if iconClass in ['Square', 'Drop', 'Default']:
if iconClass in ['Circle', 'Square', 'Drop', 'Default']:
# check whether one of the default UMAP icons is used
# by known URL pattern, or external
if validators.url(iconUrl):

Wyświetl plik

@ -37,12 +37,12 @@
</Rule>
<Rule>
<!-- the marker symbol if given -->
<Filter>(not ([iconUrl] = null or [iconUrl] = '')) and ([mapnik::geometry_type]=point)</Filter>
<Filter>(not ([iconClass] = 'Circle')) and (not ([iconUrl] = null or [iconUrl] = '')) and ([mapnik::geometry_type]=point)</Filter>
<MarkersSymbolizer base="root" file="[iconUrl]" allow-overlap="true" transform='translate(0,-23)' fill='[iconFill]' width='20'/>
</Rule>
<Rule>
<!-- the in-marker text instead of an icon if given -->
<Filter>(not ([iconLabel] = null or [iconLabel] = '')) and ([mapnik::geometry_type]=point)</Filter>
<Filter>(not ([iconClass] = 'Circle')) and (not ([iconLabel] = null or [iconLabel] = '')) and ([mapnik::geometry_type]=point)</Filter>
<TextSymbolizer fontset-name="my-fonts" size="10" placement="point" allow-overlap="true" dy="[offset]" fill="white" horizontal_alignment='middle' vertical_alignement='middle'>[iconLabel]</TextSymbolizer>
</Rule>
<Rule>