This Sample demonstrates how you can use ThinkGeo Cloud Client to get a geographic location into meaningful addresses from ThinkGeo GIS Server. It ships with an optimized set of worldwide coverage of cities and towns, but any customized data can be supported as well. ThinkGeo Cloud Client support would work in all of the Map Suite controls such …
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
ThinkGeoCloudGeocoding
.gitignore
README.md
Screenshot.gif Update sample. Dec 20, 2018
Screenshot.png
ThinkGeoCloudGeocoding.sln

README.md

ThinkGeo Cloud Geocoding Sample for Wpf

Description

This Sample demonstrates how you can use ThinkGeo Cloud Client to get a geographic location from ThinkGeo GIS Server by a street address.

ThinkGeo Cloud Client support would work in all of the Map Suite controls such as Wpf, Web, MVC, WebApi, Android and iOS.

Please refer to Wiki for the details.

Screenshot

Requirements

This sample makes use of the following NuGet Packages

MapSuite 10.0.0

About the Code

private void UpdateIdSecretToClient()
{
    geocodingClient?.Dispose();
    geocodingClient = new GeocodingClient(clientId, clientSecret);
    geocodingClient.BaseUris.Add(new Uri(GisServerUri));
}

private async Task SearchLocation(string searchText, GeocodingOptions options)
{
    GeocodingResult result = null;
    result = await geocodingClient.SearchAsync(searchText, options);
    if (result.Exception != null)
    {
        MessageBox.Show(result.Exception.Message, "Error");
        return;
    }
    markerOverlay.Markers.Clear();
    lsbLocations.ItemsSource = null;
    WpfMap.Refresh();

    txbSearchResultDescription.Text = $"Find {result.Locations.Count} locations.";
    lsbLocations.ItemsSource = result.Locations;
    if (result.Locations.Count > 0)
    {
        lsbLocations.Visibility = Visibility.Visible;
        lsbLocations.SelectedIndex = 0;
    }
}

Getting Help

Map Suite Desktop for Wpf Wiki Resources

Map Suite Desktop for Wpf Product Description

ThinkGeo Community Site

ThinkGeo Web Site

Key APIs

This example makes use of the following APIs:

Working...

About Map Suite

Map Suite is a set of powerful development components and services for the .Net Framework.

About ThinkGeo

ThinkGeo is a GIS (Geographic Information Systems) company founded in 2004 and located in Frisco, TX. Our clients are in more than 40 industries including agriculture, energy, transportation, government, engineering, software development, and defense.