Download the PHP package dolphiq/craft3-locationpicker without Composer

On this page you can find all versions of the php package dolphiq/craft3-locationpicker. 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 craft3-locationpicker

Locationpicker plugin for Craft CMS 3.x

A location field that lets you pick a location and shows it on google maps. You also have the possibility to group multiple chosen locations.

Note: This plugin may become a paid add-on when the Craft Plugin store becomes available.

Requirements

Installation

  1. Install with Composer

    composer require dolphiq/craft3-locationpicker

  2. Install plugin in the Craft Control Panel under Settings > Plugins
  3. The Location Field type will be available when adding a new field - Settings > Fields > Add new field

Creating a field with the location field type

  1. Choose the Location Field type
  2. Save the field

Using the location field type

  1. Add the field to a field layout (for example to a section)
  2. You can now choose an location when creating or updating a section by clicking on the Pick location button
  3. When clicking this button you will get a popup. Type the adress to search for a location.
  4. You will now get a dropdown list. Click on one of the options in the dropdownlist to choose a location.
  5. The location will be shown on the map below
  6. Click on the red Select button in the bottom right corner of the popup to use the choosen location in the entry.
  7. If you click cancel or dismiss the popup the choosen location will not be set in the entry.

Usage sample to display a map with one location

Display a google map with the choosen location in a twig template

Properties of the icon field
  1. Get the location address (string)

    {{ entry.fieldName.address }}

  2. Get the location latitude

    {{ entry.fieldName.lat }}

  3. Get the location longitude

    {{ entry.fieldName.long }}

  4. Display a map with the location. Options is an array, see options part

    {{ entry.fieldName.getMap()|raw }}

Usage sample to display a map with more locations

To display more locations on the same map (a marker for every location), we use the twig function dolphiqMap. Lets say we have a structure called hospitals with entries that each have a location field. To display a map with all locations do the following in a twig template:

Properties and options

Properties of the dolphiqMap(locations, options) function

Properties
Property Type Description
locations array Should be an array or a multidemensional array for more locations with at least a lat and long attribute for each location
options array An array with one of the following options
Map Options
Option Type Default Description
width string 100% The width of the google map. In css units. So you can use percentage as wel as pixels
height string 500px The height of the google map. In css units. So you can use percentage as wel as pixels

Contributors & Developers

Lucas Weijers - Original developer

Brought to you by Dolphiq: [email protected]


All versions of craft3-locationpicker with dependencies

PHP Build Version
Package Version
Requires craftcms/cms Version ^3.0.0-alpha.1
romi45/yii2-json-validator Version ^1.1
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 dolphiq/craft3-locationpicker contains the following files

Loading the files please wait ....