// goto by geocoder void textBoxGeo_KeyPress(object sender, GUI.KeyPressEventArgs e) { if ((GUI.Keys)e.KeyChar == GUI.Keys.Enter) { GeoCoderStatusCode status = MainMap.SetPositionByKeywords(textBoxGeo.Text); if (status != GeoCoderStatusCode.G_GEO_SUCCESS) { new Alt.GUI.Temporary.Gwen.Control.MessageBox(this, "Geocoder can't find: '" + textBoxGeo.Text + "', reason: " + status.ToString(), "GMap.NET"); } } }
// key-press events void MainForm_KeyPress(object sender, GUI.KeyPressEventArgs e) { if (MainMap.Focused) { if (e.KeyChar == '+') { MainMap.Zoom = ((int)MainMap.Zoom) + 1; } else if (e.KeyChar == '-') { MainMap.Zoom = ((int)(MainMap.Zoom + 0.99)) - 1; } else if (e.KeyChar == 'a') { MainMap.Bearing--; } else if (e.KeyChar == 'z') { MainMap.Bearing++; } } }