コード例 #1
0
        void DefaultPins_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
        {
            switch (e.Action)
            {
            case NotifyCollectionChangedAction.Add:
                foreach (DefaultPin pin in e.NewItems)
                {
                    nMap.AddMarker(new MarkerOptions().SetPosition(pin.Position.toNativeLatLng()).SetTitle(pin.Title));
                }
                break;

            case NotifyCollectionChangedAction.Remove:
                //nMap.RemoveMarker();
                break;

            case NotifyCollectionChangedAction.Reset:
                nMap.Markers.All((arg) => { nMap.RemoveMarker(arg); return(true); });
                break;
            }
        }