Download the PHP package teneleven/geolocator-bundle without Composer

On this page you can find all versions of the php package teneleven/geolocator-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package geolocator-bundle

Teneleven Geolocator Bundle

This bundle adds the ability to make your models geo-searchable and displayed on a map. Example uses are store locators, apartment finders, nearest bus stops.. any geo-searchable scenario you can dream up.

Example

Out of the box the bundle works with Doctrine ORM, but support for other persistence layers is trivial to implement.

To keep the bundle lean and mean we leverage other great bundles where possible, such as:

Sensitive defaults are automatically prepended but you are encouraged to tap into each bundle's configuration directly.

Installation & Setup

Download the bundle via composer

Require the bundle in your composer.json file:

If you are on Symfony 2, you might prefer to lock to the v2 version:

or run:

in a shell.

Enable the bundle

Configure your models

Each model type you want to support requires a configuration entry under a unique alias. This alias is used in routing configuration and command parameters.

Configure your routes

Below is an example route for the model configured above. It leverages the default controller which comes with the bundle and does not specify a custom template.

This routing configuration allows you to expose differently configured locators at different URLs, each with a customized location provider and a custom template, if you so desire.

Geo-code your models

To be locatable via this bundle your model classes must implement .

Given the above configuration you can now run:

to apply geo-coordinates to each model instance. By default this bundle uses the Geocoder Google Maps adapter, but you can configure the Geocoder Bundle either way you like. The argument is optional. If you leave it off, all models configured with this bundle will be geo-coded.

You're done

Your models can now be geo-searched and should appear on the result page. Fire off a search and enjoy the fruits of your labor! Did you know - clicking on a result will highlight the related marker, and clicking on a marker will highlight the related result.. how cool is that?!

Customizing this bundle

This bundle is designed to be very flexible and make customizations easy. If you run into a use-case not described here, please open a ticket.

Customizing the results template

The default template in this bundle includes several blocks to easily customize the following areas:

Simply extend this template in your project, override the desired blocks, and specify your new template in the routing configuration (see above). Your template can also specify a layout to be used by setting a variable inside the template.

Customizing the location provider

The location provider houses query logic and handles the search form. If your model search includes custom parameters (other than the search location) you will need to extend the default logic and specify a custom search form. One example use-case would be an apartment-finder which allows filtering and sorting by rent level, in addition to geo-distance.

Customizing the controller

Currently the controller is where the map is being built. If you need to customize this functionality for some reason, you can provide your own controller implementation and specify it in the routing configuration.

Commands & Address Extractors

The bundle includes one command, , to apply geo-coordinates to your models. By default only models with empty latitude/longitude are processed, but you can customize this by providing your own location provider implementation. You might, for example, want to refresh geo-coordinates on recently updated models, or ones that have NOT been updated in a while. Up to you.

Internally, geo-coordinates are provided by the great Geocoder library, which requires an address input as string, so we provide an along with a default implementation based on the PropertyAccess component. If your address extraction logic goes beyond gluing together model properties, you are free to provide your own implementation.

Tips & Tricks

Contributing

We welcome ideas, bug reports, and pull requests. Please submit tickets on this GitHub repository.


All versions of geolocator-bundle with dependencies

PHP Build Version
Package Version
Requires willdurand/geocoder-bundle Version ~5.0
egeloen/google-map-bundle Version *
craue/geo-bundle Version ~1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package teneleven/geolocator-bundle contains the following files

Loading the files please wait ....