File tree Expand file tree Collapse file tree 6 files changed +19
-17
lines changed
exampleSite/content/docs/shortcodes Expand file tree Collapse file tree 6 files changed +19
-17
lines changed Original file line number Diff line number Diff line change 2424 const mapWidth = script ?. getAttribute ( "data-map-width" ) ;
2525
2626 const mapElement = document . getElementById ( mapId ) ;
27+ mapElement . style . maxHeight = "100vh" ;
2728 mapElement . style . height = mapHeight ;
29+ mapElement . style . maxWidth = "80vw" ;
2830 mapElement . style . width = mapWidth ;
2931
3032 const map = L . map ( mapId ) . setView ( [ mapCenterX , mapCenterY ] , defaultZoom ) ;
Original file line number Diff line number Diff line change @@ -572,18 +572,18 @@ When life gives you lemons, make lemonade.
572572| ` copyrightName ` | Optional string with URL that sets the copyright text, default is ` "OpenStreetMap Contributors" ` |
573573| ` markerX ` | Optional float value with a coordinate (Longitude) for an optional marker in the map, for example ` 40.689272 ` |
574574| ` markerY ` | Optional float value with a coordinate (Latitude) for an optional marker in the map, for example ` -74.044512 ` |
575- | ` markerTooltip ` | Optional string with text for a marker tooltip, for example ` "Statue of Liberty" ` |
576- | ` mapHeight ` | Optional string with height of the map element, default is ` "600px " ` |
575+ | ` markerTooltip ` | Optional string with text for a marker tooltip, for example ` "The Statue of Liberty" ` |
576+ | ` mapHeight ` | Optional string with height of the map element, default is ` "400px " ` |
577577| ` mapWidth ` | Optional string with width of the map element, default is equal to ` mapHeight ` |
578578<!-- prettier-ignore-end -->
579579
580580** Example:**
581581
582582``` md
583- {{</* leaflet centerMapElement=true mapCenterX=40.690136 mapCenterY=-74.045301 defaultZoom=18 tileBaseURL="https://tile.openstreetmap.org " minZoom=10 maxZoom=18 copyrightURL="https://openstreetmap.org/copyright " copyrightName="OpenStreetMap Contributors" markerX=40.689272 markerY=-74.044512 markerTooltip="Statue of Liberty" mapHeight="550px " mapWidth="600px " * />}}
583+ {{</* leaflet centerMapElement=true mapCenterX=40.690136 mapCenterY=-74.045301 defaultZoom=18 tileBaseURL="https://tile.openstreetmap.org " minZoom=10 maxZoom=18 copyrightURL="https://openstreetmap.org/copyright " copyrightName="OpenStreetMap Contributors" markerX=40.689272 markerY=-74.044512 markerTooltip="The Statue of Liberty" mapHeight="400px " mapWidth="400px " * />}}
584584```
585585
586- {{< leaflet centerMapElement=true mapCenterX=40.690136 mapCenterY=-74.045301 defaultZoom=18 tileBaseURL="https://tile.openstreetmap.org " minZoom=10 maxZoom=18 copyrightURL="https://openstreetmap.org/copyright " copyrightName="OpenStreetMap Contributors" markerX=40.689272 markerY=-74.044512 markerTooltip="Statue of Liberty" mapHeight="550px " mapWidth="600px " >}}
586+ {{< leaflet centerMapElement=true mapCenterX=40.690136 mapCenterY=-74.045301 defaultZoom=18 tileBaseURL="https://tile.openstreetmap.org " minZoom=10 maxZoom=18 copyrightURL="https://openstreetmap.org/copyright " copyrightName="OpenStreetMap Contributors" markerX=40.689272 markerY=-74.044512 markerTooltip="The Statue of Liberty" mapHeight="400px " mapWidth="400px " >}}
587587
588588<br /><br /><br />
589589
Original file line number Diff line number Diff line change @@ -569,18 +569,18 @@ Blowfish も、標準の Markdown 構文を使用して含まれる画像の自
569569| ` copyrightName ` | Optional string with URL that sets the copyright text, default is ` "OpenStreetMap Contributors" ` |
570570| ` markerX ` | Optional float value with a coordinate (Longitude) for an optional marker in the map, for example ` 40.689272 ` |
571571| ` markerY ` | Optional float value with a coordinate (Latitude) for an optional marker in the map, for example ` -74.044512 ` |
572- | ` markerTooltip ` | Optional string with text for a marker tooltip, for example ` "Statue of Liberty" ` |
573- | ` mapHeight ` | Optional string with height of the map element, default is ` "600px " ` |
572+ | ` markerTooltip ` | Optional string with text for a marker tooltip, for example ` "The Statue of Liberty" ` |
573+ | ` mapHeight ` | Optional string with height of the map element, default is ` "400px " ` |
574574| ` mapWidth ` | Optional string with width of the map element, default is equal to ` mapHeight ` |
575575<!-- prettier-ignore-end -->
576576
577577** Example:**
578578
579579``` md
580- {{</* leaflet centerMapElement=true mapCenterX=40.690136 mapCenterY=-74.045301 defaultZoom=18 tileBaseURL="https://tile.openstreetmap.org " minZoom=10 maxZoom=18 copyrightURL="https://openstreetmap.org/copyright " copyrightName="OpenStreetMap Contributors" markerX=40.689272 markerY=-74.044512 markerTooltip="Statue of Liberty" mapHeight="550px " mapWidth="600px " * />}}
580+ {{</* leaflet centerMapElement=true mapCenterX=40.690136 mapCenterY=-74.045301 defaultZoom=18 tileBaseURL="https://tile.openstreetmap.org " minZoom=10 maxZoom=18 copyrightURL="https://openstreetmap.org/copyright " copyrightName="OpenStreetMap Contributors" markerX=40.689272 markerY=-74.044512 markerTooltip="The Statue of Liberty" mapHeight="400px " mapWidth="400px " * />}}
581581```
582582
583- {{< leaflet centerMapElement=true mapCenterX=40.690136 mapCenterY=-74.045301 defaultZoom=18 tileBaseURL="https://tile.openstreetmap.org " minZoom=10 maxZoom=18 copyrightURL="https://openstreetmap.org/copyright " copyrightName="OpenStreetMap Contributors" markerX=40.689272 markerY=-74.044512 markerTooltip="Statue of Liberty" mapHeight="550px " mapWidth="600px " >}}
583+ {{< leaflet centerMapElement=true mapCenterX=40.690136 mapCenterY=-74.045301 defaultZoom=18 tileBaseURL="https://tile.openstreetmap.org " minZoom=10 maxZoom=18 copyrightURL="https://openstreetmap.org/copyright " copyrightName="OpenStreetMap Contributors" markerX=40.689272 markerY=-74.044512 markerTooltip="The Statue of Liberty" mapHeight="400px " mapWidth="400px " >}}
584584
585585<br /><br /><br />
586586
Original file line number Diff line number Diff line change @@ -576,18 +576,18 @@ When life gives you lemons, make lemonade.
576576| ` copyrightName ` | Optional string with URL that sets the copyright text, default is ` "OpenStreetMap Contributors" ` |
577577| ` markerX ` | Optional float value with a coordinate (Longitude) for an optional marker in the map, for example ` 40.689272 ` |
578578| ` markerY ` | Optional float value with a coordinate (Latitude) for an optional marker in the map, for example ` -74.044512 ` |
579- | ` markerTooltip ` | Optional string with text for a marker tooltip, for example ` "Statue of Liberty" ` |
580- | ` mapHeight ` | Optional string with height of the map element, default is ` "600px " ` |
579+ | ` markerTooltip ` | Optional string with text for a marker tooltip, for example ` "The Statue of Liberty" ` |
580+ | ` mapHeight ` | Optional string with height of the map element, default is ` "400px " ` |
581581| ` mapWidth ` | Optional string with width of the map element, default is equal to ` mapHeight ` |
582582<!-- prettier-ignore-end -->
583583
584584** Example:**
585585
586586``` md
587- {{</* leaflet centerMapElement=true mapCenterX=40.690136 mapCenterY=-74.045301 defaultZoom=18 tileBaseURL="https://tile.openstreetmap.org " minZoom=10 maxZoom=18 copyrightURL="https://openstreetmap.org/copyright " copyrightName="OpenStreetMap Contributors" markerX=40.689272 markerY=-74.044512 markerTooltip="Statue of Liberty" mapHeight="550px " mapWidth="600px " * />}}
587+ {{</* leaflet centerMapElement=true mapCenterX=40.690136 mapCenterY=-74.045301 defaultZoom=18 tileBaseURL="https://tile.openstreetmap.org " minZoom=10 maxZoom=18 copyrightURL="https://openstreetmap.org/copyright " copyrightName="OpenStreetMap Contributors" markerX=40.689272 markerY=-74.044512 markerTooltip="The Statue of Liberty" mapHeight="400px " mapWidth="400px " * />}}
588588```
589589
590- {{< leaflet centerMapElement=true mapCenterX=40.690136 mapCenterY=-74.045301 defaultZoom=18 tileBaseURL="https://tile.openstreetmap.org " minZoom=10 maxZoom=18 copyrightURL="https://openstreetmap.org/copyright " copyrightName="OpenStreetMap Contributors" markerX=40.689272 markerY=-74.044512 markerTooltip="Statue of Liberty" mapHeight="550px " mapWidth="600px " >}}
590+ {{< leaflet centerMapElement=true mapCenterX=40.690136 mapCenterY=-74.045301 defaultZoom=18 tileBaseURL="https://tile.openstreetmap.org " minZoom=10 maxZoom=18 copyrightURL="https://openstreetmap.org/copyright " copyrightName="OpenStreetMap Contributors" markerX=40.689272 markerY=-74.044512 markerTooltip="The Statue of Liberty" mapHeight="400px " mapWidth="400px " >}}
591591
592592<br /><br /><br />
593593
Original file line number Diff line number Diff line change @@ -555,18 +555,18 @@ When life gives you lemons, make lemonade.
555555| ` copyrightName ` | Optional string with URL that sets the copyright text, default is ` "OpenStreetMap Contributors" ` |
556556| ` markerX ` | Optional float value with a coordinate (Longitude) for an optional marker in the map, for example ` 40.689272 ` |
557557| ` markerY ` | Optional float value with a coordinate (Latitude) for an optional marker in the map, for example ` -74.044512 ` |
558- | ` markerTooltip ` | Optional string with text for a marker tooltip, for example ` "Statue of Liberty" ` |
559- | ` mapHeight ` | Optional string with height of the map element, default is ` "600px " ` |
558+ | ` markerTooltip ` | Optional string with text for a marker tooltip, for example ` "The Statue of Liberty" ` |
559+ | ` mapHeight ` | Optional string with height of the map element, default is ` "400px " ` |
560560| ` mapWidth ` | Optional string with width of the map element, default is equal to ` mapHeight ` |
561561<!-- prettier-ignore-end -->
562562
563563** Example:**
564564
565565``` md
566- {{</* leaflet centerMapElement=true mapCenterX=40.690136 mapCenterY=-74.045301 defaultZoom=18 tileBaseURL="https://tile.openstreetmap.org " minZoom=10 maxZoom=18 copyrightURL="https://openstreetmap.org/copyright " copyrightName="OpenStreetMap Contributors" markerX=40.689272 markerY=-74.044512 markerTooltip="Statue of Liberty" mapHeight="550px " mapWidth="600px " * />}}
566+ {{</* leaflet centerMapElement=true mapCenterX=40.690136 mapCenterY=-74.045301 defaultZoom=18 tileBaseURL="https://tile.openstreetmap.org " minZoom=10 maxZoom=18 copyrightURL="https://openstreetmap.org/copyright " copyrightName="OpenStreetMap Contributors" markerX=40.689272 markerY=-74.044512 markerTooltip="The Statue of Liberty" mapHeight="400px " mapWidth="400px " * />}}
567567```
568568
569- {{< leaflet centerMapElement=true mapCenterX=40.690136 mapCenterY=-74.045301 defaultZoom=18 tileBaseURL="https://tile.openstreetmap.org " minZoom=10 maxZoom=18 copyrightURL="https://openstreetmap.org/copyright " copyrightName="OpenStreetMap Contributors" markerX=40.689272 markerY=-74.044512 markerTooltip="Statue of Liberty" mapHeight="550px " mapWidth="600px " >}}
569+ {{< leaflet centerMapElement=true mapCenterX=40.690136 mapCenterY=-74.045301 defaultZoom=18 tileBaseURL="https://tile.openstreetmap.org " minZoom=10 maxZoom=18 copyrightURL="https://openstreetmap.org/copyright " copyrightName="OpenStreetMap Contributors" markerX=40.689272 markerY=-74.044512 markerTooltip="The Statue of Liberty" mapHeight="400px " mapWidth="400px " >}}
570570
571571<br /><br /><br />
572572
Original file line number Diff line number Diff line change 2020{{ $markerY := .Get "markerY" }}
2121{{ $markerTooltip := .Get "markerTooltip" }}
2222
23- {{ $mapHeight := .Get "mapHeight" | default "600px " }}
23+ {{ $mapHeight := .Get "mapHeight" | default "400px " }}
2424{{ $mapWidth := .Get "mapWidth" | default $mapHeight }}
2525
2626{{ $classes := "flex" }}
You can’t perform that action at this time.
0 commit comments