public OnlineMapsOSMRelation(OnlineMapsOSMAPIQuery.OSMXMLNode node)
    {
        id       = node.GetAttribute("id");
        _members = new List <OnlineMapsOSMRelationMember>(16);
        tags     = new List <OnlineMapsOSMTag>(4);

        foreach (OnlineMapsOSMAPIQuery.OSMXMLNode subNode in node.childs)
        {
            if (subNode.name == "member")
            {
                _members.Add(new OnlineMapsOSMRelationMember(subNode));
            }
            else if (subNode.name == "tag")
            {
                tags.Add(new OnlineMapsOSMTag(subNode));
            }
        }
    }
    public OnlineMapsOSMWay(OnlineMapsOSMAPIQuery.OSMXMLNode node)
    {
        id = node.GetAttribute("id");

        int countNd   = 0;
        int countTags = 0;

        for (int i = 0; i < node.childs.Count; i++)
        {
            OnlineMapsOSMAPIQuery.OSMXMLNode subNode = node.childs[i];
            if (subNode.name == "nd")
            {
                countNd++;
            }
            else if (subNode.name == "tag")
            {
                countTags++;
            }
        }

        _nodeRefs = new List <string>(countNd);
        tags      = new List <OnlineMapsOSMTag>(countTags);

        for (int i = 0; i < node.childs.Count; i++)
        {
            OnlineMapsOSMAPIQuery.OSMXMLNode subNode = node.childs[i];
            if (subNode.name == "nd")
            {
                _nodeRefs.Add(subNode.GetAttribute("ref"));
            }
            else if (subNode.name == "tag")
            {
                tags.Add(new OnlineMapsOSMTag(subNode));
            }
        }
    }
 public OnlineMapsOSMNode(OnlineMapsOSMAPIQuery.OSMXMLNode node)
 {
     id  = node.GetAttribute("id");
     lat = (float)CreateDouble(node.GetAttribute("lat"));
     lon = (float)CreateDouble(node.GetAttribute("lon"));
 }
 public OnlineMapsOSMArea(OnlineMapsOSMAPIQuery.OSMXMLNode node)
 {
     id = node.GetAttribute("id");
 }
 public OnlineMapsOSMTag(OnlineMapsOSMAPIQuery.OSMXMLNode node)
 {
     key   = node.GetAttribute("k");
     value = node.GetAttribute("v");
 }
 public OnlineMapsOSMRelationMember(OnlineMapsOSMAPIQuery.OSMXMLNode node)
 {
     type      = node.GetAttribute("type");
     reference = node.GetAttribute("ref");
     role      = node.GetAttribute("role");
 }