Zh GoogleMap Plugin: Difference between revisions
mNo edit summary |
mNo edit summary |
||
(83 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
Plugin for component is created for inserting maps into articles. | Plugin for component is created for inserting maps into articles. | ||
All maps (not in plugin section), that you see in demo site was displayed as a component call, but '''All Features''' are supported in call as plugin. | |||
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 == | == Installation == | ||
Install the plugin in Extension Manager. | Install the plugin in Extension Manager. | ||
'''Make it active'''. | |||
<p class="zh-text-alert"> | |||
It is plugin for component, therefore component have to be installed | |||
</p> | |||
<p class="zh-text-info"> | |||
Plugin supports autoupdate feature | |||
</p> | |||
== Using == | == Using == | ||
Line 17: | Line 27: | ||
To show the map in an article, insert the following code | To show the map in an article, insert the following code | ||
<pre> | <pre> | ||
{zhgooglemap:MMM} | {zhgooglemap:MMM;Zoom;MapType;Width;Height} | ||
</pre> | |||
where | |||
* MMM - (required) map ID. It is displayed in a map list. | |||
* Zoom - new zoom of map, valid values | |||
** values from '''0''' to '''18''' to override zoom | |||
** '''do not change''' - do not change map zoom | |||
* MapType - new map type | |||
** ROADMAP | |||
** SATELLITE | |||
** HYBRID | |||
** TERRAIN | |||
** OSM | |||
** NZTOPOMAP | |||
** OPENTOPOMAP | |||
** '''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 Placemark === | |||
Also, you can show the map with only one specific placemark. To do this, insert the following call | |||
<pre> | |||
{zhgooglemap-marker:NNN;Center;Zoom;MapType;Width;Height;Action} | |||
</pre> | |||
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 '''0''' to '''18''' to override zoom | |||
** '''do not change''' - do not change map zoom | |||
* MapType - new map type | |||
** ROADMAP | |||
** SATELLITE | |||
** HYBRID | |||
** TERRAIN | |||
** OSM | |||
** NZTOPOMAP | |||
** OPENTOPOMAP | |||
** '''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 | |||
* Action - execute action when loaded map, you can enter comma separated values | |||
** '''do not change''' - do not execute anything | |||
** '''click''' - execute click action on placemark. | |||
** '''bounce''' - set bounce animation for placemark | |||
For action you have to set Center='''placemark''' | |||
<br /> | |||
Example 1:<br /> | |||
<code> | |||
{zhgooglemap-marker:5;placemark;10} | |||
</code> | |||
<br /> | |||
Example 2:<br /> | |||
<code> | |||
{zhgooglemap-marker:1;map;do not change} | |||
</code> | |||
<br /> | |||
Example 3:<br /> | |||
<code> | |||
{zhgooglemap-marker:4} | |||
</code> | |||
<br /> | |||
In this case | |||
* Center by default set to '''map''' | |||
* Zoom by default is set to '''do not change''' | |||
<br /> | |||
Example 4:<br /> | |||
<code> | |||
{zhgooglemap-marker:1;;15} | |||
</code> | |||
<br /> | |||
In this case | |||
* Center by default set to '''map''' | |||
* Zoom is set '''15''' | |||
=== Show Map by Route === | |||
Also, you can show the map with only one specific route. To do this, insert the following call | |||
<pre> | |||
{zhgooglemap-route:NNN;Center;Zoom;MapType;Width;Height} | |||
</pre> | </pre> | ||
where | where | ||
* | * NNN - (required) route ID | ||
* Center - new center of map (not used currently), valid values: | |||
** '''map''' | |||
** '''do not change''' - do not change map center | |||
* Zoom - new zoom of map, valid values | |||
** values from '''0''' to '''18''' to override zoom | |||
** '''do not change''' - do not change map zoom | |||
* MapType - new map type | |||
** ROADMAP | |||
** SATELLITE | |||
** HYBRID | |||
** TERRAIN | |||
** OSM | |||
** NZTOPOMAP | |||
** OPENTOPOMAP | |||
** '''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 | === Show Map by Path === | ||
Also, you can show the map with only one specific | Also, you can show the map with only one specific path. To do this, insert the following call | ||
<pre> | |||
{zhgooglemap-path:NNN;Center;Zoom;MapType;Width;Height} | |||
</pre> | |||
where | |||
* NNN - (required) path ID | |||
* Center - new center of map (not used currently), valid values: | |||
** '''map''' | |||
** '''do not change''' - do not change map center | |||
* Zoom - new zoom of map, valid values | |||
** values from '''0''' to '''18''' to override zoom | |||
** '''do not change''' - do not change map zoom | |||
* MapType - new map type | |||
** ROADMAP | |||
** SATELLITE | |||
** HYBRID | |||
** TERRAIN | |||
** OSM | |||
** NZTOPOMAP | |||
** OPENTOPOMAP | |||
** '''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 Placemark List === | |||
To show the map with placemarks from different maps (and this placemarks is specified by list) by the following call | |||
<pre> | <pre> | ||
{zhgooglemap- | {zhgooglemap-markerlist:PlacemarkList;MMM;Zoom;MapType;Width;Height;Center;Action} | ||
</pre> | </pre> | ||
where | where | ||
* | * PlacemarkList - (required) list of placemarks IDs, separated by comma | ||
* MMM - (required) map ID | |||
* Zoom - new zoom of map, valid values | |||
** values from '''0''' to '''18''' to override zoom | |||
** '''do not change''' - do not change map zoom | |||
* MapType - new map type | |||
** ROADMAP | |||
** SATELLITE | |||
** HYBRID | |||
** TERRAIN | |||
** OSM | |||
** NZTOPOMAP | |||
** OPENTOPOMAP | |||
** '''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 | |||
* Center - map center or placemark ID is new center of map, valid values: | |||
** placemark ID for center map by it. Placemark have to be defined by latitude and longitude | |||
** '''do not change''' - do not change map center | |||
* Action - execute action when loaded map, you can enter comma separated values | |||
** '''do not change''' - do not execute anything | |||
** '''click''' - execute click action on center placemark. | |||
** '''bounce''' - set bounce animation for center placemark | |||
In case using action you have to enter center placemark ID | |||
Example 1: | |||
=== Show map by Placemark Group === | <code> | ||
To show the map with | {zhgooglemap-markerlist:1,2,5;10} | ||
</code> | |||
<br /> | |||
In this case you'll see placemark with ID=1, with ID=2 and with ID=5 on map with ID=10 | |||
=== Show map by Placemark Group List === | |||
To show the map with placemarks from different maps (and this placemarks have a definite group) by the following call | |||
<pre> | <pre> | ||
{zhgooglemap-group: | {zhgooglemap-group:GroupList;MMM;Zoom;MapType;Width;Height;Center;Action;ObjectTypeList} | ||
</pre> | </pre> | ||
where | where | ||
* | * GroupList - (required) placemark group ID list, separated by comma | ||
* MMM - map ID | * MMM - (required) map ID | ||
* Zoom - new zoom of map, valid values | |||
** values from '''0''' to '''18''' to override zoom | |||
** '''do not change''' - do not change map zoom | |||
* MapType - new map type | |||
** ROADMAP | |||
** SATELLITE | |||
** HYBRID | |||
** TERRAIN | |||
** OSM | |||
** NZTOPOMAP | |||
** OPENTOPOMAP | |||
** '''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 | |||
* Center - set center of map | |||
** placemark ID for center map by it. Placemark have to be defined by latitude and longitude | |||
** '''do not change''' - do not change map center | |||
* Action - execute action when loaded map, you can enter comma separated values | |||
** '''do not change''' - do not execute anything | |||
** '''click''' - execute click action on center placemark. | |||
** '''bounce''' - set bounce animation for center placemark | |||
* ObjectTypeList - comma separated map object types, which have this groups and will show on map | |||
** '''placemark''' - process placemarks. It is default value | |||
** '''path''' - process paths | |||
** '''all''' - process all objects | |||
For example, you specify ObjectTypeList value as '''path''' to show only paths which have groups. | |||
Value '''all''' the same as '''placemark,path''' | |||
In case using action you have to enter center placemark ID | |||
=== Show Map by Category === | === Show Map by Category List === | ||
You can show the map with | You can show the map with placemarks from different maps by placemark category. To do this, insert the following call | ||
<pre> | <pre> | ||
{zhgooglemap-category: | {zhgooglemap-category:CategoryList;MMM;Zoom;MapType;Width;Height;Center;Action;ObjectTypeList} | ||
</pre> | </pre> | ||
where | where | ||
* | * CategoryList - (required) placemark category ID list, separated by comma | ||
* MMM - map ID | * MMM - (required) map ID | ||
* Zoom - new zoom of map, valid values | |||
** values from '''0''' to '''18''' to override zoom | |||
** '''do not change''' - do not change map zoom | |||
* MapType - new map type | |||
** ROADMAP | |||
** SATELLITE | |||
** HYBRID | |||
** TERRAIN | |||
** OSM | |||
** NZTOPOMAP | |||
** OPENTOPOMAP | |||
** '''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 | |||
* Center - set center of map | |||
** placemark ID for center map by it. Placemark have to be defined by latitude and longitude | |||
** '''do not change''' - do not change map center | |||
* Action - execute action when loaded map, you can enter comma separated values | |||
** '''do not change''' - do not execute anything | |||
** '''click''' - execute click action on center placemark. | |||
** '''bounce''' - set bounce animation for center placemark | |||
* ObjectTypeList - comma separated map object types, which have this categories and will show on map | |||
** '''placemark''' - process placemarks. It is default value | |||
** '''path''' - process paths | |||
** '''route''' - process routes | |||
** '''all''' - process all objects | |||
For example, you specify ObjectTypeList value as '''path''' to show only paths which have categories. | |||
Value '''all''' the same as '''placemark,path,route''' | |||
In case using action you have to enter center placemark ID | |||
=== Show Map in Lightbox === | === Show Map in Lightbox === | ||
To show the map in lightbox, insert the | To show the map in lightbox, insert the following code | ||
<pre> | <pre> | ||
{zhgooglemap-lightbox:MMM;Title;Width;Height} | {zhgooglemap-lightbox:MMM;Title;Width;Height;Image;PlacemarkList} | ||
</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 | ||
* Height – height of lightbox-window. | * Height – height of lightbox-window. | ||
* Image - filename of image, which can be displayed. | |||
Images you have to store in '''component''' asset folder, and specify only filename and extension | |||
<pre> | |||
administrator/components/com_zhgooglemap/assets/lightbox/ | |||
</pre> | |||
or | |||
<pre> | |||
components/com_zhgooglemap/assets/lightbox/ | |||
</pre> | |||
depends on component option "Compatible Mode for Resource Files" | |||
* PlacemarkList - list of placemarks IDs, separated by comma | |||
<p class="zh-text-alert-fill"> | |||
It is restriction to use some symbols. You must not use in title this symbols | It is restriction to use some symbols. You must not use in title this symbols | ||
< | <br /> | ||
< > / \ | < > / \ | ||
</ | <br /> | ||
</p> | |||
Map is displaying as component, not as plugin. I.e. the plugin calls the component. | Map is displaying as component, not as plugin. I.e. the plugin calls the component. | ||
There is one specialty. CSS from template not loaded. | There is one specialty. CSS from template not loaded. | ||
Example 1: | |||
{zhgooglemap-lightbox:2;;800;500;ZhukLogo.png} | |||
* In this case link title is not displayed, just only image. | |||
If you don't set title and image - there is default text is displayed as title. | |||
== Restrictions == | |||
<p class="zh-text-alert"> | |||
'''Plugin does not work in contacts, because of a contact has type, that differs from "content"'''<br /> | |||
But you have opportunity write article like contact page, as you like, and include map<br /> | |||
Or you can use module in this case | |||
</p> | |||
<p class="zh-text-alert"> | |||
It is plugin for component, therefore component have to be installed | |||
</p> | |||
<p class="zh-text-alert"> | |||
It is restriction to use some symbols. You must not use this symbols in text values | |||
<br /> | |||
< > / \ | |||
<br /> | |||
</p> | |||
== See also == | |||
{{Icon_see_also}}[[Zh_GoogleMap_Description|Detail component description]] | |||
{{Icon_see_also}}[[Zh_GoogleMap_Module|Module for component]] | |||
{{Languages}} | {{Languages|Zh_GoogleMap_Plugin}} | ||
[[Category:Zh GoogleMap]] | [[Category:Zh GoogleMap|Plugin]] |
Latest revision as of 13:29, 11 December 2020
Purpose
Plugin for component is created for inserting maps into articles.
All maps (not in plugin section), that you see in demo site was displayed as a component call, but All Features are supported in call as plugin.
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.
It is plugin for component, therefore component have to be installed
Plugin supports autoupdate feature
Using
Show Map
To show the map in an article, insert the following code
{zhgooglemap:MMM;Zoom;MapType;Width;Height}
where
- MMM - (required) map ID. It is displayed in a map list.
- Zoom - new zoom of map, valid values
- values from 0 to 18 to override zoom
- do not change - do not change map zoom
- MapType - new map type
- ROADMAP
- SATELLITE
- HYBRID
- TERRAIN
- OSM
- NZTOPOMAP
- OPENTOPOMAP
- 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 Placemark
Also, you can show the map with only one specific placemark. To do this, insert the following call
{zhgooglemap-marker:NNN;Center;Zoom;MapType;Width;Height;Action}
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 0 to 18 to override zoom
- do not change - do not change map zoom
- MapType - new map type
- ROADMAP
- SATELLITE
- HYBRID
- TERRAIN
- OSM
- NZTOPOMAP
- OPENTOPOMAP
- 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
- Action - execute action when loaded map, you can enter comma separated values
- do not change - do not execute anything
- click - execute click action on placemark.
- bounce - set bounce animation for placemark
For action you have to set Center=placemark
Example 1:
{zhgooglemap-marker:5;placemark;10}
Example 2:
{zhgooglemap-marker:1;map;do not change}
Example 3:
{zhgooglemap-marker:4}
In this case
- Center by default set to map
- Zoom by default is set to do not change
Example 4:
{zhgooglemap-marker:1;;15}
In this case
- Center by default set to map
- Zoom is set 15
Show Map by Route
Also, you can show the map with only one specific route. To do this, insert the following call
{zhgooglemap-route:NNN;Center;Zoom;MapType;Width;Height}
where
- NNN - (required) route ID
- Center - new center of map (not used currently), valid values:
- map
- do not change - do not change map center
- Zoom - new zoom of map, valid values
- values from 0 to 18 to override zoom
- do not change - do not change map zoom
- MapType - new map type
- ROADMAP
- SATELLITE
- HYBRID
- TERRAIN
- OSM
- NZTOPOMAP
- OPENTOPOMAP
- 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 Path
Also, you can show the map with only one specific path. To do this, insert the following call
{zhgooglemap-path:NNN;Center;Zoom;MapType;Width;Height}
where
- NNN - (required) path ID
- Center - new center of map (not used currently), valid values:
- map
- do not change - do not change map center
- Zoom - new zoom of map, valid values
- values from 0 to 18 to override zoom
- do not change - do not change map zoom
- MapType - new map type
- ROADMAP
- SATELLITE
- HYBRID
- TERRAIN
- OSM
- NZTOPOMAP
- OPENTOPOMAP
- 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 Placemark List
To show the map with placemarks from different maps (and this placemarks is specified by list) by the following call
{zhgooglemap-markerlist:PlacemarkList;MMM;Zoom;MapType;Width;Height;Center;Action}
where
- PlacemarkList - (required) list of placemarks IDs, separated by comma
- MMM - (required) map ID
- Zoom - new zoom of map, valid values
- values from 0 to 18 to override zoom
- do not change - do not change map zoom
- MapType - new map type
- ROADMAP
- SATELLITE
- HYBRID
- TERRAIN
- OSM
- NZTOPOMAP
- OPENTOPOMAP
- 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
- Center - map center or placemark ID is new center of map, valid values:
- placemark ID for center map by it. Placemark have to be defined by latitude and longitude
- do not change - do not change map center
- Action - execute action when loaded map, you can enter comma separated values
- do not change - do not execute anything
- click - execute click action on center placemark.
- bounce - set bounce animation for center placemark
In case using action you have to enter center placemark ID
Example 1:
{zhgooglemap-markerlist:1,2,5;10}
In this case you'll see placemark with ID=1, with ID=2 and with ID=5 on map with ID=10
Show map by Placemark Group List
To show the map with placemarks from different maps (and this placemarks have a definite group) by the following call
{zhgooglemap-group:GroupList;MMM;Zoom;MapType;Width;Height;Center;Action;ObjectTypeList}
where
- GroupList - (required) placemark group ID list, separated by comma
- MMM - (required) map ID
- Zoom - new zoom of map, valid values
- values from 0 to 18 to override zoom
- do not change - do not change map zoom
- MapType - new map type
- ROADMAP
- SATELLITE
- HYBRID
- TERRAIN
- OSM
- NZTOPOMAP
- OPENTOPOMAP
- 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
- Center - set center of map
- placemark ID for center map by it. Placemark have to be defined by latitude and longitude
- do not change - do not change map center
- Action - execute action when loaded map, you can enter comma separated values
- do not change - do not execute anything
- click - execute click action on center placemark.
- bounce - set bounce animation for center placemark
- ObjectTypeList - comma separated map object types, which have this groups and will show on map
- placemark - process placemarks. It is default value
- path - process paths
- all - process all objects
For example, you specify ObjectTypeList value as path to show only paths which have groups.
Value all the same as placemark,path
In case using action you have to enter center placemark ID
Show Map by Category List
You can show the map with placemarks from different maps by placemark category. To do this, insert the following call
{zhgooglemap-category:CategoryList;MMM;Zoom;MapType;Width;Height;Center;Action;ObjectTypeList}
where
- CategoryList - (required) placemark category ID list, separated by comma
- MMM - (required) map ID
- Zoom - new zoom of map, valid values
- values from 0 to 18 to override zoom
- do not change - do not change map zoom
- MapType - new map type
- ROADMAP
- SATELLITE
- HYBRID
- TERRAIN
- OSM
- NZTOPOMAP
- OPENTOPOMAP
- 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
- Center - set center of map
- placemark ID for center map by it. Placemark have to be defined by latitude and longitude
- do not change - do not change map center
- Action - execute action when loaded map, you can enter comma separated values
- do not change - do not execute anything
- click - execute click action on center placemark.
- bounce - set bounce animation for center placemark
- ObjectTypeList - comma separated map object types, which have this categories and will show on map
- placemark - process placemarks. It is default value
- path - process paths
- route - process routes
- all - process all objects
For example, you specify ObjectTypeList value as path to show only paths which have categories.
Value all the same as placemark,path,route
In case using action you have to enter center placemark ID
Show Map in Lightbox
To show the map in lightbox, insert the following code
{zhgooglemap-lightbox:MMM;Title;Width;Height;Image;PlacemarkList}
where
- MMM – (required) map id
- Title – title on link
- Width – width of lightbox-window
- Height – height of lightbox-window.
- Image - filename of image, which can be displayed.
Images you have to store in component asset folder, and specify only filename and extension
administrator/components/com_zhgooglemap/assets/lightbox/
or
components/com_zhgooglemap/assets/lightbox/
depends on component option "Compatible Mode for Resource Files"
- PlacemarkList - list of placemarks IDs, separated by comma
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.
Example 1:
{zhgooglemap-lightbox:2;;800;500;ZhukLogo.png}
- In this case link title is not displayed, just only image.
If you don't set title and image - there is default text is displayed as title.
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
Or you can use module in this case
It is plugin for component, therefore component have to be installed
It is restriction to use some symbols. You must not use this symbols in text values
< > / \
See also
Language: | English • русский |
---|