Download the PHP package dynamic/silverstripe-geocoder without Composer

On this page you can find all versions of the php package dynamic/silverstripe-geocoder. 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 silverstripe-geocoder

SilverStripe Geocoder

SilverStripe wrapper for Geocoder

CI codecov

Latest Stable Version Total Downloads Latest Unstable Version License

Requirements

Installation

composer require dynamic/silverstripe-geocoder

License

See License

Example usage

Getting Started

in mysite/_config/config.yml, apply the DataExtensions to your DataObject:

Google API Keys

You'll also need to set two Google API keys. Each key needs to have specific API libraries enabled:

This is primarily due to the restriction rules on Google API keys. The Geocoding key should be tied to the webserver's public IP, while the Maps API needs to be restricted to the website's domain name. Restriction rules help to prevent unauthorized users to use your keys, which can quickly use up your API requests quota.

Documentation

AddressDataExtension

The AddressDataExtension adds Address, Address2, City, State, PostalCode, Country, Lat, and Lng fields. The Lat and Lng fields are read only in the cms and are automatically generated on write. Geocoding can be disabled on a model basis by setting disable_geocoding to true.

Static Map Image

Using $AddressMap in a template will render the map. $AddressMap also has options to easily modify the width, height, and scale of the map. $AddressMap(320, 240, 1)

Map Style

The map can be styled by adding a mapStyle.json in any of the following folders in a theme:

Styles can be generated using an online service like Styling Wizard: Google Maps APIs

Marker Image

This does not work on local due to google needing to download the image off the server.

A custom marker image can be used to match the style of the map in about the same way as the style. An image named mapIcon with an extension of png, jpg, jpeg, or gif can be put in any of the following folders in a theme:

DistanceDataExtension

The DistanceDataExtension should be used in conjunction with the AddressDataExtension. The only time it is viable by itself is if the extended DataObject has Lat and Lng fields.

The DistanceDataExtension will add a pseudo field for distance away from an address to a DataObject. The address to check the distance to is from the current controller initially. This can be changed by implementing updateAddressValue($address) on the DataObject or an extension.

Maintainers

Bugtracker

Bugs are tracked in the issues section of this repository. Before submitting an issue please read over existing issues to ensure yours is unique.

If the issue does look like a new bug:

Please report security issues to the module maintainers directly. Please don't file security issues in the bugtracker.

Development and contribution

If you would like to make contributions to the module please ensure you raise a pull request and discuss with the module maintainers.


All versions of silverstripe-geocoder with dependencies

PHP Build Version
Package Version
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 dynamic/silverstripe-geocoder contains the following files

Loading the files please wait ....