Customize map with shortcode

If no map is declared, Lf Hiker creates a default map

  • with OpenStreetMap tiles,
  • the maximal width and 500 pixels height,
  • without border and effect.
  • the displayed buttons are «reset» and «fullscreen».
  • without zoom in/out trigger with mousewheel.
A map is declared with a shortcode [lfh-map].
All elements (markers or gpx tracks) declared after map declaration will be displayed on this map.
All elements declared before the map declaration will not be shown on another map.
The attribute must be separated by only one space.
You need escape special chars like hyphen in shortcode.

Example

[lfh-map lat=48.5720639570219 lng=4.574432373046876 zoom=9 class="thick\-border\-round right" autocenter=false fullscreen=true reset=true list=false mousewheel=false width=85 height=450 tile=stamen_water ]

All the attributes

  1. autocenter
  2. lat
  3. lng
  4. zoom
  5. width
  6. height
  7. class
  8. fullscreen
  9. reset
  10. list
  11. mousewheel
  12. tile
  13. open
  14. undermap

autocenter

  • values :
    1. true, let Lf Hiker determine the best position (center and zoom)
    2. false need you determine the value of the attributes lat, lng and zoom.
  • default : true
  • required: no

Example:

[lf-map autocenter=false lat=48.5720639570219 lng=4.574432373046876 zoom=9 ]

lat

  • values : float between -90 and 90, theorical
  • default : 48.866667, the latitude of Paris
  • required: no

lng

  • values : float between -180 and 180
  • default : 2.333333, the longitude of Paris
  • required: no

zoom

  • values : interger between 1 and 20 (the maximal zoom depends on tiles: 20 for OpenStreetMap French, 13 for watercolor tiles)
  • default : 13
  • required: no

width

  • values : interger between 30 and 100 (with step 5), percentage of article width
  • default : 100
  • required: no

height

  • values : interger between 100 and 1000 (with step 50), height in pixels
  • default : 500
  • required: no

class

Use the attribute class for customize map’s borders and its alignment.

  • values :
    1. simple\-border
    2. thick\-border
    3. simple\-border\-round
    4. thick\-border\-round
    5. left
    6. right
    7. center
    8. Your own class
    9. Combinaison of values separate by a space for example: thick\-border center
  • default : ''
  • required: no

Example:

[lf-map width=70 height=450 class="simple\-border\-round right" ]

fullscreen

  • values :
    1. true, display button «fullscreen»
    2. false
  • default : true
  • required: no

reset

  • values :
    1. true, display button «reset»
    2. false
  • default : true
  • required: no

list

  • values :
    1. true, display button «list» of elements markers and gpx tracks on map
    2. false
  • default : false
  • required: no

mousewheel

  • values :
    1. true, trigger zoom in/out on mousewheel
    2. false
  • default : true
  • required: no

tile

  • values :
    1. osm, OpenStreetMap tiles
    2. osm_fr, French OpenStreetMap, more detailed and francized names
    3. arcgis_topo, Topographic background with level lines (ARCGIS WORLD TOPOGRAPHIC)
    4. stamen_water, watercolor background (STAMEN WATERCOLOR)
    5. stamen_terrain, tiles with drawn relief (STAMEN TERRAIN)
    6. opentopomap, tiles with drawn relief(OPEN TOPO MAP)
  • default: osm
  • required: no

open

  • values :
    1. true, start with the profile elevation displayed
    2. false
  • default: following the plugin settings (ths plugin settings is false by default)
  • required: no

undermap

  • values :
    1. true, the description is always displayed under the map
    2. false, the description is displayed on or under the map according to map width
  • default: following the plugin settings (ths plugin settings is false by default)
  • required: no
This entry was posted in Tutorials. Bookmark the permalink.