public Color GetColor() { if (tags.ContainsKey("3dmapsrgb")) { return(ColorHandler.ParseColor(tags["3dmapsrgb"])); } else if (tags.ContainsKey("zmeucolor")) { return(ColorHandler.SelectColor(tags["zmeucolor"])); } else if (IsArea()) { return(ColorHandler.SelectAreaColor(tags["landuse"])); } else { return(Color.white); } }
public void GenerateLabelLine(DisplayNode poiNode) { GameObject labelLine = new GameObject(); LineRenderer lineRenderer = labelLine.AddComponent <LineRenderer>(); lineRenderer.positionCount = 2; Vector3[] endpoints = new Vector3[] { PositionService.GetUnityPosition(poiNode, heightAdjustment, mapData), PositionService.GetUnityPosition(poiNode, 0, mapData) }; lineRenderer.SetPositions(endpoints); lineRenderer.widthMultiplier = this.lineWidthMultiplier; lineRenderer.useWorldSpace = false; labelLine.transform.SetParent(this.transform); Material[] materials = new Material[] { new Material(Shader.Find("Unlit/Color")) }; labelLine.GetComponent <Renderer>().sharedMaterials = materials; labelLine.GetComponent <Renderer>().sharedMaterial.color = ColorHandler.SelectColor("poiLine"); }