Download the PHP package goldfinch/silverstripe-googlemapfield without Composer

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

silverstripe-googlemapfield

Scrutinizer Code Quality

Lets you record a precise location using latitude/longitude/zoom fields to a DataObject.

Displays a map using the Google Maps API. The user may then choose where to place the marker; the landing coordinates are then saved.

You can also search for locations using the search box, which uses the Google Maps Geocoding API.

Supports SilverStripe 5

Usage

Minimal configuration

Given your DataObject uses the field names Latitude and Longitude for storing the latitude and longitude respectively then the following is a minimal setup to have the map show in the CMS:

Remember to set your API key in your site's config.yml

or through .env

Optional configuration

Configuration options

You can either set the default options in your yaml file (see _config/googlemapfield.yml for a complete list) or at run time on each instance of the GoogleMapField object.

Setting at run time

To set options at run time pass through an array of options (3rd construct parameter):

Customising the map appearance

You can customise the map's appearance by passing through settings into the map key of the $options (shown above). The map settings take a literal representation of the google.maps.MapOptions

For example if we wanted to change the map type from a road map to satellite imagery we could do the following:

Getting an API key

Google Maps API key

To get a Google Maps JS API key please see the official docs

Geocoding access - enabling the search box

To use the search box to find locations on the map, you'll need to have enabled the Geocoding API as well. Please see the official docs


All versions of silverstripe-googlemapfield with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
silverstripe/framework Version ^4 || ^5
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 goldfinch/silverstripe-googlemapfield contains the following files

Loading the files please wait ....