In DataMiner Maps we'd like to have markers to be rotated by an angle specified in element parameter, specifically an arrow marker showing the heading of a vessel.
A) Can DataMiner generate the rotated images or B) do they have to be fetched from a different source using URL arguments including the rotation angle?
According to the help on MarkerDetails, the placeholders for a MarkerImage in MarkerDetails can be generated same way as for PopupSkeleton in PopupDetails. However, the placeholders in the url attribute of MarkerImage are not filled in, while the placeholders in PopupSkeleton are filled in correctly using the same Detail tags. The Layer is using sourceType="objects". See below screenshots and xml configuration. We're using DM v10.2.0-CU11.
If this is possible, could you please review the config and provide a working example of a marker rotated by an angle specified in element parameter?
Thanks a lot.
<?xml version ="1.0"?>
<MapConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<LoadStrategy>all</LoadStrategy>
<Center latitude="40" longitude="5" />
<FilterBox visible="true"></FilterBox>
<InitialZoom>4</InitialZoom>
<MapType>dark</MapType>
<Scripts></Scripts>
<ToggleGroups></ToggleGroups>
<PolyLineOptions partial="true" />
<SpiderfiedMarkers enable="true" nearbydistance="20" circlespiralswitchover="9" legweight="1.5"/>
<Layers>
<Layer name="Saipem" sourceType="objects" refresh="10000" visible="true" allowToggle="true" autoFit="true" limitToBounds="false">
<ObjectsSourceInfo>
<Element id="ACU01"><Latitude><Parameter><ID>1100</ID></Parameter></Latitude><Longitude><Parameter><ID>1101</ID></Parameter></Longitude></Element>
</ObjectsSourceInfo>
<MarkerImages>
<MarkerImage id="arrow" url="images/icons/arrows.png?angle=[hdg]&location=[latitude]%2F[longitude]" width="29" height="29" anchor="14,14" single="false" shape="0,0,20,20" shapeType="rect"/>
</MarkerImages>
<MarkerDetails>
<Detail name="hdg" type="parameter" pid="1033" />
<Detail name="latitude" type="parameter" pid="1100" />
<Detail name="longitude" type="parameter" pid="1101" />
</MarkerDetails>
<PopupSkeleton>
<![CDATA[ <p>HDG: [hdg]</p> <p>LAT: [latitude]</p> <p>LON: [longitude]</p> ]]>
</PopupSkeleton>
<PopupDetails>
<Detail name="hdg" type="parameter" pid="1033" />
<Detail name="latitude" type="parameter" pid="1100" />
<Detail name="longitude" type="parameter" pid="1101" />
</PopupDetails>
</Layer>
</Layers>
</MapConfig>
This should indeed work. I quickly tried it but unfortunately I get the same result, it looks like this functionality is broken. It looks like it doesn't fetch the resolved details anymore when the url of an image contains placeholders. Can you create a new software issue task on Collaboration or contact tech support?
DataMiner will only generate the url. You’ll need some extra processing on the server that generates an image (could be rotating, colors, extra info) using the url parameters provided by DataMiner Maps.
can you tell if the placeholder replacement in generated URL will be fixed?
This has been fixed already, the fix is available in 10.3.7 (RN36246 – https://docs.dataminer.services/release-notes/General/General_Feature_Release_10.3/General_Feature_Release_10.3.7.html#marker-images-can-now-also-be-generated-dynamically-in-layers-with-sourcetype-set-to-objects-id_36246).
Hi Wim, thanks a lot for prompt answer, I will follow up with a task. However, for my understanding, will DataMiner only generate the url with dynamic parameters or will it also rotate the image based on the angle argument? Or should the rotation be handled by the server providing the image? Thank you.