forked from MapComplete/MapComplete
		
	Various small bug fixes
This commit is contained in:
		
						commit
						5ac035be20
					
				
					 5 changed files with 31 additions and 18 deletions
				
			
		|  | @ -279,6 +279,7 @@ export default class SimpleMetaTagger { | ||||||
|                             return true; // Our job is done, lets unregister!
 |                             return true; // Our job is done, lets unregister!
 | ||||||
|                         } catch (e) { |                         } catch (e) { | ||||||
|                             console.warn("Error while parsing opening hours of ", tags.id, e); |                             console.warn("Error while parsing opening hours of ", tags.id, e); | ||||||
|  |                             delete tags._isOpen | ||||||
|                             tags["_isOpen"] = "parse_error"; |                             tags["_isOpen"] = "parse_error"; | ||||||
|                         } |                         } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -559,9 +559,15 @@ export default class LayerConfig { | ||||||
|                 } |                 } | ||||||
|                 if (iconOverlay.badge) { |                 if (iconOverlay.badge) { | ||||||
|                     const badgeParts: BaseUIElement[] = []; |                     const badgeParts: BaseUIElement[] = []; | ||||||
|                     const partDefs = iconOverlay.then |                     const renderValue = iconOverlay | ||||||
|  |                         .then | ||||||
|                         .GetRenderValue(tgs) |                         .GetRenderValue(tgs) | ||||||
|                         .txt.split(";") |                       | ||||||
|  |                     if(renderValue === undefined){ | ||||||
|  |                         continue; | ||||||
|  |                     } | ||||||
|  |                      | ||||||
|  |                     const partDefs = renderValue.txt.split(";") | ||||||
|                         .filter((prt) => prt != ""); |                         .filter((prt) => prt != ""); | ||||||
| 
 | 
 | ||||||
|                     for (const badgePartStr of partDefs) { |                     for (const badgePartStr of partDefs) { | ||||||
|  |  | ||||||
|  | @ -140,6 +140,12 @@ export default class DefaultGUI { | ||||||
|             enablePopups: false, |             enablePopups: false, | ||||||
|         }) |         }) | ||||||
|          |          | ||||||
|  |         state.leafletMap.addCallbackAndRunD(_ => { | ||||||
|  |             // Lets assume that all showDataLayers are initialized at this point
 | ||||||
|  |             state.selectedElement.ping() | ||||||
|  |             return true; | ||||||
|  |         }) | ||||||
|  | 
 | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     private InitWelcomeMessage() { |     private InitWelcomeMessage() { | ||||||
|  |  | ||||||
|  | @ -146,7 +146,7 @@ export default class ShowDataLayer { | ||||||
|             try { |             try { | ||||||
|                 this.geoLayer.addData(feat); |                 this.geoLayer.addData(feat); | ||||||
|             } catch (e) { |             } catch (e) { | ||||||
|                 console.error("Could not add ", feat, "to the geojson layer in leaflet") |                 console.error("Could not add ", feat, "to the geojson layer in leaflet due to", e, e.stack) | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue