Polyline
Inheritance: BindableObject
Exemplo n.º 1
0
 private void UnbindPolyline(MapPolyline polyline)
 {
     polyline.PropertyChanged -= polyline_PropertyChanged;
     polyline.PositionChanged -= polyline_PositionChanged;
 }
Exemplo n.º 2
0
 private void RemovePolylineFromMap(MapPolyline polyline)
 {
     if (_polylines.ContainsKey(polyline))
     {
         var line = _polylines[polyline];
         // remove the old polyline from the map
         line.RemoveFromMap();
         line.Dispose();
     }
 }
Exemplo n.º 3
0
        private void RemovePolyline(MapPolyline polyline)
        {
            if (_polylines.ContainsKey(polyline) == false)
                return;

            RemovePolylineFromMap(polyline);
            _polylines.Remove(polyline);
        }
Exemplo n.º 4
0
 private PolylineOptions CreatePolylineOptions(MapPolyline polyline)
 {
     var op = new PolylineOptions();
     op.InvokeColor(polyline.Color.ToAndroid().ToArgb());
     op.InvokeWidth((float)polyline.Width);
     op.InvokeZIndex(polyline.ZIndex);
     return op;
 }
Exemplo n.º 5
0
 private void AddPolyline(MapPolyline polyline)
 {
     // add the new one
     using (var op = CreatePolylineOptions(polyline))
     {
         foreach (var pt in polyline.Positions)
         {
             op.Add(pt);
         }
         // add the last polyline segment
         var line = PolylineAdv.Add(NativeMap, op);
         _polylines.Add(polyline, line);
     }
 }
Exemplo n.º 6
0
 private void UnbindPolyline(MapPolyline polyline)
 {
     polyline.PropertyChanged -= polyline_PropertyChanged;
     polyline.PositionChanged -= polyline_PositionChanged;
 }