XyloCode.ThirdPartyServices.Mapbox.SearchBox 1.0.0

The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. Prefix Reserved
There is a newer version of this package available.
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
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="XyloCode.ThirdPartyServices.Mapbox.SearchBox" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add XyloCode.ThirdPartyServices.Mapbox.SearchBox --version 1.0.0
#r "nuget: XyloCode.ThirdPartyServices.Mapbox.SearchBox, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// 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 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • 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.

Version Downloads Last updated
1.2.1 130 11/16/2023
1.2.0 99 11/16/2023
1.1.3 144 5/21/2023
1.1.2 141 5/21/2023
1.1.1 139 5/21/2023
1.1.0 143 5/21/2023
1.0.0 126 5/20/2023

Support only /suggest and /retrieve endpoints are used together to build an Interactive Search for your app.