Exemplo n.º 1
0
        internal void RemoveEvents(UnifiedMap map)
        {
            MessagingCenter.Unsubscribe <UnifiedMap, Tuple <MapRegion, bool> >(this, map.GetMoveToRegionMessage());
            MessagingCenter.Unsubscribe <UnifiedMap, bool>(this, map.GetMoveToUserLocationMessage());

            RemovePinEvents();
            RemoveOverlayEvents();
        }
Exemplo n.º 2
0
        internal void RegisterEvents(UnifiedMap map)
        {
            RegisterPinEvents(map);
            RegisterOverlayEvents(map);

            MessagingCenter.Subscribe <UnifiedMap, Tuple <MapRegion, bool> >(this, map.GetMoveToRegionMessage(),
                                                                             (unifiedMap, span) => MoveToRegion(span.Item1, span.Item2));

            MessagingCenter.Subscribe <UnifiedMap, bool>(this, map.GetMoveToUserLocationMessage(),
                                                         (unifiedMap, animated) => MoveToUserLocation(animated));
        }