Beispiel #1
0
 private void HookLatLongControl(LatLongInput ctl)
 {
     HookTextBox(ctl.txtDegrees);
     HookTextBox(ctl.txtMinutes);
     HookTextBox(ctl.txtSeconds);
 }
Beispiel #2
0
 private void GeoCode(LatLongInput ctlLat, LatLongInput ctlLon, bool acceptElevation)
 {
     if (GoogleEarth.IsInstalled()) {
         GoogleEarth.GeoTag((lat, lon, alt) => {
             ctlLat.Value = lat;
             ctlLon.Value = lon;
             txtPosSource.Text = "Google Earth";
             if (alt.HasValue && acceptElevation) {
                 if (OptionalQuestions.UpdateElevationQuestion.Ask(this.FindParentWindow(), alt.Value)) {
                     optElevElevation.IsChecked = true;
                     txtElevUpper.Text = alt.Value + "";
                     txtElevUnits.Text = "m";
                     txtElevSource.Text = "Google Earth";
                 }
             }
         }, ctlLat.Value, ctlLon.Value);
     }
 }
Beispiel #3
0
        private void LaunchGazetteer(LatLongInput lat, LatLongInput lon, bool updateLocality)
        {
            NamedPlaceSelectionOptions selectOptions = new NamedPlaceSelectionOptions { PlaceNameSeed = txtLocality.Text };

            PluginManager.Instance.StartSelect<PlaceName>((result) => {
                var place = result.DataObject as PlaceName;
                if (place != null) {
                    lat.Value = place.Latitude;
                    lon.Value = place.Longitude;
                    txtPosSource.Text = "EGaz";
                    if (updateLocality) {
                        UpdateLocality(place);
                    }
                }
            }, LookupOptions.None, selectOptions);
        }
 private void HookLatLongControl(LatLongInput ctl)
 {
     HookTextBox(ctl.txtDegrees);
     HookTextBox(ctl.txtMinutes);
     HookTextBox(ctl.txtSeconds);
 }