-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
681 additions
and
162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
# (MODX)EvolutionCMS.snippets.ddYMap changelog | ||
|
||
|
||
## Version 1.6.2 (2020-07-08) | ||
* \* Attention! (MODX)EvolutionCMS.libraries.ddTools >= 0.40.1 is required (not tested in older versions). | ||
* \* Improved compatibility with new versions of (MODX)EvolutionCMS.libraries.ddTools. | ||
* \* The `defer` attribute is used only for external scripts (closes #2). | ||
* \* Repository file structure was changed. | ||
* \+ README. | ||
* \+ README_ru. | ||
* \+ CHANGELOG. | ||
* \+ CHANGELOG_ru. | ||
* \+ Composer.json. | ||
|
||
|
||
## Version 1.6.1 (2018-02-02) | ||
* \* Attention! PHP >= 5.4 is required. | ||
* \* Attention! (MODX)EvolutionCMS.libraries.ddTools >= 0.21 is required. | ||
* \* Parameters: The following have been renamed (the snippet works with the old names but they are deprecated): | ||
* \* `docField` → `geoPos_docField`. | ||
* \* `docId` → `geoPos_docId`. | ||
|
||
|
||
## Version 1.6 (2017-11-28) | ||
* \+ Parameters → `scriptsLocation`: The new parameter. Indicating where JS scripts are included. | ||
* \* Fixed Javascript error `Mixed Content: the content must be served over HTTPS`. | ||
|
||
|
||
## Version 1.5 (2015-02-01) | ||
* \* Parameters: | ||
* \* `lang`: The new parameter. Setting the locale determines the language that map texts and controls are displayed in, the preferred language for returning map search results, and the default measurement units. | ||
* \* `mapElement`: The parameter is checked by `empty` instead of `isset`. | ||
|
||
|
||
## Version 1.4.2 (2014-08-14) | ||
* \* Wrong variable name has been fixed. | ||
|
||
|
||
## Version 1.4.1 (2014-07-24) | ||
* \* jQuery.ddYMap has been updated to 1.3.1. | ||
|
||
|
||
## Version 1.4 (2014-07-10) | ||
* \* Attention! (MODX)EvolutionCMS.libraries.ddTools >= 0.12 is required. | ||
* \* Parameters: The following have been renamed (the snippet works with the old names but they are deprecated): | ||
* \* `getField` → `docField`. | ||
* \* `getId` → `docId`. | ||
* \* The 2.1 version of Yandex. Maps API is used. | ||
* \* jQuery.ddYMap has been updated to 1.3. | ||
|
||
|
||
## Version 1.3 (2014-06-05) | ||
* \+ Parameters → `mapCenterOffset`: The new parameter. It allows center offset of the map to be set in pixels with respect to the center of the map container. | ||
* \* jQuery.ddYMap has been updated to 1.2. | ||
|
||
|
||
## Version 1.2 (2014-03-16) | ||
* \* Attention! (MODX)EvolutionCMS.libraries.ddTools >= 0.11 is required. | ||
* \* Parameters: | ||
* \+ `defaultType`: The new parameter which allows to set default map type has been added. | ||
* \+ `defaultZoom`: The new parameter which allows to set default map zoom has been added. | ||
* \* `mapElement`: | ||
* \* Has been ranamed from `mapElementId`. | ||
* \+ Now takes a custom jQuery selector instead of an id. Default value equals '#map'. | ||
* \* Absolute URL is used for referring to the jQuery.ddYMap library. | ||
* \* jQuery.ddYMap has been updated to 1.1. | ||
* \* The `ddTools:getTemplateVarOutput` method is used for getting field value instead of the `ddGetDocumentField` snippet. | ||
* \* The fractional values bug of the icon offset has been fixed. | ||
|
||
|
||
## Version 1.1.1 (2013-10-02) | ||
* \+ Parameters → `icon`: An URL can be passed as a value for the parameter. | ||
* \+ Multiple calls of the snippet on the same document are available now (inline script is included without explicit version pass). | ||
* \* The dollar sign isn’t used as a global variable to avoid conflicts with other js-libraries in inline script. | ||
|
||
|
||
## Version 1.1 (2013-07-16) | ||
* \+ Parameters → `iconOffset`: The new parameter allowing an offset of the icon to be set. | ||
* \* The `icon` path bug has been fixed. | ||
* \* `isset($var) && $var != ''` was replaced with `!empty($var)` in the position (`geoPos`) and icon (`icon`) validation conditions. | ||
|
||
|
||
## Version 1.0 (2013-07-12) | ||
* \+ The first release. | ||
|
||
|
||
<link rel="stylesheet" type="text/css" href="https://DivanDesign.ru/assets/files/ddMarkdown.css" /> | ||
<style>ul{list-style:none;}</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
# (MODX)EvolutionCMS.snippets.ddYMap changelog | ||
|
||
|
||
## Версия 1.6.2 (2020-07-08) | ||
* \* Внимание! Требуется (MODX)EvolutionCMS.libraries.ddTools >= 0.40.1 (не тестировался с более ранними версиями). | ||
* \* Улучшена совместимость с новыми версиями (MODX)EvolutionCMS.libraries.ddTools. | ||
* \* Атрибут `defer` используется только для внешних скриптов (closes #2). | ||
* \* Структура файлов репозитория изменена. | ||
* \+ README. | ||
* \+ README_ru. | ||
* \+ CHANGELOG. | ||
* \+ CHANGELOG_ru. | ||
* \+ Composer.json. | ||
|
||
|
||
## Версия 1.6.1 (2018-02-02) | ||
* \* Внимание! Требуется PHP >= 5.4. | ||
* \* Внимание! Требуется (MODX)EvolutionCMS.libraries.ddTools >= 0.21. | ||
* \* Параметры: Следующие параметры переименованы (старые имена пока поддерживаются, но не рекомендуются к использованию): | ||
* \* `docField` → `geoPos_docField`. | ||
* \* `docId` → `geoPos_docId`. | ||
|
||
|
||
## Версия 1.6 (2017-11-28) | ||
* \+ Параметры → `scriptsLocation`: Новый параметр. Указывает в какой области будут подключаться JS-скрипты. | ||
* \* Исправлена JS ошибка `Mixed Content: the content must be served over HTTPS`. | ||
|
||
|
||
## Версия 1.5 (2015-02-01) | ||
* \* Параметры: | ||
* \* `lang`: Новый параметр. Задание локали определяет язык, на котором отображаются надписи на карте и элементах управления, предпочтительный язык, на котором возвращаются результаты поиска по карте и используемые по умолчанию единицы измерения. | ||
* \* `mapElement`: При обработке параметра используется `empty` вместо `isset`. | ||
|
||
|
||
## Версия 1.4.2 (2014-08-14) | ||
* \* Исправлено неправильное имя переменной. | ||
|
||
|
||
## Версия 1.4.1 (2014-07-24) | ||
* \* jQuery.ddYMap обновлена до 1.3.1. | ||
|
||
|
||
## Версия 1.4 (2014-07-10) | ||
* \* Внимание! Требуется (MODX)EvolutionCMS.libraries.ddTools >= 0.12. | ||
* \* Параметры: Следующие параметры переименованы (старые имена пока поддерживаются, но не рекомендуются к использованию): | ||
* \* `getField` → `docField`. | ||
* \* `getId` → `docId`. | ||
* \* Используется API Яндекс. Карт версии 2.1. | ||
* \* jQuery.ddYMap обновлена до 1.3. | ||
|
||
|
||
## Версия 1.3 (2014-06-05) | ||
* \+ Параметры → `mapCenterOffset`: Новый параметр. Позволяет задать смещение центра карты относительно центра контейнера в пикселях. | ||
* \* jQuery.ddYMap обновлена до 1.2. | ||
|
||
|
||
## Версия 1.2 (2014-03-16) | ||
* \* Внимание! Требуется (MODX)EvolutionCMS.libraries.ddTools >= 0.11. | ||
* \* Параметры: | ||
* \+ `defaultType`: Новый параметр. Позволяет задать тип карты по умолчанию. | ||
* \+ `defaultZoom`: Новый параметр. Позволяет задать масштаб карты по умолчанию. | ||
* \* `mapElement`: | ||
* \* Переименован в `mapElementId`. | ||
* \+ Теперь принимает произвольный jQuery-селектор контейнера (значение по умолчанию: '#map'). | ||
* \* При подключении библиотеки jQuery.ddYMap используется полный путь. | ||
* \* jQuery.ddYMap обновлена до 1.1. | ||
* \* Значение поля получается при помощи метода `ddTools:getTemplateVarOutput`, сниппет ddGetDocumentField больше не используется. | ||
* \* Исправлена ошибка связанная с дробными значениями смещения иконки. | ||
|
||
|
||
## Версия 1.1.1 (2013-10-02) | ||
* \+ Параметры → `icon`: Теперь в качестве адреса иконки можно задавать и URL. | ||
* \+ Добавлена возможность нескольких вызовов сниппета на странице (при подключении встроенного скрипта убрана версия). | ||
* \* Во встроенном скрипте знак доллара глобально больше не используется для совместимости с другими библиотеками. | ||
|
||
|
||
## Версия 1.1 (2013-07-16) | ||
* \+ Параметры → `iconOffset`: Новый параметр. Позволяет задать смещение иконки относительно базового положения. | ||
* \* Исправлена проблема с путем к иконке (`icon`). | ||
* \* `isset($var) && $var != ''` заменено на `!empty($var)` в условиях проверки координат (`geoPos`) и иконки (`icon`). | ||
|
||
|
||
## Версия 1.0 (2013-07-12) | ||
* \+ Первый релиз. | ||
|
||
|
||
<link rel="stylesheet" type="text/css" href="https://DivanDesign.ru/assets/files/ddMarkdown.css" /> | ||
<style>ul{list-style:none;}</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,133 @@ | ||
# ddYMap | ||
# (MODX)EvolutionCMS.snippets.ddYMap | ||
|
||
A snippet that allows Yandex.Maps to be rendered on a page in a simple way. | ||
___ | ||
Visit the following [link](http://code.divandesign.biz/modx/ddymap) to read the documentation, instructions & changelog. | ||
A snippet that allows [Yandex.Maps](https://maps.yandex.com) to be rendered on a page in a simple way. | ||
|
||
It is useful to use the snippet with [mm_ddYMap](https://code.divandesign.biz/modx/mm_ddymap). | ||
|
||
|
||
## Requires | ||
|
||
* PHP >= 5.4 | ||
* [(MODX)EvolutionCMS.libraries.ddTools](https://code.divandesign.biz/modx/ddtools) >= 0.40.1 (not tested with older versions) | ||
|
||
|
||
## Documentation | ||
|
||
**Be advised!** The jQuery library must be included on the page. | ||
|
||
|
||
### Installation | ||
|
||
|
||
#### 1. Elements → Snippets: Create a new snippet with the following data | ||
|
||
1. Snippet name: `ddYMap`. | ||
2. Description: `<b>1.6.2</b> A snippet that allows Yandex.Maps to be rendered on a page in a simple way.`. | ||
3. Category: `Core`. | ||
4. Parse DocBlock: `no`. | ||
5. Snippet code (php): Insert content of the `ddYMap_snippet.php` file from the archive. | ||
|
||
|
||
#### 2. Elements → Manage Files | ||
|
||
Upload the `jQuery.ddYMap-1.4.min.js` file to the `assets/js/` folder. | ||
|
||
|
||
### Parameters description | ||
|
||
From the pair of `geoPos` / `geoPos_docField` parameters one is required. | ||
|
||
* `geoPos` | ||
* Desctription: Comma separated longitude and latitude. | ||
* Valid values: `string_commaSeparated` | ||
* **Required** | ||
|
||
* `geoPos_docField` | ||
* Desctription: A field name with position that is required to be got. | ||
* Valid values: `string` | ||
* Default value: — | ||
|
||
* `geoPos_docId` | ||
* Desctription: Document ID with a field value needed to be received. | ||
* Valid values: `integer` | ||
* Default value: — (current document) | ||
|
||
* `mapElement` | ||
* Desctription: Container selector which the map is required to be embed in. | ||
* Valid values: `string` | ||
* Default value: `'#map'` | ||
|
||
* `defaultType` | ||
* Desctription: Default map type. | ||
* Valid values: | ||
* `'map'` — schematic map | ||
* `'satellite'` — satellite map | ||
* `'hybrid'` — hybrid map | ||
* `'publicMap'` — public map | ||
* `'publicMapHybrid'` — hybrid public map | ||
* Default value: `'map'` | ||
|
||
* `defaultZoom` | ||
* Desctription: Default map zoom. | ||
* Valid values: `integer` | ||
* Default value: `15` | ||
|
||
* `icon` | ||
* Desctription: An icon to use (relative address or URL). | ||
* Valid values: `string` | ||
* Default value: — (default Yandex icon) | ||
|
||
* `iconOffset` | ||
* Desctription: An offset of the icon in pixels (`x`, `y`). | ||
Basic position: the icon is horizontally centered with respect to `x` and its bottom position is `y`. | ||
* Valid values: `string_commaSeparated` | ||
* Default value: `'0,0'` | ||
|
||
* `scrollZoom` | ||
* Desctription: Allow zoom while scrolling. | ||
* Valid values: | ||
* `0` | ||
* `1` | ||
* Default value: `0` | ||
|
||
* `mapCenterOffset` | ||
* Desctription: Center offset of the map with respect to the center of the map container in pixels. | ||
* Valid values: `string_commaSeparated` | ||
* Default value: `'0,0'` | ||
|
||
* `lang` | ||
* Desctription: Map language — locale ID. | ||
See [Yandex.Maps documentation](https://api.yandex.com/maps/doc/jsapi/2.x/dg/concepts/load.xml) for more information. | ||
* Valid values: | ||
* `'en_US'` | ||
* `'ru_RU'` | ||
* `'ru_UA'` | ||
* `'uk_UA'` | ||
* `'tr_TR'` | ||
* Default value: `'ru_RU'` | ||
|
||
* `scriptsLocation` | ||
* Desctription: The tag where JS scripts will be included. | ||
* Valid values: | ||
* `'head'` | ||
* `'body'` | ||
* Default value: `'head'` | ||
|
||
|
||
### Examples | ||
|
||
``` | ||
[[ddYMap? | ||
&geoPos=`55.177446326764496,61.29041790962219` | ||
&icon=`assets/images/system/mapIcon.png` | ||
]] | ||
``` | ||
|
||
|
||
## Links | ||
|
||
* [Home page](https://code.divandesign.biz/modx/ddymap) | ||
* [Telegram chat](https://t.me/dd_code) | ||
|
||
|
||
<link rel="stylesheet" type="text/css" href="https://DivanDesign.ru/assets/files/ddMarkdown.css" /> |
Oops, something went wrong.