private void HookLatLongControl(LatLongInput ctl) { HookTextBox(ctl.txtDegrees); HookTextBox(ctl.txtMinutes); HookTextBox(ctl.txtSeconds); }
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); } }
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); }