Download the PHP package mattrothenberg/statamic-mapbox-address without Composer
On this page you can find all versions of the php package mattrothenberg/statamic-mapbox-address. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mattrothenberg/statamic-mapbox-address
More information about mattrothenberg/statamic-mapbox-address
Files in mattrothenberg/statamic-mapbox-address
Package statamic-mapbox-address
Short Description A Mapbox autocomplete dropdown fieldtype for the Statamic Control Panel
License MIT
Informations about the package statamic-mapbox-address
Mattrothenberg\StatamicMapboxAddress
An address Autocomplete Field for Statamic V3, powered by Mapbox.
Installation
Add the addon to your project via composer
.
Make sure to add the following environment variable, since this library uses Mapbox under the hood for address autocompletion. The addon will not work without a valid key.
Configuration
Currently, only a few configuration options are supported, although Mapbox's forward geocoding API exposes a variety of settings..
placeholder (string>)
: Placeholder text for the rendered picker.countries (Array<string>)
: Limits results to the specified countries. Each item in the array should be an ISO 3166 alpha 2 country code.featureTypes ("country" | "region" | "postcode" | "district" | "place" | "locality" | "neighborhood" | "address" | "poi" | "poi.landmark"):
: Filter results by feature typeslanguage (Array<string>)
: Specify the language to use for response text and, for forward geocoding, query result weighting. Options are IETF language tags comprised of a mandatory ISO 639-1 language code and optionally one or more IETF subtags for country or script.
Please feel free to submit a pull request if you'd like to add other settings to the configuration screen.
Serialization
When selecting an address from the picker, the entire result will be serialized on your entry. The structure of a result is as follows:
Please feel free to submit a pull request if you'd like to modify or improve this very basic serialization schema.
All versions of statamic-mapbox-address with dependencies
statamic/cms Version ^3.0|^4.0|^5.0
pixelfear/composer-dist-plugin Version ^0.1