Template:Zh OpenStreetMap Description Map: Difference between revisions

From Documentation
Jump to navigation Jump to search
Line 5: Line 5:


[[File:OSM-Map-List.png]]
[[File:OSM-Map-List.png]]




Line 15: Line 13:


=== Map properties ===
=== Map properties ===


[[File:OSM-Map-Detail-Map.png]]
[[File:OSM-Map-Detail-Map.png]]
Line 36: Line 33:
You can apply [[Zh Template Map FullScreen]] to your map page to show map in full screen or for the other cases</p>
You can apply [[Zh Template Map FullScreen]] to your map page to show map in full screen or for the other cases</p>
|}
|}


=== Map Details ===
=== Map Details ===


[[File:OSM-Map-Detail-Details-1.png]]
[[File:OSM-Map-Detail-Details-1.png]]
Line 93: Line 90:
|class="zhproperty"|Category||class="zhdescription"|The category that this map is assigned to
|class="zhproperty"|Category||class="zhdescription"|The category that this map is assigned to
|}
|}


=== Using KML Layer ===
=== Using KML Layer ===
Line 116: Line 114:
|class="zhproperty"|Show Header Separator||class="zhdescription"|Show Separator after Header HTML text
|class="zhproperty"|Show Header Separator||class="zhdescription"|Show Separator after Header HTML text
|}
|}




Line 130: Line 127:
|}
|}


=== Map Controls ===
There are three sliders in this section
[[File:OSM-Map-Detail-MapControls.png]]
The first slider is


[[File:OSM-Map-Detail-MapControls-1.png]]
[[File:OSM-Map-Detail-MapControls-1.png]]
[[File:OSM-Map-Detail-MapControls-2.png]]
{|class="zhpropertytable"
|-
|class="zhproperty"|Zoom Control||class="zhdescription"|The enabled/disabled state of the Zoom Control
|-
|class="zhproperty"|Scale Control||class="zhdescription"|The enabled/disabled state of the Scale Control
|-
|class="zhproperty"|Scale Control: Maximum width||class="zhdescription"|Maximum width of the control in pixels. The width is set dynamically to show round values (e.g. 100, 200, 500)
|-
|class="zhproperty"|Scale Control: metric||class="zhdescription"|Whether to show the metric scale line (m/km)
|-
|class="zhproperty"|Scale Control: imperial||class="zhdescription"|Whether to show the imperial scale line (mi/ft)
|-
|class="zhproperty"|Scale Control: update when idle||class="zhdescription"|If true, the control is updated on move end, otherwise it's always up-to-date (updated on move)
|-
|class="zhproperty"|Double Click Zoom||class="zhdescription"|Enables/disables zoom and center on double click
|-
|class="zhproperty"|Scroll Wheel Zoom||class="zhdescription"|The enabled/disabled state of the scrollwheel zooming on the map
|-
|class="zhproperty"|Home Button||class="zhdescription"|The enabled/disabled feature to reset map center and/or zoom to initial value
|-
|class="zhproperty"|Overlay Opacity||class="zhdescription"|The enabled/disabled feature to change opacity for Ground Overlays
|}




[[File:OSM-Map-Detail-MapControls-2.png]]
The second slider is




[[File:OSM-Map-Detail-MapControls-Geocoder.png]]
[[File:OSM-Map-Detail-MapControls-Geocoder.png]]


{|class="zhpropertytable"
|-
|class="zhproperty"|Geocoder Control||class="zhdescription"|The enabled/disabled state of the Geocoder Control
|-
|class="zhproperty"|Collapse Geocoder||class="zhdescription"|Collapse control unless hovered or clicked
|-
|class="zhproperty"|Provider||class="zhdescription"|Geocoding service used by the control to perform the actual geocoding queries
|}
The third slider is


[[File:OSM-Map-Detail-MapControls-Position-1.png]]
[[File:OSM-Map-Detail-MapControls-Position-1.png]]
[[File:OSM-Map-Detail-MapControls-Position-2.png]]




[[File:OSM-Map-Detail-MapControls-Position-2.png]]
{|class="zhpropertytable"
|-
|class="zhproperty"|Map Type Control||class="zhdescription"|Position on a map
|-
|class="zhproperty"|Zoom Control||class="zhdescription"|Position on a map
|-
|class="zhproperty"|Scale Control||class="zhdescription"|Position on a map
|-
|class="zhproperty"|Geolocation Control||class="zhdescription"|Position on a map
|-
|class="zhproperty"|Geocoder Control||class="zhdescription"|Position on a map
|-
|class="zhproperty"|Placemark List Button||class="zhdescription"|Position on a map
|-
|class="zhproperty"|Home Button||class="zhdescription"|Position on a map
|-
|class="zhproperty"|Overlay Opacity||class="zhdescription"|Position on a map
|}


=== Map Properties for Placemarks ===


[[File:OSM-Map-Detail-Placemarks-1.png]]
[[File:OSM-Map-Detail-Placemarks-1.png]]
Line 151: Line 212:
[[File:OSM-Map-Detail-Placemarks-2.png]]
[[File:OSM-Map-Detail-Placemarks-2.png]]


{|class="zhpropertytable"
|-
|class="zhproperty"|Placemark ordering||class="zhdescription"|Order placemarks. It is useful when you show placemark list
* '''Placemark title'''
* '''Category title and ordering'''
* '''Category title (descending) and ordering'''
* '''User ordering index'''
* '''Group title and Placemark title'''
* '''Group title (descending) and Placemark title'''
* '''Group user ordering index and Placemark title'''
* '''Group user ordering index (descending) and Placemark title'''
* '''Date of creation'''
* '''Date of creation (descending)'''
|-
|class="zhproperty"|Auto-center and auto-zoom||class="zhdescription"|Calculate and set zoom and map center to show all placemarks
|-
|class="zhproperty"|Show placemarks in cluster||class="zhdescription"|Create cluster for markers
|-
|class="zhproperty"|Marker Cluster Zoom Level||class="zhdescription"|Zoom Level on which Clusterer starts group markers
|-
|class="zhproperty"|Group Placemarks in Cluster by Group Property||class="zhdescription"|Create cluster for each marker group (and you can override cluster icon)<br />Remember, if you use this feature (without managing markers by group list), you have to activate group in cluster (by setting Active in Group List)
|-
|class="zhproperty"|Place overlapping placemarks on a spiral||class="zhdescription"|Enable feature to show overlapped placemarks on a spiral or create special list
|-
|class="zhproperty"|Zoom on cluster click||class="zhdescription"|Zoom map to fit cluster bounds
|-
|class="zhproperty"|Show cluster coverage||class="zhdescription"|When mouse over a cluster it shows the bounds of its markers
|-
|class="zhproperty"|Show placemark creation information||class="zhdescription"|You can show information about user and date of placemark creation<br />
* '''No'''
* '''Username'''
* '''Date of creation'''
* '''Date of creation and Username'''
* '''Username (after toolbar)'''
* '''Date of creation (after toolbar)'''
* '''Date of creation and Username (after toolbar)'''
|}
=== Map Properties for Placemark List ===


[[File:OSM-Map-Detail-PlacemarkList.png]]
[[File:OSM-Map-Detail-PlacemarkList.png]]


