Zh YandexMap Plugin: Difference between revisions

From Documentation
Jump to navigation Jump to search
mNo edit summary
Line 21: Line 21:
</pre>
</pre>
where  
where  
* MMM - map ID. It is displayed in a map list.
* MMM - (required) map ID. It is displayed in a map list.




Line 28: Line 28:
Also, you can show the map with only one specific marker. To do this, insert the following call  
Also, you can show the map with only one specific marker. To do this, insert the following call  
<pre>
<pre>
{zhyandexmap-marker:NNN;Center;Zoom}
{zhyandexmap-marker:NNN;Center;Zoom;MapType;Width;Height}
</pre>
</pre>
where  
where  
* NNN - placemark ID
* NNN - (required) placemark ID
* Center - map center or placemark is new center of map, valid values:
* Center - map center or placemark is new center of map, valid values:
** '''map'''
** '''map'''
Line 39: Line 39:
** '''do not change''' - do not change map zoom
** '''do not change''' - do not change map zoom
** '''max available''' - max available for current map type
** '''max available''' - max available for current map type
* MapType - new map type
** ROADMAP
** SATELLITE
** HYBRID
** TERRAIN
** OSM
** '''do not change''' - do not change map type
* Width - new map width
** width value in pixels
** '''do not change''' - do not change map width
* Height - new map height
** height value in pixels
** '''do not change''' - do not change map height
<br />
<br />


Line 79: Line 92:
To show the map with markers from different maps with markers, which have a definite group) by the following call  
To show the map with markers from different maps with markers, which have a definite group) by the following call  
<pre>
<pre>
{zhyandexmap-group:NNN;MMM}
{zhyandexmap-group:NNN;MMM;Zoom;MapType;Width;Height}
</pre>
</pre>
where  
where  
* NNN - marker group ID
* NNN - (required) marker group ID
* MMM - map ID
* MMM - (required) map ID
* Zoom - new zoom of map, valid values
** values from '''1''' to '''17''' to override zoom
** '''do not change''' - do not change map zoom
** '''max available''' - max available for current map type
* MapType - new map type
** ROADMAP
** SATELLITE
** HYBRID
** TERRAIN
** OSM
** '''do not change''' - do not change map type
* Width - new map width
** width value in pixels
** '''do not change''' - do not change map width
* Height - new map height
** height value in pixels
** '''do not change''' - do not change map height




Line 90: Line 120:
You can show the map with markers from different maps by marker category. To do this, insert the following call  
You can show the map with markers from different maps by marker category. To do this, insert the following call  
<pre>
<pre>
{zhyandexmap-category:NNN;MMM}
{zhyandexmap-category:NNN;MMM;Zoom;MapType;Width;Height}
</pre>
</pre>
where  
where  
* NNN - marker category ID
* NNN - (required) marker category ID
* MMM - map ID
* MMM - (required) map ID
* Zoom - new zoom of map, valid values
** values from '''1''' to '''17''' to override zoom
** '''do not change''' - do not change map zoom
** '''max available''' - max available for current map type
* MapType - new map type
** ROADMAP
** SATELLITE
** HYBRID
** TERRAIN
** OSM
** '''do not change''' - do not change map type
* Width - new map width
** width value in pixels
** '''do not change''' - do not change map width
* Height - new map height
** height value in pixels
** '''do not change''' - do not change map height


<p class="text-alert">
<p class="text-alert">
Line 106: Line 153:
</pre>
</pre>
where
where
* MMM – map id
* MMM – (required) map id
* Title – title on link
* Title – title on link
* Width – width of lightbox-window
* Width – width of lightbox-window

Revision as of 13:38, 2 December 2011

Purpose

Plugin for component is created for inserting maps into articles.

Moreover, since it is a plugin for the content (type is content), then you can insert code to call in the Custom HTML module and display the map as a module. It is recommended to put width=0 (which corresponds to the width: 100%), in order to map automatically fills the width of the module, and is resized (eg, a variable template size) and did not occur map oversizing.


Installation

Install the plugin in Extension Manager. Make it active.


Using

Show Map

To show the map in an article, insert the following code

{zhyandexmap:MMM}

where

  • MMM - (required) map ID. It is displayed in a map list.


Show Map by Placemark

Also, you can show the map with only one specific marker. To do this, insert the following call

{zhyandexmap-marker:NNN;Center;Zoom;MapType;Width;Height}

where

  • NNN - (required) placemark ID
  • Center - map center or placemark is new center of map, valid values:
    • map
    • placemark
  • Zoom - new zoom of map, valid values
    • values from 1 to 17 to override zoom
    • do not change - do not change map zoom
    • max available - max available for current map type
  • MapType - new map type
    • ROADMAP
    • SATELLITE
    • HYBRID
    • TERRAIN
    • OSM
    • do not change - do not change map type
  • Width - new map width
    • width value in pixels
    • do not change - do not change map width
  • Height - new map height
    • height value in pixels
    • do not change - do not change map height



Example 1:
{zhyandexmap-marker:5;placemark;10}


Example 2:
{zhyandexmap-marker:1;map;do not change}


Example 3:
{zhyandexmap-marker:4}
In this case

  • Center by default set to map
  • Zoom by default is set to do not change



Example 4:
{zhyandexmap-marker:1;;15}
In this case

  • Center by default set to map
  • Zoom is set 15

Show map by Placemark Group

To show the map with markers from different maps with markers, which have a definite group) by the following call

{zhyandexmap-group:NNN;MMM;Zoom;MapType;Width;Height}

where

  • NNN - (required) marker group ID
  • MMM - (required) map ID
  • Zoom - new zoom of map, valid values
    • values from 1 to 17 to override zoom
    • do not change - do not change map zoom
    • max available - max available for current map type
  • MapType - new map type
    • ROADMAP
    • SATELLITE
    • HYBRID
    • TERRAIN
    • OSM
    • do not change - do not change map type
  • Width - new map width
    • width value in pixels
    • do not change - do not change map width
  • Height - new map height
    • height value in pixels
    • do not change - do not change map height


Show Map by Category

You can show the map with markers from different maps by marker category. To do this, insert the following call

{zhyandexmap-category:NNN;MMM;Zoom;MapType;Width;Height}

where

  • NNN - (required) marker category ID
  • MMM - (required) map ID
  • Zoom - new zoom of map, valid values
    • values from 1 to 17 to override zoom
    • do not change - do not change map zoom
    • max available - max available for current map type
  • MapType - new map type
    • ROADMAP
    • SATELLITE
    • HYBRID
    • TERRAIN
    • OSM
    • do not change - do not change map type
  • Width - new map width
    • width value in pixels
    • do not change - do not change map width
  • Height - new map height
    • height value in pixels
    • do not change - do not change map height

When you show map by category, all objects on map (placemarks, routes, paths) is filtered by this category.

Show Map in Lightbox

To show the map in lightbox, insert the follewing code

{zhyandexmap-lightbox:MMM;Title;Width;Height}

where

  • MMM – (required) map id
  • Title – title on link
  • Width – width of lightbox-window
  • Height – height of lightbox-window.

It is restriction to use some symbols. You must not use in title this symbols
< > / \


Map is displaying as component, not as plugin. I.e. the plugin calls the component. There is one specialty. CSS from template not loaded.

Restrictions

Plugin does not work in contacts, because of a contact has type, that differs from "content"
But you have opportunity write article like contact page, as you like, and include map

It is plugin for component, therefore component have to be installed

See also

Detail component description


Language: [[::Zh YandexMap Plugin|English]]  • [[::Zh YandexMap Plugin/ru|русский]]