Download the PHP package yunusga/carbon-field-map-yandex without Composer
On this page you can find all versions of the php package yunusga/carbon-field-map-yandex. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download yunusga/carbon-field-map-yandex
More information about yunusga/carbon-field-map-yandex
Files in yunusga/carbon-field-map-yandex
Package carbon-field-map-yandex
Short Description Carbon Fields extension, that adds a Map Yandex field type.
License GPL-2.0+
Homepage https://github.com/yunusga/carbon-field-map-yandex
Informations about the package carbon-field-map-yandex
Carbon Fields Map Yandex
The map field provides a Yandex-powered map with an address search field for Carbon Fields.
Install via Composer
Information
The field stores several pieces of related information:
Atribute | Description | Value Type | Value |
---|---|---|---|
'value' |
Latitude & Longitude | (string) |
11.370946,142.591472 |
'lat' |
Latitude | (float) |
11.370946 |
'lng' |
Longitude | (float) |
142.591472 |
'address' |
Address | (string) |
The lowest point of the Mariana Trench |
'zoom' |
Zoom level | (int) |
4 |
Yandex Maps JS Key setup
As of October 11, 2018, Yandex requires users to generate an API key in order to use the Yandex Maps API: https://yandex.ru/blog/mapsapi/novye-pravila-dostupa-k-api-kart?from=club
You can get your API key here: https://developer.tech.yandex.ru/services/3/
Once you're ready with the process of generating a key, you'll need to provide the key to Carbon Fields through a filter:
Config methods
set_position( $lat, $lng, $zoom )
Set the default position on the map specified by $lat
and $lng
and the default zoom level to $zoom
(zoom 0
corresponds to a map of the Earth fully zoomed out).
Usage
To get all the location data as an array, you can use the map_yandex
type in the retrieval functions. Example: