All Projects → Ziptastic → Ziptastic Php

Ziptastic / Ziptastic Php

Licence: mit
Official Ziptastic PHP Library

Projects that are alternatives of or similar to Ziptastic Php

Ziptastic Jquery Plugin
This is a jQuery plugin that shows how Ziptastic could be used.
Stars: ✭ 244 (+2611.11%)
Mutual labels:  gis, reverse
geocoder
Geocoder is a Typescript library which helps you build geo-aware applications by providing a powerful abstraction layer for geocoding manipulations
Stars: ✭ 28 (+211.11%)
Mutual labels:  geocoder, reverse
gazetteer
OSM ElasticSearch geocoder and addresses exporter
Stars: ✭ 93 (+933.33%)
Mutual labels:  gis, geocoder
Dontbug
Dontbug is a reverse debugger for PHP
Stars: ✭ 710 (+7788.89%)
Mutual labels:  reverse
Greatmaps
GMap.NET - Great Maps for Windows Forms & Presentation
Stars: ✭ 739 (+8111.11%)
Mutual labels:  gis
Django Rest Framework Gis
Geographic add-ons for Django REST Framework. Maintained by the OpenWISP Project.
Stars: ✭ 830 (+9122.22%)
Mutual labels:  gis
Rlur
Shiny dashboard for Land Use Regression modelling
Stars: ✭ 8 (-11.11%)
Mutual labels:  gis
Leaflet
R Interface to Leaflet Maps
Stars: ✭ 667 (+7311.11%)
Mutual labels:  gis
Proj4.jl
Julia wrapper for the PROJ cartographic projections library
Stars: ✭ 23 (+155.56%)
Mutual labels:  gis
Earthengine Py Notebooks
A collection of 360+ Jupyter Python notebook examples for using Google Earth Engine with interactive mapping
Stars: ✭ 807 (+8866.67%)
Mutual labels:  gis
Node Geocoder
nodejs geocoding library
Stars: ✭ 800 (+8788.89%)
Mutual labels:  geocoder
Mos
一个用于在 macOS 上平滑你的鼠标滚动效果或单独设置滚动方向的小工具, 让你的滚轮爽如触控板 | A lightweight tool used to smooth scrolling and set scroll direction independently for your mouse on macOS
Stars: ✭ 7,772 (+86255.56%)
Mutual labels:  reverse
K1801
1801 series ULA reverse engineering
Stars: ✭ 16 (+77.78%)
Mutual labels:  reverse
Turf
A modular geospatial engine written in JavaScript
Stars: ✭ 6,659 (+73888.89%)
Mutual labels:  gis
Postgis
PostGIS spatial database extension to PostgreSQL [mirror]
Stars: ✭ 925 (+10177.78%)
Mutual labels:  gis
Spatial
Neo4j Spatial is a library of utilities for Neo4j that faciliates the enabling of spatial operations on data. In particular you can add spatial indexes to already located data, and perform spatial operations on the data like searching for data within specified regions or within a specified distance of a point of interest. In addition classes are provided to expose the data to geotools and thereby to geotools enabled applications like geoserver and uDig.
Stars: ✭ 695 (+7622.22%)
Mutual labels:  gis
Geocoder
🌎 GoLang package that provides an easy way to use the Google Geocoding API
Stars: ✭ 23 (+155.56%)
Mutual labels:  geocoder
Shootback
a reverse TCP tunnel let you access target behind NAT or firewall
Stars: ✭ 799 (+8777.78%)
Mutual labels:  reverse
Fiona
Fiona reads and writes geographic data files
Stars: ✭ 787 (+8644.44%)
Mutual labels:  gis
Agentmaps
Make social simulations on interactive maps with Javascript! Agent-based modeling for the web.
Stars: ✭ 822 (+9033.33%)
Mutual labels:  gis

Ziptastic PHP

Latest Stable Version Build Status Test Coverage

This library is a simple interface for the Ziptastic API.

Using Ziptastic requires an API key.

Installing

Ziptastic PHP can be installed via composer:

composer require ziptastic/ziptastic

Ziptastic PHP relies on HTTPlug to make API requests. HTTPlug is an abstraction which allows you to choose from any one of a large number of HTTP clients, including the client you might already have installed.

For more information on getting started with HTTPlug, please refer to the HTTPlug for library users documentation.

To just get moving right now, install a couple common dependencies:

composer require php-http/curl-client guzzlehttp/psr7 php-http/message

Usage

<?php

include "vendor/autoload.php";

use Ziptastic\Client;

$z = Client::create(getenv('ZIPTASTIC_API_KEY'));

Ziptastic provides two API methods: Lookup by a postal code (forward lookup), and lookup by latitude and longitude (reverse lookup).

$result = $z->forward(48038);
$result = $z->reverse(42.331427, -83.0457538, 1000);

Results are returned as a list of arrays:

<?php

$lookup = current($result);
echo $lookup['county']; // Macomb
echo $lookup['city']; // Clinton Township
echo $lookup['state']; // Michigan
echo $lookup['state_short']; // MI
echo $lookup['postal_code']; // 48038
echo $lookup['latitude']; // 42.5868882
echo $lookup['longitude']; // -82.9195514

// Timezones are represented by an instance of \DateTimeZone
echo $lookup['timezone']->getName(); // America/Detroit

PHP 5

If you require PHP 5 compatibility, please use Ziptastic-PHP version 1.

License

Ziptastic PHP is licensed under the MIT license.

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].