Пример #1
0
 public void GetFotos(LocationRect rect, MapLayer phtosLayer, CustomMap mp)
 {
     photosLayer = null;
     currentMap = null;
     currentMap = mp;
     photosLayer = phtosLayer;
     GetPhotosFlickr(rect);
     GetFotosPanoramico(rect);
 }
Пример #2
0
        private void RegisterMessengerMessages()
        {
            //We need the map instace because some stuff doesn't support binding and we need some map events to resize pins
            Messenger.Default.Register<CustomMap>(this, mp =>
            {
                currentMap = mp;

            });

            //The Filter views sends a query
            Messenger.Default.Register<Messages.ProximityQueryMessage>(this, "ProximityQuery", msg =>
            {
                if(VisualStateName == "PhotoState")
                VisualStateName = "DefaultState";
                makeQuery("buffer", "Proximity", "areas", msg.Locations, msg.Radius);
            });

            //The Filter views sends another query
            Messenger.Default.Register<Messages.PolyBufferQueryMessage>(this, "PolyLineQuery", msg =>
            {
                if (VisualStateName == "PhotoState")
                    VisualStateName = "DefaultState";
                makeQuery("buffer", "Buffer", "areas", msg.Locations, msg.Buffer);
            });
            Messenger.Default.Register<Messages.CountryQueryMessage>(this, msg =>
            {
                if (VisualStateName == "PhotoState")
                    VisualStateName = "DefaultState";
                makeQueryCountry("name", "Name", "areas", msg.SelectedCountry.name_iso);
            });
        }
Пример #3
0
 public override void Cleanup()
 {
     cw = null;
     this.currentMap = null;
     SelectedArea = null;
     this.Layers.Clear();
     Messenger.Default.Unregister(this);
     base.Cleanup();
 }