Download the PHP package hypejunction/hypegeo without Composer
On this page you can find all versions of the php package hypejunction/hypegeo. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download hypejunction/hypegeo
More information about hypejunction/hypegeo
Files in hypejunction/hypegeo
Package hypegeo
Short Description Tools for building geo-aware plugins for Elgg
License GPL-2.0
Homepage http://hypejunction.com
Informations about the package hypegeo
Elgg Geo Tools
Various tools intended to simplify location-aware development
Dependencies
- If downloading from github, install composer dependencies by running
MySQL Spatial Extentions
-
The plugin optimizes the storage of geographical coordinates by adding a geometry-enabled table, with a unique key. Whenever metadata is updated, the metadata value is geocoded, and corresponding coordinates are stored in the geometry-enabled table. This allows to reduce the overhead, necessary to sort entities by distance to a given geographical point, or to select entities within certain bounds
-
When you first activate the plugin, the script will iterate through all entities that have and metadata attached to them, and populate the geometry table
- Default Elgg workflow for storing and updating metadata is left unchanged, so it is safe to disable the plugin at any time without loosing any data
Filtering
The plugins provides API for getting entities by proximity to a certain geographical point, as well as convenience functions to adding necessary clauses to your options array;
For a sample implementation see, the search hooks.
Location-based search
The plugin implements location-based search type, where entities within a given radius are shown in the search results and ordered by proximity to the search query if it's a geocodeable location
Geocoding
-
Geocoding is performed via multiple providers using PHP Geocoder library by William Durand https://github.com/geocoder-php/Geocoder
-
Configuration for individual providers is available in the plugin settings
- Geocoded addresses/locations will be cached in
Geographic Calculations
- Geographic calculations are performed using Navigator class by Simon Holywell http://simonholywell.com/projects/navigator/
Views
The plugin adds several views, which make it easier to standardize location-aware UI:
Form Views
-
- standard postal address form (submits an array with a configurable name) The action will receive an array with the following keys: , , , , ,
Input Views
-
- location input with an autocomplete (from existing location metadata) elgg_tokeninput input is required for autocomplete https://github.com/hypeJunction/elgg_tokeninput
-
- country selector (passes ISO codes as option values)
Output Views
Examples
The following example will display a list of users within a 200km radius to the current user, and order them by proximity. Please note that this example assumes that you have properly geocoded details of the currently logged in user
The following example will display a list of blogs and bookmarks within a 500 meter radius to an address in a default order (time_created).
The following example will display a list of 20 featured groups closest to another entity:
Screenshots
All versions of hypegeo with dependencies
willdurand/geocoder Version @stable
treffynnon/navigator Version 1.0.0
php Version >=5.3.3
composer/installers Version >=1.0.8