src/shapes/Compass.js
function (screenOffset, imagePath) {

            var sOffset = screenOffset ? screenOffset
                : new Offset(WorldWind.OFFSET_FRACTION, 1, WorldWind.OFFSET_FRACTION, 1), // upper-right placement
                iPath = imagePath ? imagePath : WorldWind.configuration.baseUrl + "images/notched-compass.png";

            ScreenImage.call(this, sOffset, iPath);

            // Must set the default image offset after calling the constructor above.

            if (!screenOffset) {
                // Align the upper right corner of the image with the screen point, and give the image some padding.
                this.imageOffset = new Offset(WorldWind.OFFSET_FRACTION, 1.1, WorldWind.OFFSET_FRACTION, 1.1);
            }

            /**
             * Specifies the size of the compass as a fraction of the WorldWindow width.
             * @type {number}
             * @default 0.15
             */
            this.size = 0.15;
        }
function (screenOffset, imagePath) {

            var sOffset = screenOffset ? screenOffset
                : new Offset(WorldWind.OFFSET_FRACTION, 1, WorldWind.OFFSET_FRACTION, 1), // upper-right placement
                iPath = imagePath ? imagePath : WorldWind.configuration.baseUrl + "images/notched-compass.png";

            ScreenImage.call(this, sOffset, iPath);

            // Must set the default image offset after calling the constructor above.

            if (!screenOffset) {
                // Align the upper right corner of the image with the screen point, and give the image some padding.
                this.imageOffset = new Offset(WorldWind.OFFSET_FRACTION, 1.1, WorldWind.OFFSET_FRACTION, 1.1);
            }

            /**
             * Specifies the size of the compass as a fraction of the WorldWindow width.
             * @type {number}
             * @default 0.15
             */
            this.size = 0.15;
        }
function ( screenOffset , imagePath ) { var sOffset = screenOffset ? screenOffset : new Offset ( WorldWind . OFFSET_FRACTION , 1 , WorldWind . OFFSET_FRACTION , 1 ) , // upper-right placement iPath = imagePath ? imagePath : WorldWind . configuration . baseUrl + "images/notched-compass.png" ; ScreenImage . call ( this , sOffset , iPath ) ; // Must set the default image offset after calling the constructor above. if ( ! screenOffset ) { // Align the upper right corner of the image with the screen point, and give the image some padding. this . imageOffset = new Offset ( WorldWind . OFFSET_FRACTION , 1.1 , WorldWind . OFFSET_FRACTION , 1.1 ) ; } /**
             * Specifies the size of the compass as a fraction of the WorldWindow width.
             * @type {number}
             * @default 0.15
             */ this . size = 0.15 ; }
Constructs a compass.
@alias Compass
@constructor
@augments ScreenImage
@classdesc Displays a compass image at a specified location in the WorldWindow. The compass image rotates
and tilts to reflect the current navigator's heading and tilt.
@param {Offset} screenOffset The offset indicating the image's placement on the screen. If null or undefined
the compass is placed at the upper-right corner of the WorldWindow.
Use [the image offset property]{@link ScreenImage#imageOffset} to position the image relative to the
screen point.
@param {String} imagePath The URL of the image to display. If null or undefined, a default compass image is used.
Constructs a compass .