nearby-cities

command module
v0.0.0-...-a45f0c5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 6, 2024 License: MIT Imports: 25 Imported by: 0

README

Nearby Cities

Inspired by my exploration of geohash, I wondered if there's a Latitude/Longitude database and I stumbled upon this gem.

Imagine the possibilities: on weekends, when you're itching for a getaway near a city, this database can be your compass, helping you discover cities within a 100km radius.

$ http get 'http://localhost:8080/v1/cities/nearby?latitude=21.0278&longitude=105.8342&radius=100'
HTTP/1.1 200 OK
Content-Type: text/plain; charset=utf-8
Date: Tue, 12 Dec 2023 10:21:23 GMT
Transfer-Encoding: chunked

[
    {
        "name": "Hanoi",
        "lat": 21.0283,
        "lng": 105.8542,
        "country": "Vietnam",
        "geohash": "w7er8u0dtxhr"
    },
    {
        "name": "Haiphong",
        "lat": 20.8651,
        "lng": 106.6838,
        "country": "Vietnam",
        "geohash": "w7eyewku08wc"
    },
    {
        "name": "Bắc Ninh",
        "lat": 21.1833,
        "lng": 106.05,
        "country": "Vietnam",
        "geohash": "w7g2t0r38j76"
    },

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL