Hinode logo
  • About 
  • Docs 
  • Components 
  • Guides 
  • Releases 
  •  
  •    Toggle theme
    •   Light
    •   Dark
    •   Auto
  •  
    •   Light
    •   Dark
    •   Auto
Docs
    • Introduction
    • Commands
    • Hosting and deployment
    • Upgrading
    • Contribute
    • Troubleshooting
    • Content management
    • Content organization
    • Typography
    • Links and cross-references
    • Images and figures
    • Tables
    • Icons
    • Layout
    • Colors
    • Color modes
    • Fonts
    • Languages
    • Navigation
    • Documentation
    • Analytics
    • Modules
    • Abbr
    • Accordion
    • Alert
    • Animation
    • Badge
    • Breadcrumb
    • Button
    • Button group
    • Card
    • Card group
    • Carousel
    • Collapse
    • Command prompt
    • Docs
    • Example
    • File
    • Icon
    • Image
    • Kbd
    • Link
    • Map
    • Mark
    • Navbar
    • Navs and tabs
    • Release
    • Spinner
    • Spinner
    • Sub
    • Sup
    • Timeline
    • Toast
    • Tooltip
    • Overview
    • Styles
    • Scripts
    • Icons
    • Module development
    • Server headers
    • Server-side redirection
    • Credits
    • License
    • Introduction
    • Commands
    • Hosting and deployment
    • Upgrading
    • Contribute
    • Troubleshooting
    • Content management
    • Content organization
    • Typography
    • Links and cross-references
    • Images and figures
    • Tables
    • Icons
    • Layout
    • Colors
    • Color modes
    • Fonts
    • Languages
    • Navigation
    • Documentation
    • Analytics
    • Modules
    • Abbr
    • Accordion
    • Alert
    • Animation
    • Badge
    • Breadcrumb
    • Button
    • Button group
    • Card
    • Card group
    • Carousel
    • Collapse
    • Command prompt
    • Docs
    • Example
    • File
    • Icon
    • Image
    • Kbd
    • Link
    • Map
    • Mark
    • Navbar
    • Navs and tabs
    • Release
    • Spinner
    • Spinner
    • Sub
    • Sup
    • Timeline
    • Toast
    • Tooltip
    • Overview
    • Styles
    • Scripts
    • Icons
    • Module development
    • Server headers
    • Server-side redirection
    • Credits
    • License

Map

Share via
Hinode
Link copied to clipboard

Use the map shortcode to show an interactive map.

On this page
 

  • Overview
  • Arguments
  • Configuration
  • Examples
    • Zoom level
    • Center coordinates
    • Identification

Overview  

Added in v0.16.0  

Use the map shortcode to show an interactive map, powered by Leaflet  . The shortcode is a simplified wrapper of the Leaflet library that provides basic functionality. As an example, the following shortcode displays an interactive map of the city of Amsterdam.

markdown
  {{< map lat=52.377 long=4.90 popup="Amsterdam Central Station" popup-lat=52.378062 popup-long=4.900562 >}}

Arguments  

The shortcode supports the following arguments:

ArgumentRequiredDescription
idNoOptional unique id of the map element, e.g. leaflet-map-1.
classNoOptional class attribute of the inner panel element, defaults to ratio ratio-16x9 w-100 mx-auto.
latNoLatitude of the map center, defaults to 52.377.
longNoLongitude of the map center, defaults to 4.90.
zoomNoInitial map zoom level between 1 (minimum zoom) - 18 (maximum zoom), defaults to 13.
popupNoOptional text of a popup marker.
popup-latNoLatitude of the popup marker.
popup-longNoLongitude of the popup marker.

Configuration  

By default, map support is optional. Be sure to include leaflet in your module configuration and page frontmatter as needed.

Examples  

Change the location and style of your map with shortcode arguments.

Zoom level  

Set the zoom to a value of 1 to display a world map. The map is centered on Europe by default, adjust the lat and long values to set a different center.

markdown
{{< map zoom=1 >}}

Center coordinates  

Specify the map center by providing lat and long values. Add a marker to the map by specifying a popup text and popup-lat and popup-long coordinates. The following example display the city center of Amsterdam and adds a marker for the central train station.

markdown
{{< map lat=52.377 long=4.90 popup="Amsterdam Central Station" popup-lat=52.378062 popup-long=4.900562 >}}

Identification  

Assign a specific identified to the map by setting the id argument. The following example displays a map for the city of London with a unique id.

markdown
{{< map id="leaflet-map-london" lat=51.505 long=-0.09 zoom=10 >}}
Last updated: September 3, 2023 • Add leaflet configuration (6d7ce3d)
On this page
  • Overview
  • Arguments
  • Configuration
  • Examples
    • Zoom level
    • Center coordinates
    • Identification
Map
Map
Hinode is a clean documentation and blog theme for your Hugo site based on Bootstrap 5.
Code licensed MIT, docs CC BY-NC 4.0
Currently v0.21.0-beta9
 
Links
Home 
About 
Docs 
Components 
Releases 
Guides
Getting started 
Developing modules 
Optimization 
Versioning 
Community
Issues  
Discussions  
Contribute 
Hinode
Code copied to clipboard