forked from MapComplete/MapComplete
		
	Themes: add guideposts to climbing theme
This commit is contained in:
		
							parent
							
								
									da39dde7b6
								
							
						
					
					
						commit
						a96a214c03
					
				
					 7 changed files with 23 additions and 48 deletions
				
			
		|  | @ -32,18 +32,18 @@ | |||
|     "enableImproveAccuracy": "true", | ||||
|     "enableRelocation": "false" | ||||
|   }, | ||||
|   "title": {}, | ||||
|   "pointRendering": [ | ||||
|   "title": { | ||||
|     "render": { | ||||
|       "en": "Guidepost" | ||||
|     } | ||||
|   }, | ||||
|   "mapRendering": [ | ||||
|     { | ||||
|       "location": [ | ||||
|         "centroid", | ||||
|         "point" | ||||
|       ], | ||||
|       "marker": [ | ||||
|         { | ||||
|           "icon": "./assets/layers/guidepost/guidepost.svg" | ||||
|         } | ||||
|       ], | ||||
|       "icon": "./assets/layers/guidepost/guidepost.svg", | ||||
|       "anchor": "bottom" | ||||
|     } | ||||
|   ], | ||||
|  |  | |||
| Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 78 KiB | 
							
								
								
									
										2
									
								
								assets/layers/guidepost/guidepost_example.jpg.license
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								assets/layers/guidepost/guidepost_example.jpg.license
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,2 @@ | |||
| SPDX-FileCopyrightText: Mschaeuble | ||||
| SPDX-License-Identifier: CC0-1.0 | ||||
|  | @ -10,7 +10,7 @@ | |||
|     ] | ||||
|   }, | ||||
|   { | ||||
|     "path": "signpost_example.jpg", | ||||
|     "path": "guidepost_example.jpg", | ||||
|     "license": "CC0-1.0", | ||||
|     "authors": [ | ||||
|       "Mschaeuble" | ||||
|  |  | |||
|  | @ -1,2 +1,2 @@ | |||
| SPDX-FileCopyrightText: Mschaeuble | ||||
| SPDX-License-Identifier: CC0 | ||||
| SPDX-License-Identifier: CC0-1.0 | ||||
|  | @ -464,7 +464,8 @@ | |||
|     { | ||||
|       "builtin": [ | ||||
|         "toilet", | ||||
|         "drinking_water" | ||||
|         "drinking_water", | ||||
|         "guidepost" | ||||
|       ], | ||||
|       "override": { | ||||
|         "minzoom": 15 | ||||
|  |  | |||
|  | @ -4,39 +4,11 @@ export class ThemeMetaTagging { | |||
|    public static readonly themeName = "usersettings" | ||||
| 
 | ||||
|    public metaTaggging_for_usersettings(feat: {properties: Record<string, string>}) { | ||||
|         Utils.AddLazyProperty(feat.properties, "_mastodon_candidate_md", () => | ||||
|             feat.properties._description | ||||
|                 .match(/\[[^\]]*\]\((.*(mastodon|en.osm.town).*)\).*/) | ||||
|                 ?.at(1) | ||||
|         ) | ||||
|         Utils.AddLazyProperty( | ||||
|             feat.properties, | ||||
|             "_d", | ||||
|             () => feat.properties._description?.replace(/</g, "<")?.replace(/>/g, ">") ?? "" | ||||
|         ) | ||||
|         Utils.AddLazyProperty(feat.properties, "_mastodon_candidate_a", () => | ||||
|             ((feat) => { | ||||
|                 const e = document.createElement("div") | ||||
|                 e.innerHTML = feat.properties._d | ||||
|                 return Array.from(e.getElementsByTagName("a")).filter( | ||||
|                     (a) => a.href.match(/mastodon|en.osm.town/) !== null | ||||
|                 )[0]?.href | ||||
|             })(feat) | ||||
|         ) | ||||
|         Utils.AddLazyProperty(feat.properties, "_mastodon_link", () => | ||||
|             ((feat) => { | ||||
|                 const e = document.createElement("div") | ||||
|                 e.innerHTML = feat.properties._d | ||||
|                 return Array.from(e.getElementsByTagName("a")).filter( | ||||
|                     (a) => a.getAttribute("rel")?.indexOf("me") >= 0 | ||||
|                 )[0]?.href | ||||
|             })(feat) | ||||
|         ) | ||||
|         Utils.AddLazyProperty( | ||||
|             feat.properties, | ||||
|             "_mastodon_candidate", | ||||
|             () => feat.properties._mastodon_candidate_md ?? feat.properties._mastodon_candidate_a | ||||
|         ) | ||||
|         feat.properties["__current_backgroun"] = "initial_value" | ||||
|       Utils.AddLazyProperty(feat.properties, '_mastodon_candidate_md', () => feat.properties._description.match(/\[[^\]]*\]\((.*(mastodon|en.osm.town).*)\).*/)?.at(1) )  | ||||
|       Utils.AddLazyProperty(feat.properties, '_d', () => feat.properties._description?.replace(/</g,'<')?.replace(/>/g,'>') ?? '' )  | ||||
|       Utils.AddLazyProperty(feat.properties, '_mastodon_candidate_a', () => (feat => {const e = document.createElement('div');e.innerHTML = feat.properties._d;return Array.from(e.getElementsByTagName("a")).filter(a => a.href.match(/mastodon|en.osm.town/) !== null)[0]?.href   }) (feat)  )  | ||||
|       Utils.AddLazyProperty(feat.properties, '_mastodon_link', () => (feat => {const e = document.createElement('div');e.innerHTML = feat.properties._d;return Array.from(e.getElementsByTagName("a")).filter(a => a.getAttribute("rel")?.indexOf('me') >= 0)[0]?.href})(feat)  )  | ||||
|       Utils.AddLazyProperty(feat.properties, '_mastodon_candidate', () => feat.properties._mastodon_candidate_md ?? feat.properties._mastodon_candidate_a )  | ||||
|       feat.properties['__current_backgroun'] = 'initial_value' | ||||
|    } | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue