Download the PHP package vojtech-dobes/nette-forms-gpspicker without Composer

On this page you can find all versions of the php package vojtech-dobes/nette-forms-gpspicker. 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 nette-forms-gpspicker

For Nette Framework

GPS coordinates picker. Try it now!

Drivers
License

New BSD

Dependencies

Nette 2.0.0

Demo

http://vojtechdobes.com/gpspicker/

Installation

  1. Get the source code from Github or via Composer (vojtech-dobes/nette-forms-gpspicker).
  2. Register VojtechDobes\NetteForms\GpsPickerExtension as extension.
  3. Link appropriate maps API SDK and client/nette.gpsPicker.js in app/templates/@layout.latte.

In Nette 2.0, registration is done in app/bootstrap.php:

(for example when using Google Maps API v3)

Usage

You can add some options (every option has also some like setter thing):

If you prefer manual rendering, caption can be omitted:

Returned value is instance of GpsPoint with lat and lng properties. It inherits from Nette\Object.

You can set value (respectively default value) like this:

Validation

Now you can easily add various constraints on desired GPS:

First four rules will be also validated client-side.

Manual rendering

If the user doesn't support Javascript or gets offline, picker provides several inputs for setting coordinates manually. You can easily render them manually as well as whole complete element.

Search by address

Enabled by default, GpsPicker supports searching map by typing the address. Extra <input> element will be prepended to map, enhanced by Google Places Autocomplete service.

If you like to render it manually, use search key:

You can disable/enable search feature with enableSearch/disableSearch pair of methods:

Or in constructor:

Providers

If you are afraid of exhausting API rate limit of Google Maps, you can use alternative provider as well. All you have to do is to link their appropriate API SDK and set the driver:

Available providers are:

Google

Feature Value
Usage default (manually by calling ->setDriver(Gps::DRIVER_GOOGLE))
Search by address yes
Supported types Gps::TYPE_ROADMAP, Gps::TYPE_SATELLITE, Gps::TYPE_HYBRID, Gps::TYPE_TERRAIN

Nokia

Feature Value
Usage ->setDriver(Gps::DRIVER_NOKIA)
Search by address no
Supported types Gps::TYPE_NORMAL, Gps::TYPE_SATELLITE, Gps::TYPE_TERRAIN

OpenStreetMap

Feature Value
Usage ->setDriver(Gps::DRIVER_OPENSTREETMAP)
Search by address no
Supported types Gps::TYPE_ROADMAP, Gps::TYPE_SATELLITE, Gps::TYPE_HYBRID, Gps::TYPE_TERRAIN

Seznam (Mapy.cz)

Feature Value
Usage ->setDriver(Gps::DRIVER_SEZNAM)
Search by address no
Supported types Gps::TYPE_BASE, Gps::TYPE_BIKE, Gps::TYPE_HISTORIC, Gps::TYPE_HYBRID,
Gps::TYPE_OPHOTO, Gps::TYPE_TRAIL, Gps::TYPE_TURIST

All versions of nette-forms-gpspicker with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.2
nette/nette Version >=2.1.0,<2.4
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 vojtech-dobes/nette-forms-gpspicker contains the following files

Loading the files please wait ....