PHP Classes

Here PHP Geocoder: Get the location of an address using the Here API

Recommend this page to a friend!
  Info   View files Documentation   View files View files (11)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 146 This week: 1All time: 9,121 This week: 571Up
Version License PHP version Categories
here-geocoder 0.0.1MIT/X Consortium ...5PHP 5, Web services, Geography
Description 

Author

This package can get the location of an address using the Here API.

It can send HTTP requests to the Here API Web server to find the location of a given address.

The package returns a response that details several aspects of the address location like the latitude, longitude, country, state, city, street, etc..

Picture of Thiago Przyczynski
  Performance   Level  
Name: Thiago Przyczynski <contact>
Classes: 16 packages by
Country: Brazil Brazil
Age: 34
All time rank: 3203238 in Brazil Brazil
Week rank: 103 Up8 in Brazil Brazil Up
Innovation award
Innovation award
Nominee: 8x

Documentation

HERE GEOCODER

A Laravel package to work with Here Maps API.

Installing

composer require thiagoprz/here-geocoder

  • Add provider on config/app.php 
    'providers' => [
    ...
    Thiagoprz\HereGeocoder\HereGeocoderServiceProvider::class,
    ...
    ]
    
  • Add two enviromental variables on your projects .env file (or on your system variables): HERE_API_ID and HERE_APP_CODE.

They are yout APP ID and APP (secret)CODE. You just need to register on https://developer.here.com/?create=Freemium-Basic&keepState=true&step=account to receive you them.

Features

  • Address (and places) Geocode
$geocoder = new HereGeocoder();
$geocoder->geocode('Champ de Mars, 5 Avenue Anatole France, 75007 Paris'); 
// Returns
{"Response":{"MetaInfo":{"Timestamp":"2019-06-19T11:58:23.882+0000"},"View":[{"_type":"SearchResultsViewType","ViewId":0,"Result":[{"Relevance":0.72,"MatchLevel":"street","MatchQuality":{"Country":1,"City":1,"Street":[1],"PostalCode":1},"Location":{"LocationId":"NT_FuYSIyQ21HcHCtmZuSx09B","LocationType":"point","DisplayPosition":{"Latitude":48.85478,"Longitude":2.30038},"NavigationPosition":[{"Latitude":48.85478,"Longitude":2.30038}],"MapView":{"TopLeft":{"Latitude":48.85798,"Longitude":2.29497},"BottomRight":{"Latitude":48.85317,"Longitude":2.30242}},"Address":{"Label":"Champ-de-Mars, 75007 Paris, France","Country":"FRA","State":"\u00cele-de-France","County":"Paris","City":"Paris","District":"7e Arrondissement","Street":"Champ-de-Mars","PostalCode":"75007","AdditionalData":[{"value":"France","key":"CountryName"},{"value":"\u00cele-de-France","key":"StateName"},{"value":"Paris","key":"CountyName"}]}}}]}]}} 

For more information about geocode API check the Here API documentation: https://developer.here.com/documentation/geocoder/topics/what-is.html

Testing Tool

To make it easier Here Geocoder comes with a tool for testing the geocode functionality. After installation access http://YOU_PROJECT_LOCAL_URL/here_geocoder and you will be able to test the geocoding feature without having to code.

The testing tool only will be available when APP_ENV is not running on production (prod or production).

Roadmap

  • Unit Tests
  • Add batch geolocation support
  • Add batch places support
  • Add Facade for simpler access to geocode and future methods

  Files folder image Files  
File Role Description
Files folder imagesrc (2 files, 4 directories)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file License.txt Doc. Documentation
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  src  
File Role Description
Files folder imageHttp (1 directory)
Files folder imageresources (1 directory)
Files folder imageroutes (1 file)
Files folder imageviews (1 file)
  Plain text file HereGeocoder.php Class Class source
  Plain text file HereGeocoderServiceProvider.php Class Class source

  Files folder image Files  /  src  /  Http  
File Role Description
Files folder imageControllers (1 file)

  Files folder image Files  /  src  /  Http  /  Controllers  
File Role Description
  Plain text file HereGeocoderController.php Class Class source

  Files folder image Files  /  src  /  resources  
File Role Description
Files folder imagelang (3 directories)

  Files folder image Files  /  src  /  resources  /  lang  
File Role Description
Files folder imageen (1 file)
Files folder imagees (1 file)
Files folder imagept-BR (1 file)

  Files folder image Files  /  src  /  resources  /  lang  /  en  
File Role Description
  Accessible without login Plain text file messages.php Aux. Translations

  Files folder image Files  /  src  /  resources  /  lang  /  es  
File Role Description
  Accessible without login Plain text file messages.php Aux. Translations

  Files folder image Files  /  src  /  resources  /  lang  /  pt-BR  
File Role Description
  Accessible without login Plain text file messages.php Aux. Translations

  Files folder image Files  /  src  /  routes  
File Role Description
  Accessible without login Plain text file web.php Aux. Auxiliary script

  Files folder image Files  /  src  /  views  
File Role Description
  Accessible without login Plain text file index.blade.php Aux. Auxiliary script

 Version Control Unique User Downloads Download Rankings  
 100%
Total:146
This week:1
All time:9,121
This week:571Up