Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/soartec-lab/location4meshcode

Convert latitude and longitude to mesh map code
https://github.com/soartec-lab/location4meshcode

Last synced: about 1 month ago
JSON representation

Convert latitude and longitude to mesh map code

Awesome Lists containing this project

README

        

# Installation

Add this line to your application's Gemfile:

```ruby
gem 'location4meshcode'
```

And then execute:

$ bundle

Or install it yourself as:

$ gem install location4meshcode

# usage

## params

### class.new

Location4meshcode::Point.new(latitude, longitude)

### method

location.meshcode(level: 1)
level is mesh map code

```ruby
location = Location4meshcode::Point.new('35.7007777','139.71475')
location.meshcode(level: 1)
#=> "5339"

location.meshcode(level: 2)
#=> "533945"

location.meshcode(level: 3)
#=> "533947"
```