dd / evolutioncms-snippets-ddymap
A snippet that allows Yandex.Maps to be rendered on a page in a simple way.
Installs: 1
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 1
Open Issues: 0
Type:modxevo-snippet
Requires
- php: >=5.4.0
- dd/evolutioncms-libraries-ddtools: >=0.40.1
This package is auto-updated.
Last update: 2024-11-06 09:57:48 UTC
README
A snippet that allows Yandex.Maps to be rendered on a page in a simple way.
It is useful to use the snippet with mm_ddYMap.
Requires
- PHP >= 5.4
- (MODX)EvolutionCMS.libraries.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
- Snippet name:
ddYMap
. - Description:
<b>1.6.2</b> A snippet that allows Yandex.Maps to be rendered on a page in a simple way.
. - Category:
Core
. - Parse DocBlock:
no
. - 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 tox
and its bottom position isy
. - Valid values:
string_commaSeparated
- Default value:
'0,0'
- Desctription: An offset of the icon in pixels (
-
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 for more information. - Valid values:
'en_US'
'ru_RU'
'ru_UA'
'uk_UA'
'tr_TR'
- Default value:
'ru_RU'
- Desctription: Map language — locale ID.
-
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`
]]