{|class="zhpropertytable"
|-
|class="zhproperty"|Width||class="zhdescription"|Placemark List Width in px<br />
<p class="zh-text-tip">If set 0 then you've got 100% width.<br />
It can be useful in bottom position and 100% map width</p>
|-
|class="zhproperty"|Height||class="zhdescription"|Placemark List Height in px
|-
|class="zhproperty"|Position||class="zhdescription"|Values<br />
* '''No''' - there is no placemark list
* ... - overlay on map
* '''Left''' and '''Right''' - table layout
* '''List-Map''' and '''Map-List''' - div layout
* '''External''' - you can put ul-tag with id=OMapsMarkerUL in your place to define your place to show placemark list<br />
For example,
<pre>
<ul id="OMapsMarkerUL" style="list-style-type: none;"></ul>
</pre>
|-
|class="zhproperty"|Style||class="zhdescription"|Values<br />
* '''Simple''' - predefined in CSS-file
* '''Advanced''' - predefined in CSS-file
* '''External''' - you can define it in your template
|-
|class="zhproperty"|Background Color||class="zhdescription"|Background Color<br />
Example: #EAEAEA<br />
As for gradient in my example, I've got it from internet sites. When you specify background color '''#E6E6E6''', I add into style line
<pre>
background: #E6E6E6
</pre>
I've got this example<br />
<pre>
background: #fefcea; /* For old browsers */
    background: -moz-linear-gradient(top, #fefcea, #f1da36); /* Firefox 3.6+ */
    /* Chrome 1-9, Safari 4-5 */
    background: -webkit-gradient(linear, left top, left bottom,
                color-stop(0%,#fefcea), color-stop(100%,#f1da36));
    /* Chrome 10+, Safari 5.1+ */
    background: -webkit-linear-gradient(top, #fefcea, #f1da36);
    background: -o-linear-gradient(top, #fefcea, #f1da36); /* Opera 11.10+ */
    background: -ms-linear-gradient(top, #fefcea, #f1da36); /* IE10 */
    background: linear-gradient(top, #fefcea, #f1da36); /* CSS3 */
    padding: 10px;
    border: 1px solid #333;
</pre>
I don't know is it true example, for all cases. But, for example, why not. I've replace start and end colors to mine. And, first '''background:''' we don't enter, because I do it.
And after all this is mine code <br />
<pre>
#E6E6E6; /* For old browsers */
    background: -moz-linear-gradient(top, #E6E6E6, #AAAAAA); /* Firefox 3.6+ */
    /* Chrome 1-9, Safari 4-5 */
    background: -webkit-gradient(linear, left top, left bottom,
                  color-stop(0%,#E6E6E6), color-stop(100%,#AAAAAA));
    /* Chrome 10+, Safari 5.1+ */
    background: -webkit-linear-gradient(top, #E6E6E6, #AAAAAA);
    background: -o-linear-gradient(top, #E6E6E6, #AAAAAA); /* Opera 11.10+ */
    background: -ms-linear-gradient(top, #E6E6E6, #AAAAAA); /* IE10 */
    background: linear-gradient(top, #E6E6E6, #AAAAAA); /* CSS3 */
    padding: 10px;
    border: 1px solid #333;
</pre>
I note that in IE9 there is no gradient. But it is not task to do it in my component by CSS. In any case you can do it by image and applying for class.
|-
|class="zhproperty"|Action by Click||class="zhdescription"|Action to do when you Click on link<br />
* '''Center''' - center map on placemark
* '''Click''' - execute click function for placemark
* '''Center and Click''' - center map on placemark and execute click function for placemark
* '''Center, Animate''' - center map on placemark and animate placemark icon
* '''Click, Animate''' - execute click function for placemark and animate placemark icon
* '''Center, Animate and Click''' - center map on placemark, animate placemark icon and execute click function for placemark
|-
|class="zhproperty"|Placemark List Content||class="zhdescription"|Text from which placemark list contains<br />
* '''Title''' - placemark title
* '''Title and Description''' - placemark title and desciption
* '''Title and Addition HTML text''' - placemark title and addition HTML text
* '''Icon and Title''' - placemark icon and title
* '''Icon, Title and Description'''
* '''Icon, Title and Addition HTML text''' - placemark icon, title and addition HTML text
* '''Icon, Title and Description (table)''' - table layout
* '''Icon, Title and Addition HTML text (table)''' - table layout
* '''Title and Image''' - placemark title and image (thumbnail)
* '''Title, Image and Description'''
* '''Title, Image and Addition HTML text'''
* '''Image and Title'''
* '''Image, Title and Description'''
* '''Image, Title and Addition HTML text'''
* '''Image, Title and Description (table)''' - table layout
* '''Image, Title and Addition HTML text (table)''' - table layout
* '''Table: Title''' - placemark title and table layout
* '''Table: Title and Description''' - placemark title and description and table layout
* '''Table: Title and Addition HTML text''' - placemark title and addition HTML text and table layout
|-
|class="zhproperty"|Appearance||class="zhdescription"|Appearance of placemark list<br />
* '''Open List''' - placemark list is opened
* '''Icon Button''' - additional icon button control on map
* '''Text Button''' - additional text button control on map
* '''Icon Button and Open List''' - additional icon button control on map and list is opened
* '''Text Button and Open List''' - additional text button control on map and list is opened
|-
|class="zhproperty"|Search placemark field||class="zhdescription"|Enable feature to search by autocomplete placemarks in placemark list
|}


=== Groups ===
[[File:OSM-Map-Detail-Groups-1.png]]
[[File:OSM-Map-Detail-Groups-1.png]]



Revision as of 15:14, 4 December 2019

Creating Map

We turn to the menu "Maps".



Enter the number of maps with the correct configuration for us.

Coordinates it is convenient to choose by dragging the marker (the value is automatically substituted in the form fields ) or by clicking the mouse on the desired location.


Map properties

Title Map title
Description Description
Latitude Map center Latitude
Longitude Map center Longitude
Width Map Width,

if set to 0, map will be 100% wide

Height Map Height

if set to 0, map will be 100% height.
You can apply Zh Template Map FullScreen to your map page to show map in full screen or for the other cases


Map Details



Show Title as Placemark Show map title as a placemark
  • No - Do not show marker
  • Simple - Marker without animation
  • Bounce - Marker with animation (Bounce)
  • Elastic Bounce - Marker with animation (Elastic Bounce)
Open Popup Open Popup for map title immediately
Disable AutoPan Disable AutoPan when open popup
Map Bounds Map bounds to protect navigation outside map

You have to enter Latitude1,Longitude1;Latitude2,Longitude2
ie pair of coordinates separated by semicolon and in one coordinate has values separated by comma
The first coordinate - left bottom, the second - right top of bounds

Zoom Initial Map Zoom
Min Zoom Min Zoom for Map
Max Zoom Max Zoom for Map
Draggable Enable/disable Map dragging
Map Type Initial Map Type
  • OpenStreetMap
  • Open TopoMap
  • First Custom Map Type
OpenStreetMap Layer The enabled/disabled state of the OpenStreetMap Layer and ability to use Map Type Control to switch to that layer
Open TopoMap Layer The enabled/disabled state of the Open TopoMap Layer and ability to use Map Type Control to switch to that layer
Allow Custom Map Types The enabled/disabled using custom map type and ability to use Map Type Control to switch to that layers
Custom Map Types List List of custom map types ID for using on map, separator ;

Example: 1;2;5
If you set Map Type to First Custom Map Type, then first ID will be default map type

KML Layer URL of the KML Layer, that would be displayed on the map
Language Language for map objects names

Example: ru-RU

Category The category that this map is assigned to


Using KML Layer

If you have KML-file, you can put into accessible folder on site and fill URL in map field KML Layer.

If you want to use more than one file, you can use "featute", that path field of Paths is not required

  • go to Paths tab
  • create path
  • fill KML Layer field

And after that new layer will be displayed


Map Header

Header HTML-text HTML text on top of the map
Show Header Separator Show Separator after Header HTML text


Map Footer

Show Footer Separator Show Separator before Footer HTML text
Footer HTML-text HTML text on bottom of the map


Map Controls

There are three sliders in this section

The first slider is


Zoom Control The enabled/disabled state of the Zoom Control
Scale Control The enabled/disabled state of the Scale Control
Scale Control: Maximum width Maximum width of the control in pixels. The width is set dynamically to show round values (e.g. 100, 200, 500)
Scale Control: metric Whether to show the metric scale line (m/km)
Scale Control: imperial Whether to show the imperial scale line (mi/ft)
Scale Control: update when idle If true, the control is updated on move end, otherwise it's always up-to-date (updated on move)
Double Click Zoom Enables/disables zoom and center on double click
Scroll Wheel Zoom The enabled/disabled state of the scrollwheel zooming on the map
Home Button The enabled/disabled feature to reset map center and/or zoom to initial value
Overlay Opacity The enabled/disabled feature to change opacity for Ground Overlays


The second slider is



Geocoder Control The enabled/disabled state of the Geocoder Control
Collapse Geocoder Collapse control unless hovered or clicked
Provider Geocoding service used by the control to perform the actual geocoding queries

The third slider is


Map Type Control Position on a map
Zoom Control Position on a map
Scale Control Position on a map
Geolocation Control Position on a map
Geocoder Control Position on a map
Placemark List Button Position on a map
Home Button Position on a map
Overlay Opacity Position on a map

Map Properties for Placemarks


Placemark ordering Order placemarks. It is useful when you show placemark list
  • Placemark title
  • Category title and ordering
  • Category title (descending) and ordering
  • User ordering index
  • Group title and Placemark title
  • Group title (descending) and Placemark title
  • Group user ordering index and Placemark title
  • Group user ordering index (descending) and Placemark title
  • Date of creation
  • Date of creation (descending)
Auto-center and auto-zoom Calculate and set zoom and map center to show all placemarks
Show placemarks in cluster Create cluster for markers
Marker Cluster Zoom Level Zoom Level on which Clusterer starts group markers
Group Placemarks in Cluster by Group Property Create cluster for each marker group (and you can override cluster icon)
Remember, if you use this feature (without managing markers by group list), you have to activate group in cluster (by setting Active in Group List)
Place overlapping placemarks on a spiral Enable feature to show overlapped placemarks on a spiral or create special list
Zoom on cluster click Zoom map to fit cluster bounds
Show cluster coverage When mouse over a cluster it shows the bounds of its markers
Show placemark creation information You can show information about user and date of placemark creation
  • No
  • Username
  • Date of creation
  • Date of creation and Username
  • Username (after toolbar)
  • Date of creation (after toolbar)
  • Date of creation and Username (after toolbar)

Map Properties for Placemark List

Width Placemark List Width in px

If set 0 then you've got 100% width.
It can be useful in bottom position and 100% map width

Height Placemark List Height in px
Position Values
  • No - there is no placemark list
  • ... - overlay on map
  • Left and Right - table layout
  • List-Map and Map-List - div layout
  • External - you can put ul-tag with id=OMapsMarkerUL in your place to define your place to show placemark list

For example,

<ul id="OMapsMarkerUL" style="list-style-type: none;"></ul>
Style Values
  • Simple - predefined in CSS-file
  • Advanced - predefined in CSS-file
  • External - you can define it in your template
Background Color Background Color

Example: #EAEAEA

As for gradient in my example, I've got it from internet sites. When you specify background color #E6E6E6, I add into style line

background: #E6E6E6

I've got this example

background: #fefcea; /* For old browsers */
    background: -moz-linear-gradient(top, #fefcea, #f1da36); /* Firefox 3.6+ */
    /* Chrome 1-9, Safari 4-5 */
    background: -webkit-gradient(linear, left top, left bottom, 
                color-stop(0%,#fefcea), color-stop(100%,#f1da36));
    /* Chrome 10+, Safari 5.1+ */
    background: -webkit-linear-gradient(top, #fefcea, #f1da36);
    background: -o-linear-gradient(top, #fefcea, #f1da36); /* Opera 11.10+ */
    background: -ms-linear-gradient(top, #fefcea, #f1da36); /* IE10 */
    background: linear-gradient(top, #fefcea, #f1da36); /* CSS3 */ 
    padding: 10px;
    border: 1px solid #333;


I don't know is it true example, for all cases. But, for example, why not. I've replace start and end colors to mine. And, first background: we don't enter, because I do it.

And after all this is mine code

#E6E6E6; /* For old browsers */
     background: -moz-linear-gradient(top, #E6E6E6, #AAAAAA); /* Firefox 3.6+ */
     /* Chrome 1-9, Safari 4-5 */
     background: -webkit-gradient(linear, left top, left bottom,
                  color-stop(0%,#E6E6E6), color-stop(100%,#AAAAAA));
     /* Chrome 10+, Safari 5.1+ */
     background: -webkit-linear-gradient(top, #E6E6E6, #AAAAAA);
     background: -o-linear-gradient(top, #E6E6E6, #AAAAAA); /* Opera 11.10+ */
     background: -ms-linear-gradient(top, #E6E6E6, #AAAAAA); /* IE10 */
     background: linear-gradient(top, #E6E6E6, #AAAAAA); /* CSS3 */
     padding: 10px;
     border: 1px solid #333;

I note that in IE9 there is no gradient. But it is not task to do it in my component by CSS. In any case you can do it by image and applying for class.

Action by Click Action to do when you Click on link
  • Center - center map on placemark
  • Click - execute click function for placemark
  • Center and Click - center map on placemark and execute click function for placemark
  • Center, Animate - center map on placemark and animate placemark icon
  • Click, Animate - execute click function for placemark and animate placemark icon
  • Center, Animate and Click - center map on placemark, animate placemark icon and execute click function for placemark
Placemark List Content Text from which placemark list contains
  • Title - placemark title
  • Title and Description - placemark title and desciption
  • Title and Addition HTML text - placemark title and addition HTML text
  • Icon and Title - placemark icon and title
  • Icon, Title and Description
  • Icon, Title and Addition HTML text - placemark icon, title and addition HTML text
  • Icon, Title and Description (table) - table layout
  • Icon, Title and Addition HTML text (table) - table layout
  • Title and Image - placemark title and image (thumbnail)
  • Title, Image and Description
  • Title, Image and Addition HTML text
  • Image and Title
  • Image, Title and Description
  • Image, Title and Addition HTML text
  • Image, Title and Description (table) - table layout
  • Image, Title and Addition HTML text (table) - table layout
  • Table: Title - placemark title and table layout
  • Table: Title and Description - placemark title and description and table layout
  • Table: Title and Addition HTML text - placemark title and addition HTML text and table layout
Appearance Appearance of placemark list
  • Open List - placemark list is opened
  • Icon Button - additional icon button control on map
  • Text Button - additional text button control on map
  • Icon Button and Open List - additional icon button control on map and list is opened
  • Text Button and Open List - additional text button control on map and list is opened
Search placemark field Enable feature to search by autocomplete placemarks in placemark list

Groups