Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 84751

Dynamic Layer Example : "Must create DependencySource on same Thread as the DependencyObject."}

$
0
0

Hi,

I take the Dynamic Layer example and i try to replace the points by the polylines.

internalList<PolylineData> GetFeatures(
            doubleupperLeftLat,
            doubleupperLeftLong,
            doublelowerRightLat,
            doublelowerRightLong,
            GeomType storeType)
        {
            try
            {
                PolylineData polyline1 = newPolylineData()
                {
                    ShapeFill = newMapShapeFill()
                    {
                        Stroke = newSolidColorBrush(Colors.Red),
                        StrokeThickness = 2
                    }
                };
 
                LocationCollection pt = newLocationCollection
                {
                    newLocation(44.6957539183824, 23.3327663758679),
                    newLocation(44.1429369264591, 24.7498095849434),
                    newLocation(44.5131732087098, 27.4611884843576),
                    newLocation(45.2073941930888, 27.9275176988258)
                };
 
                polyline1.Points = pt;
                _listPolylineDatas.Add(polyline1);
                return_listPolylineDatas;

 

But i have an exception : {"Must create DependencySource on same Thread as the DependencyObject."}

Do you have an solution for this issue ?

 

Thank you


Viewing all articles
Browse latest Browse all 84751

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>