Exemplo n.º 1
0
            private void EditPushpin()
            {
                VEPushpin pushpin = _mapControl.GetPushpin(_pushpinId);

                if (pushpin != null)
                {
                    MapPushpinInfo pushpinInfo = new MapPushpinInfo(pushpin.Title);
                    pushpinInfo.Notes       = pushpin.Details;
                    pushpinInfo.MoreInfoUrl = pushpin.MoreInfoUrl;
                    pushpinInfo.PhotoUrl    = pushpin.PhotoUrl;
                    MapPushpinForm pushpinForm =
                        new MapPushpinForm(_mapForm, _mapControl.PointToScreen(new Point(_event.X, _event.Y)),
                                           new MapPushpinEditedHandler(_mapPushpinEditedHandler), pushpinInfo);
                    pushpinForm.Show();
                    pushpinForm.FloatAboveOwner(_mapForm);
                }
            }
Exemplo n.º 2
0
            private void _mapPushpinAddedHandler(MapPushpinInfo pushpinInfo)
            {
                int nextPinId = 1;

                for (nextPinId = 1; _mapControl.GetPushpin(nextPinId.ToString(CultureInfo.InvariantCulture)) != null; nextPinId++)
                {
                    ;
                }

                _mapControl.AddPushpin(
                    new VEPushpin(nextPinId.ToString(CultureInfo.InvariantCulture), new VELatLong(_event.Latitude, _event.Longitude, _event.Reserved),
                                  _mapOptions.PushpinUrl, pushpinInfo.Title, pushpinInfo.Notes, pushpinInfo.MoreInfoUrl,
                                  pushpinInfo.PhotoUrl));
            }