Map location icon

Forum Home Forums Understanding the Software Map location icon

Tagged: 

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #16958
    oley
    Participant

    Hi,

    I do not understand how to set custom icons for the map plugin locations.
    I have my custom icon(s) in c:\Program Files\SCADA\ScadaWeb\wwwroot\plugins\Map\images\
    pv-icon-error.png
    pv-icon-normal.png
    pv-icon-unbound.png
    pv-icon-undefined.png

    In my view I have:

    <Location>
    <Name>Test</Name>
    <Descr></Descr>
    <Icon>pv-icon-{status}</Icon>
    <Lat>54.4213</Lat>
    <Lon>21.174</Lon>
    <StatusCnlNum>0</StatusCnlNum>
    <Links>
    <Link viewID=”281″ />
    </Links>
    </Location>

    I tried different name schemes in Icon tag (with and without extension), but the map shows only standard markers.

    Best regards

    #16961
    Mikhail
    Moderator

    Hi,
    Custom icons are configured in PlgMap.xml. Then they can be used in map views. Use the existing Site icon as an example.

    #16963
    oley
    Participant

    Hi,

    thank you, it works like a charm, but…
    Every upload of the configuration rewrite my PlgMap.xml file.
    What to do to prevent this?

    #16980
    Mikhail
    Moderator

    Hi,
    PlgMap.xml must be located in the project as a part of it.

    #16987
    oley
    Participant

    Hi,

    of course. Now it works fine. Thanks.

    #17004
    oley
    Participant

    Hi,

    I have some other questions according the state.
    In the documentation I read:

    Icons of the Classic type icons are based on an image file. The file name has a suffix corresponding to the object status: undefined, normal, error, and unbound (the status is not bound to a channel).

    Than later:

    StatusCnlNum – the number of the input channel that shows the object status. Equals 0 if the channel is not specified. Valid channel data: channel status equal to 0 means that the object status is not defined, channel value equal to 0 means the object is normal, channel value equal to 1 means the object is in an error state;

    So I have to define a channel to visualize the status?
    When the unbound icon is displayed?

    #17009
    Mikhail
    Moderator

    Hi,
    You can see it in Live Demo.
    Blue marker is unbound, while green (or red) marker is bound to a channel.
    Yes, a channel is needed to define marker status.

    #17010
    Mikhail
    Moderator

    For example,

        <Location>
          <Name>Eiffel Tower</Name>
          <Descr>Avenue Anatole France, Paris, France</Descr>
          <Icon></Icon>
          <Lat>48.858222</Lat>
          <Lon>2.2945</Lon>
          <StatusCnlNum>104</StatusCnlNum>
          <DataItems>
            <DataItem cnlNum="101" />
            <DataItem cnlNum="105">My text</DataItem>
          </DataItems>
          <Links>
            <Link viewID="2" />
            <Link viewID="2">My link</Link>
          </Links>
        </Location>
    
    #17087
    oley
    Participant

    Hi,

    I can not set the undefined icon.
    Status channel equals 1 (and every positive) shows error icon, 0 and -1 (or any negative) shows normal.

    #17095
    Mikhail
    Moderator

    Hi,
    From the manual: Valid channel data: channel status equal to 0 means that the object status is not defined, channel value equal to 0 means the object is normal, channel value equal to 1 means the object is in an error state

    So you need to set the channel status to undefined (0).

    #17096
    Mikhail
    Moderator

    Channel data contains value and status.

    #17101
    oley
    Participant

    Hi, got it! Thanks!

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.