All Projects → ryankurte → go-mapbox

ryankurte / go-mapbox

Licence: MIT license
Golang Mapbox API module

Programming Languages

go
31211 projects - #10 most used programming language

Labels

Projects that are alternatives of or similar to go-mapbox

BarsAppAmplify
React Native Bars App: AWS Amplify, AWS AppSync, AWS Cognito, Google Places, Mapbox
Stars: ✭ 29 (-12.12%)
Mutual labels:  mapbox
migrant service map
Refugees welcome
Stars: ✭ 23 (-30.3%)
Mutual labels:  mapbox
representable
We’re creating maps of communities to fight for fair representation. Add your community to the map today and make your voice heard.
Stars: ✭ 14 (-57.58%)
Mutual labels:  mapbox
rdeck
Deck.gl widget for R
Stars: ✭ 71 (+115.15%)
Mutual labels:  mapbox
districtr
A free, open-source web app for drawing districting plans.
Stars: ✭ 68 (+106.06%)
Mutual labels:  mapbox
lascallesdelasmujeres
Proyecto colaborativo para fomentar la generación de contenidos en OSM y Wikipedia, sobre mujeres.
Stars: ✭ 45 (+36.36%)
Mutual labels:  mapbox
mapbox-ios-binding
Xamarin binding library for Mapbox iOS SDK
Stars: ✭ 15 (-54.55%)
Mutual labels:  mapbox
ProjectLockdown
Project Lockdown (an initiative from The IO Foundation) is a civic tech, interactive platform providing an overview of the state of Human and Digital Rights around the globe. It evaluates policies obtained from official sources that may impact their observance. It provides, among other tools, a layered map interface that allows for a visual repr…
Stars: ✭ 34 (+3.03%)
Mutual labels:  mapbox
maptalks.mapboxgl
MapboxglLayer for maptalks.js
Stars: ✭ 51 (+54.55%)
Mutual labels:  mapbox
mapboxRevit
View Revit models inside Mapbox
Stars: ✭ 23 (-30.3%)
Mutual labels:  mapbox
deck.gl-time-series-widget
A React Time Slider implementation for DECK.GL - (non)temporal data - by CPU filtering ⌛
Stars: ✭ 19 (-42.42%)
Mutual labels:  mapbox
ciclomapa
Beautiful, interactive & open bike maps of Brazilian cities. Powered by OpenStreetMap.
Stars: ✭ 56 (+69.7%)
Mutual labels:  mapbox
theweekendest
Real-time New York City subway service map
Stars: ✭ 51 (+54.55%)
Mutual labels:  mapbox
pwa-maps
A presentation on using OpenMapTiles and service workers to turn an interactive map into an offline-capable Progressive Web App.
Stars: ✭ 44 (+33.33%)
Mutual labels:  mapbox
basemaps
A lightweight package for accessing basemaps from open sources in R 🗺️
Stars: ✭ 39 (+18.18%)
Mutual labels:  mapbox
fishfrymap
Fish Fry Map project repository
Stars: ✭ 14 (-57.58%)
Mutual labels:  mapbox
3d-earth
🌏🌎🌍 3D Earth with Mapbox GL, D3.js and Three.js
Stars: ✭ 68 (+106.06%)
Mutual labels:  mapbox
food-oasis-la
This is a website with a map of food sources in Los Angeles, and list of resources about food deserts and health, published with Jekyll and GitHub Pages.
Stars: ✭ 24 (-27.27%)
Mutual labels:  mapbox
custom-mapbox-layer
A custom layer based on Mapbox
Stars: ✭ 66 (+100%)
Mutual labels:  mapbox
mapbox-covid19
Yet another map for covid 19 using mapbox
Stars: ✭ 20 (-39.39%)
Mutual labels:  mapbox

go-mapbox

Mapbox API wrappers for Golang

Documentation GitHub tag Build Status

See here for other golang/mapbox projects.

Status

Very early WIP, pull requests and issues are most welcome. See lib/geocode/ or lib/directions/ for an example module to mimic.

Because Travis-CI does not expose the build environment to untrusted branches (ie. Pull Requests) tests have to be manually prompted by a repository admin then force merged. Don't panic when your local tests pass but travis fails with "Mapbox API token not found", we will manually run them as soon as possible. See issue #10 for more information.

Modules

  • Geocoding
  • Directions
  • Directions Matrix
  • Map Matching
  • Styles
  • Maps
  • Static
  • Datasets

Examples

Initialisation

// Import the core module (and any required APIs)
import (
    "gopkg.in/ryankurte/go-mapbox.v0/lib"
    "gopkg.in/ryankurte/go-mapbox.v0/lib/base"
)

// Fetch token from somewhere
token := os.Getenv("MAPBOX_TOKEN")

// Create new mapbox instance
mapBox := mapbox.NewMapbox(token)

Map API

import (
    "gopkg.in/ryankurte/go-mapbox.v0/lib/maps"
)

img, err := mapBox.Maps.GetTiles(maps.MapIDSatellite, 1, 0, 0, maps.MapFormatJpg90, true)

Geocoding

import (
    "gopkg.in/ryankurte/go-mapbox.v0/lib/geocode"
)

// Forward Geocoding
var forwardOpts geocode.ForwardRequestOpts
forwardOpts.Limit = 1

place := "2 lincoln memorial circle nw"

forward, err := mapBox.Geocode.Forward(place, &forwardOpts)


// Reverse Geocoding
var reverseOpts geocode.ReverseRequestOpts
reverseOpts.Limit = 1

loc := &base.Location{72.438939, 34.074122}

reverse, err := mapBox.Geocode.Reverse(loc, &reverseOpts)

Directions

import (
    "gopkg.in/ryankurte/go-mapbox.v0/lib/directions"
)

var directionOpts directions.RequestOpts

locs := []base.Location{{-122.42, 37.78}, {-77.03, 38.91}}

directions, err := mapBox.Directions.GetDirections(locs, directions.RoutingCycling, &directionOpts)

Layout


If you have any questions, comments, or suggestions, feel free to open an issue or a pull request.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].