kopia lustrzana https://github.com/hholzgra/ocitysmap
do not draw icon and icon backdrop on "Circle" markers ( #111 )
rodzic
2aeb4b81fd
commit
7f55ad3a4d
|
@ -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):
|
||||
|
|
|
@ -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>
|
||||
|
|
Ładowanie…
Reference in New Issue