コード例 #1
0
 public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
 {
     var issue = (DataService.IssueItem)value;
     var bl = Newtonsoft.Json.JsonConvert.DeserializeObject<IssueGeom>(issue.WKT);
     var p = new Pushpin() {  };
     p.SetValue(MapControl.Map.LocationProperty, new Location(bl.coordinates.Last(), bl.coordinates.First()));
     p.DataContext = issue;
     return p;
 }
コード例 #2
0
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            var issue = (CommonLib.AwesomeService.IssueItem)value;
            var context = new IssueGeom {
                type = issue.Geom.Type,
                coordinates = Newtonsoft.Json.JsonConvert.DeserializeObject<List<double>>(issue.Geom.Coordinates)
            };

              //  var bl = Newtonsoft.Json.JsonConvert.DeserializeObject<IssueGeom>(issue.Geom);
            var p = new Pushpin() { };
            p.SetValue(MapControl.Map.LocationProperty, new Location(context.coordinates.Last(), context.coordinates.First()));
            p.DataContext = issue;
            return p;
        }