Skip to main content
A newer version of this page is available. .

ProjectionBase.OffsetY Property

OBSOLETE

The OffsetY property is obsolete now.

Gets or sets the vertical offset for this projection.

Namespace: DevExpress.XtraMap

Assembly: DevExpress.XtraMap.v19.2.dll

Declaration

[DefaultValue(0.5)]
[Obsolete("The OffsetY property is obsolete now.")]
[PreferableMember("ProjectionBase", "OffsetY", "Double")]
[Browsable(false)]
public virtual double OffsetY { get; set; }

Property Value

Type Default Description
Double 0.5

A Double value specifying the vertical offset (in map units).

Example

This example shows how to get a Hammer-Aitoff map projection for the shapes loaded from the Shapefiles (Countries.shp, Countries.dbf).

To create a custom map projection, do the following:

using System;
using System.Windows.Forms;
using DevExpress.XtraMap;

namespace CustomProjection {
    public partial class Form1 : Form {
        const string filepath = "../../Data/Countries.shp";

        GeoMapCoordinateSystem CoordinateSystem {
            get { return (GeoMapCoordinateSystem)mapControl1.CoordinateSystem; }
        }

        VectorItemsLayer MapLayer {
            get { return (VectorItemsLayer)mapControl1.Layers["MapLayer"]; }
        }

        ShapefileDataAdapter Adapter {
            get { return (ShapefileDataAdapter)MapLayer.Data; }
        }

        public Form1() {
            InitializeComponent();
            CoordinateSystem.Projection = new HammerAitoffProjection();

            Uri baseUri = new Uri(System.Reflection.Assembly.GetEntryAssembly().Location);
            Adapter.FileUri = new Uri(baseUri, filepath);
        }
    }
}
See Also