GetElemsByID (ZWS)

Возвращает данные объектов слоя Zulu по заданному списку ID.

Схема запроса:

  <xs:element name="zulu-server">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="Command">
                    <xs:complexType>
                        <xs:choice>                            
                            <xs:element name="GetElemsByID" type="typeGetElemsByID"/>
                        </xs:choice>
                    </xs:complexType>
                </xs:element>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
    
    <xs:complexType name="typeSampleImage">
        <xs:all>
            <xs:element name="Width" type="xs:integer"/>
            <xs:element name="Height" type="xs:integer" minOccurs="0"/>
            <xs:element name="Transparent" type="typeFlag" minOccurs="0" default="Yes"/>
            <xs:element name="SpaceX" type="xs:integer" minOccurs="0" default="0"/>
            <xs:element name="SpaceY" type="xs:integer" minOccurs="0" default="0"/>
            <xs:element name="Angle" type="xs:double" minOccurs="0" default="0"/>
            <xs:element name="BkColor" type="xs:integer" minOccurs="0" default="16777215"/>
        </xs:all>
    </xs:complexType>
   
    
    <xs:complexType name="typeGetElemsByID">
        <xs:all>
            <xs:element name="Layer" type="typeLayer"/>
            <xs:element name="ElemID" type="typeListOfIntegers"/>
            <xs:element name="Geometry" type="typeFlag" minOccurs="0" default="No"/>
            <xs:element name="Attr" type="typeFlag" minOccurs="0" default="Yes"/>
            <xs:element name="ModeList" type="typeFlag" minOccurs="0" default="No"/>
            <xs:element name="ModeImage" type="typeSampleImage" minOccurs="0"/>
            <xs:element name="QueryList" type="typeFlag" minOccurs="0" default="No"/>
            <xs:element name="Queries">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="Query" minOccurs="0" maxOccurs="unbounded">
                            <xs:complexType>
                                <xs:all>
                                    <xs:element name="BaseID" type="xs:integer"/>
                                    <xs:element name="Name" type="xs:string"/>
                                    <xs:element name="TypeID" type="xs:integer" minOccurs="0"/>
                                </xs:all>
                            </xs:complexType>
                        </xs:element>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:all>
    </xs:complexType>
   
   

Схема ответа:

    <xs:element name="zwsResponse">  
    <xs:complexType>
        <xs:sequence>
            <xs:choice minOccurs="0">
                <xs:element name="GetElemsByID" type="typeSelectElemByXYResponse"/>
            </xs:choice>
            <xs:element name="RetVal" type="xs:integer"/>
        </xs:sequence>
    </xs:complexType>
    </xs:element>   
    
    
    <xs:complexType name="typeSelectElemByXYResponse">
        <xs:sequence>
            <xs:element name="Element" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:all>
                        <xs:element name="ElemID" type="xs:integer"/>
                        <xs:element name="TypeID" type="xs:integer"/>
                        <xs:element name="ModeNum" type="typeModeNum"/>
                        <xs:element name="Modes">
                            <xs:complexType>
                                <xs:sequence>
                                    <xs:element name="Mode" minOccurs="0" maxOccurs="unbounded">
                                        <xs:complexType>
                                            <xs:all>
                                                <xs:element name="Index" type="xs:integer"/>
                                                <xs:element name="Title" type="xs:string"/>
                                                <xs:element name="SwitchState" type="typeStateFlag"
                                                  minOccurs="0"/>
                                            </xs:all>
                                        </xs:complexType>
                                    </xs:element>
                                </xs:sequence>
                            </xs:complexType>
                        </xs:element>
                        <xs:element name="Queries">
                            <xs:complexType>
                                <xs:sequence>
                                    <xs:element name="Query" minOccurs="0" maxOccurs="unbounded">
                                        <xs:complexType>
                                            <xs:all>
                                                <xs:element name="BaseID" type="xs:integer"/>
                                                <xs:element name="Name" type="xs:string"/>
                                            </xs:all>
                                        </xs:complexType>
                                    </xs:element>
                                </xs:sequence>
                            </xs:complexType>
                        </xs:element>
                        <xs:element name="Records" type="typeRecords"/>
                        <xs:element name="Geometry" type="typeGeometry"/>
                    </xs:all>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
    </xs:complexType>
        

Пример запроса:

<?xml version="1.0" encoding="UTF-8"?> 
<zulu-server service="zws" version="1.0.0"> 
    <Command> 
        <GetElemsByID> 
        <Layer>riga:teplo</Layer> 
        <Attr>No</Attr> 
        <Geometry>Yes</Geometry> 
        <ElemID>143 145 147</ElemID> 
        </GetElemsByID> 
    </Command> 
</zulu-server>  
   

Пример ответа:

         
    <?xml version="1.0" encoding="UTF-8"?>
    <zwsResponse>
        <Element>
            <ElemID>143</ElemID>
            <TypeID>2</TypeID>
            <ModeNum>1</ModeNum>
            <Geometry>
                <Format>KML</Format>
                   <Placemark>
                      <Point>
                          <coordinates>24.0360291621298,56.9523768333450</coordinates>
                      </Point>
                  </Placemark>
           </Geometry>
        </Element>
        <Element>
            <ElemID>145</ElemID>
            <TypeID>2</TypeID>
            <ModeNum>1</ModeNum>
            <Geometry>
                <Format>KML</Format>
                 <Placemark>
                      <Point>
                          <coordinates>24.0352832245440,56.9537345512725</coordinates>
                      </Point>
                 </Placemark>
            </Geometry>
        </Element>
        <Element>
            <ElemID>147</ElemID>
            <TypeID>2</TypeID>
            <ModeNum>1</ModeNum>
            <Geometry>
                <Format>KML</Format>
                <Placemark>
                    <Point>
                        <coordinates>24.0353179530160,56.9548176887342</coordinates>
                    </Point>
                </Placemark>
            </Geometry>
        </Element>
        <RetVal>3</RetVal>
    </zwsResponse>