2D Map

Top  Previous  Next

The 2D map Viewpoint type allows users to configure an output window displaying the desired objects on an equidistant-cylindrical map of the desired celestial body. A Map command can be used to create a 2D map view, or a ViewWindow object with a 2D map Viewpoint can be used. The following is a list of the configurable options for a 2D map Viewpoint.


Reference Frame

Mapped Body

Map width and height

Map center point - either latitude/longitude coordinates, or the subsatellite point of a specified Spacecraft object

Display settings for the latitude/longitude grid


Sample 2D Map in FreeFlyer

Sample 2D Map in FreeFlyer


The script example below shows how to create a custom 2D Map Viewpoint centered on 70 degrees West, 35 degrees North on the Earth's surface, and add it to a ViewWindow. We are also showing how to turn on latitude and longitude grid lines, set the label locations, and adjust the label font.


// Create Map Viewpoint

Viewpoint MapViewpoint;

MapViewpoint.ViewpointType           = "map";

MapViewpoint.ViewpointName           = "Map View";

MapViewpoint.MapView.ReferenceFrame  = "body fixed";

MapViewpoint.MapView.Body            = Moon.ObjectId;

MapViewpoint.MapView.CenterLongitude = 230;

MapViewpoint.MapView.CenterLatitude  = 5;

MapViewpoint.MapView.Width           = 300;

MapViewpoint.MapView.Height          = 90;


MapViewpoint.MapView.ShowLatitudeLongitudeGrid   = 1; // Turns Lat/Long grid on

MapViewpoint.MapView.LatitudeGridLabelLocation   = 2; // Sets Latitude grid on right

MapViewpoint.MapView.LongitudeGridLabelLocation  = 3; // Sets Longitude grid on bottom and top

MapViewpoint.MapView.LatitudeGridLabelFont.Bold  = 1; // Configure Latitude grid font

MapViewpoint.MapView.LongitudeGridLabelFont.Bold = 1; // Configure Longitude grid font


// Add Viewpoint to a ViewWindow and activate it

ViewWindow ViewWindow1({Spacecraft1});



Update ViewWindow1;



See Also


View Output Properties


Map Command

MapViewpointOptions Properties and Methods