Issue in Map_App widget settings.

I am using the Map_App widget in an InTouch HMI application, and the map is working correctly. However, I would like to pin/mark specific locations on the map, but I am unable to find any option to add locations in the Map_App widget settings.

Can anyone confirm whether adding custom pins/markers is supported in standalone InTouch, or if this functionality is not available? If it is possible, please let me know the recommended approach.

Parents
  • Hi, 

    Would adding specific Industrial Graphic symbols be sufficient?

    Using .AddContent() you can add symbols to your map widget.

    Map_App1.AddContent(graphicInfo);

    The graphic info needs to be aware of longitude and latitude.

    Example:

    Dim graphicInfo as aaGraphic.GraphicInfo;
    graphicInfo.Identity = PinID;

    'Use the name of your symbol
    graphicInfo.GraphicName = "Pin_MapContent";
    graphicInfo.Height = 49;
    graphicInfo.Width = 26;
    graphicInfo.Latitude = GNSS_Latitude);
    graphicInfo.Longitude = GNSS_Longitude);
    graphicInfo.MinZoom = 0;
    graphicInfo.MaxZoom = 100;
    Map_App1.AddContent(graphicInfo);

    It is of course possible to bind source data to your symbol of you need this, let say to set pin color, etc.

    (then insert logic similar to this before the .AddContent, as you can see on the example below the data can then be used in the embedded symbol)
    dim Speed as Float;
    speed = GNSS_Speed_kmph;
    dim cpValues[2] as aaGraphic.CustomPropertyValuePair;
    cpValues[1] = new aaGraphic.CustomPropertyValuePair("Speed", Speed, true);
    cpValues[2] = new aaGraphic.CustomPropertyValuePair("PinID", PinID, true);
    graphicInfo.CustomProperties = cpValues;

    Does that help you forward?

    Richard

Reply
  • Hi, 

    Would adding specific Industrial Graphic symbols be sufficient?

    Using .AddContent() you can add symbols to your map widget.

    Map_App1.AddContent(graphicInfo);

    The graphic info needs to be aware of longitude and latitude.

    Example:

    Dim graphicInfo as aaGraphic.GraphicInfo;
    graphicInfo.Identity = PinID;

    'Use the name of your symbol
    graphicInfo.GraphicName = "Pin_MapContent";
    graphicInfo.Height = 49;
    graphicInfo.Width = 26;
    graphicInfo.Latitude = GNSS_Latitude);
    graphicInfo.Longitude = GNSS_Longitude);
    graphicInfo.MinZoom = 0;
    graphicInfo.MaxZoom = 100;
    Map_App1.AddContent(graphicInfo);

    It is of course possible to bind source data to your symbol of you need this, let say to set pin color, etc.

    (then insert logic similar to this before the .AddContent, as you can see on the example below the data can then be used in the embedded symbol)
    dim Speed as Float;
    speed = GNSS_Speed_kmph;
    dim cpValues[2] as aaGraphic.CustomPropertyValuePair;
    cpValues[1] = new aaGraphic.CustomPropertyValuePair("Speed", Speed, true);
    cpValues[2] = new aaGraphic.CustomPropertyValuePair("PinID", PinID, true);
    graphicInfo.CustomProperties = cpValues;

    Does that help you forward?

    Richard

Children
No Data