Exemple #1
0
 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);
     }
 }
Exemple #2
0
    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");
    }