All docs
V21.2
21.2
21.1
20.2
The page you are viewing does not exist in version 20.2. This link will take you to the root page.
20.1
The page you are viewing does not exist in version 20.1. This link will take you to the root page.
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

BingRouteIsochroneResult.Origin Property

Returns the coordinates of the geographical point around which the BingRouteIsochroneDataProvider calculates an isochrone.

Namespace: DevExpress.Xpf.Map

Assembly: DevExpress.Xpf.Map.v21.2.dll

Declaration

public GeoPoint Origin { get; }

Property Value

Type Description
GeoPoint

A geographical point around which an isochrone is calculated.

Remarks

The following code plots a polygon that shows the area that is accessible from the specified point. The size of the area depends on a given travel time (the time is equal to 10 minutes in the example below):

Time-based isochrone calculated based on traffic

<Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:IsochroneMap"
        xmlns:dxm="http://schemas.devexpress.com/winfx/2008/xaml/map" 
        x:Class="IsochroneMap.MainWindow"
        mc:Ignorable="d"
        Title="MainWindow" Height="450" Width="800" Loaded="Window_Loaded">
    <Grid>
        <dxm:MapControl>
            <dxm:ImageLayer>
                <dxm:BingMapDataProvider BingKey="Insert your Bing key." 
                                      Kind="RoadLight" />
            </dxm:ImageLayer>
            <dxm:InformationLayer x:Name="infoLayer">
                <dxm:BingRouteIsochroneDataProvider x:Name="isochroneProvider" 
                                                    BingKey="Insert your Bing key."
                                                    GenerateLayerItems="False"
                                                    IsochroneCalculated="OnIsochroneCalculated">
                    <dxm:BingRouteIsochroneDataProvider.IsochroneOptions>
                        <dxm:BingRouteIsochroneOptions Mode="Driving" 
                                                    TimeUnit="Minute"/>
                    </dxm:BingRouteIsochroneDataProvider.IsochroneOptions>
                </dxm:BingRouteIsochroneDataProvider>
            </dxm:InformationLayer>
        </dxm:MapControl>
    </Grid>
</Window>
using DevExpress.Xpf.Map;
using System;
using System.Windows;
using System.Windows.Media;

namespace IsochroneMap {
    public partial class MainWindow : Window {
        private void Window_Loaded(object sender, RoutedEventArgs e) {
            GeoPoint origin = new GeoPoint(42.3589935302734, -71.0586318969727);
            isochroneProvider.CalculateIsochroneByTimeWithTraffic(new RouteWaypoint("Origin", origin), 10, new DateTime(2021, 05, 05, 15, 0, 0));
        }

        private void OnIsochroneCalculated(object sender, BingRouteIsochroneCalculatedEventArgs e) {
            foreach (var polygon in e.CalculationResult.IsochroneResult.Polygons) {
                MapPolyline item = new MapPolyline();
                foreach (var points in polygon.Coordinates)
                    item.Points.Add(points);
                item.StrokeStyle = new StrokeStyle { Thickness = 2 };
                item.Stroke = Brushes.Red;

                MapPushpin pushpin = new MapPushpin { Location = e.CalculationResult.IsochroneResult.Origin, Brush = Brushes.Red };

                VectorLayer vectorLayer = new VectorLayer();
                mapControl.Layers.Add(vectorLayer);
                MapItemStorage storage = new MapItemStorage();
                vectorLayer.Data = storage;
                storage.Items.Add(item);
                storage.Items.Add(pushpin);
            }
            mapControl.ZoomToFitLayerItems();
        }
    }
}
See Also