Skip to main content
.NET 8.0+

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

IMapsMarker Interface

Declares properties of business objects that can be displayed on a map using the Maps Module.

Namespace: DevExpress.Persistent.Base

Assembly: DevExpress.Persistent.Base.v24.2.dll

#Declaration

public interface IMapsMarker :
    IBaseMapsMarker

#Remarks

You can implement this interface in an XPO or Entity Framework business object. As a result, the WebMapsListEditor will be used to display List Views of this business object. Each object is displayed as a marker. The Marker title is displayed after clicking a marker. An object’s Detail View is displayed after clicking the Show details link below the title.

WebMapsListEditor

#XPO Example

using DevExpress.Persistent.Base;
using DevExpress.Persistent.BaseImpl;
using DevExpress.Xpo;
//...
public class Location : BaseObject, IMapsMarker {
    public Location(Session session) : base(session) { }
    //...
    private string title;
    public string Title {
        get { return title; }
        set { SetPropertyValue(nameof(Title), ref title, value); }
    }
    private double latitude;
    public double Latitude {
        get { return latitude; }
        set { SetPropertyValue(nameof(Latitude), ref latitude, value); }
    }
    private double longitude;
    public double Longitude {
        get { return longitude; }
        set { SetPropertyValue(nameof(Longitude), ref longitude, value); }
    }
}

Note

See the complete example in the Location.cs (Location.vb) file in the Main Demo that is installed in the %PUBLIC%\Documents\DevExpress Demos 24.2\Components\XAF\MainDemo folder by default.

#EF Example

using DevExpress.Persistent.Base;
using System.ComponentModel;
// ...
public class Location : IMapsMarker {
    [Browsable(false)]
    public int ID { get; private set; }
    // ...
    public string Title { get; set; }
    public double Latitude { get; set; }
    public double Longitude { get; set; }
}
See Also