XyloCode.ThirdPartyServices.Mapbox.SearchBox
1.0.0
Prefix Reserved
See the version list below for details.
dotnet add package XyloCode.ThirdPartyServices.Mapbox.SearchBox --version 1.0.0
NuGet\Install-Package XyloCode.ThirdPartyServices.Mapbox.SearchBox -Version 1.0.0
<PackageReference Include="XyloCode.ThirdPartyServices.Mapbox.SearchBox" Version="1.0.0" />
paket add XyloCode.ThirdPartyServices.Mapbox.SearchBox --version 1.0.0
#r "nuget: XyloCode.ThirdPartyServices.Mapbox.SearchBox, 1.0.0"
// Install XyloCode.ThirdPartyServices.Mapbox.SearchBox as a Cake Addin #addin nuget:?package=XyloCode.ThirdPartyServices.Mapbox.SearchBox&version=1.0.0 // Install XyloCode.ThirdPartyServices.Mapbox.SearchBox as a Cake Tool #tool nuget:?package=XyloCode.ThirdPartyServices.Mapbox.SearchBox&version=1.0.0
Search Box API Client
An unofficial client library for accessing the Mapbox Search Box API.
Support only /suggest
and /retrieve
endpoints are used together to build an Interactive Search for your app.
Mapbox
Mapbox is an American provider of custom online maps for websites and applications such as Foursquare, Lonely Planet, the Financial Times, The Weather Channel, Instacart Inc. and Snapchat. Since 2010, it has rapidly expanded the niche of custom maps, as a response to the limited choice offered by map providers such as Google Maps.
Official website: https://www.mapbox.com/
Search Box
Search millions of continuously updated locations, including addresses, places, and points of interest, with a single search box. The Search Box API serves 340 Million+ addresses and 170 Million+ POIs with ever-improving coverage and quality on a global scale.
Official website:
How to use
using XyloCode.ThirdPartyServices.Mapbox.SearchBox;
namespace SearchBoxConsoleApp
{
internal class Program
{
static void Main(string[] args)
{
string accessToken = "Default public token from https://account.mapbox.com/";
string searchText = "671 Lincoln Ave";
var searchBox = new SearchBoxClient(accessToken);
var searchResult = searchBox.Search(searchText, country: "US");
foreach (var suggestion in searchResult.Suggestions)
{
Console.WriteLine(suggestion.FullAddress);
var retrive = searchBox.Retrieve(suggestion.MapboxId);
foreach (var feature in retrive.Features)
{
Console.WriteLine("{0} {1}", feature.Properties.Coordinates.Latitude, feature.Properties.Coordinates.Longitude);
}
Console.WriteLine("===*****===");
}
Console.Beep();
Console.WriteLine("End!");
}
}
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
-
net6.0
- No dependencies.
-
net7.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Support only /suggest and /retrieve endpoints are used together to build an Interactive Search for your app.