IsRelativeWidth: Boolean;
The IsRelativeWidth property determines whether arrow pointer sizes are expressed in fractions of its length.
Use JSON or the setIsRelativeWidth method to set the property value and the getIsRelativeWidth method to get the property value.
Available values:
true. Arrow pointer sizes are expressed in fractions of its length (default).
false. Arrow pointer sizes are expressed in pixels.
To execute the example HTML page must contain the object of the PP.MapArrowBase type (see MapFilledArrow Constructor) named mapArrow. Set a value in pixels for arrow pointer:
// Set absolute values of the scale function setAbsoluteValuesForScale(mapArrow) { var scale = mapArrow.getVisual().getBasementWidthMapping().getScale(); scale.setFirst(scale.getFirst() * 100); scale.setLast(scale.getLast() * 100); scale.setNoData(scale.getNoData() * 100); } // Set arrow pointer sizes function setArrowSize(mapArrow, size) { mapArrow.setPointerLength(size.Widht); mapArrow.setPointerWidth(size.Height); } // Set arrow pointer size setArrowSize(mapArrow, { Widht: 20, Height: 40 }); // Set absolute values for the scale setAbsoluteValuesForScale(mapArrow); // Set that arrow pointer sizes are expressed in pixels mapArrow.setIsRelativeWidth(false); // Redraw the arrow mapArrow.draw();
As a result of executing the example, values for an arrow pointer are set in pixels:
See also: