Пример #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HEREMapImageRetriever"/> class.
 /// </summary>
 /// <param name="geocodeClient">The geocode client to use.</param>
 /// <param name="mapImageClient">The map image client to use.</param>
 public HEREMapImageRetriever(
     IGeocodeClient geocodeClient,
     IMapImageClient mapImageClient)
 {
     this.geocodeClient  = geocodeClient ?? throw new ArgumentNullException(nameof(geocodeClient));
     this.mapImageClient = mapImageClient ?? throw new ArgumentNullException(nameof(mapImageClient));
 }
Пример #2
0
        private void btnConnect_Click(object sender, System.EventArgs e)
        {
            try
              {
              // create the appropriate geocode client
              if (rbMMServer.Checked)
                  _geocodeClient = GeocodeClientFactory.GetMmjHttpClient(tbMMUrl.Text);
              else
                  _geocodeClient = GeocodeClientFactory.GetEnvinsaLocationUtilityService(tbMiAwareUrl.Text);

              SetDefaultConstraints();
            gbAddress.Enabled = true;
            gbConstraints.Enabled = true;
            gbResults.Enabled = true;
            btnGeocode.Enabled = true;
              }
              catch (Exception exception)
              {
              	System.Windows.Forms.MessageBox.Show("Exception geocoding: " + exception.Message);
              }
        }