Template:Map: Difference between revisions

From elijah
Jump to navigation Jump to search
WikiSync push v1.0
WikiSync push v1.1
 
Line 1: Line 1:
<!-- WikiSync | version=1.0 | updated=2026-07-22 -->
<!-- WikiSync | version=1.1 | updated=2026-08-16 -->
<includeonly>
<includeonly>
__NOFACTBOX__
__NOFACTBOX__
Line 13: Line 13:
  |HasAuthor={{{HasAuthor|}}}
  |HasAuthor={{{HasAuthor|}}}
  |HasSources={{{HasSources|}}}
  |HasSources={{{HasSources|}}}
|HasMapKind={{{HasMapKind|}}}
  |HasStructureFile={{{HasStructureFile|}}}
  |HasStructureFile={{{HasStructureFile|}}}
|HasImage={{{HasImage|}}}
  |HasGeoLocation={{{HasGeoLocation|}}}
  |HasGeoLocation={{{HasGeoLocation|}}}
  |HasZoom={{{HasZoom|}}}
  |HasZoom={{{HasZoom|}}}
Line 66: Line 68:
   <!-- Body -->
   <!-- Body -->
   <div style="padding: 0.85em 1em 0.9em 1em;">
   <div style="padding: 0.85em 1em 0.9em 1em;">
    <!-- Image Block -->
    {{#if:{{{HasImage|}}}|
      <div style="float:right; margin-left:1em; max-width:200px;">
        [[{{#show: {{{HasImage|}}} |?HasFile#-}}|thumb|200px|center|{{{HasTitle|{{PAGENAME}}}}}]]
      </div>
    }}


     <!-- Description -->
     <!-- Description -->
Line 75: Line 84:


     <!-- Metadata Table -->
     <!-- Metadata Table -->
     {{#if:{{{HasSources|}}}{{{HasRegion|}}}{{{HasGeoLocation|}}}{{{HasZoom|}}}{{{HasStructureFile|}}}|
     {{#if:{{{HasMapKind|}}}{{{HasSources|}}}{{{HasRegion|}}}{{{HasGeoLocation|}}}{{{HasZoom|}}}{{{HasStructureFile|}}}|
       <table style="border-collapse:collapse; font-size:0.88em; margin-bottom:0.65em; width:100%;">
       <table style="border-collapse:collapse; font-size:0.88em; margin-bottom:0.65em; width:100%;">
        {{#if:{{{HasMapKind|}}}|
          <tr>
            <td style="color:#777; padding:0.12em 0.8em 0.12em 0; white-space:nowrap; vertical-align:top; width:30%;">'''Map Kind'''</td>
            <td style="color:#222;">{{{HasMapKind}}}</td>
          </tr>
        }}
         {{#if:{{{HasRegion|}}}|
         {{#if:{{{HasRegion|}}}|
           <tr>
           <tr>
Line 168: Line 183:
  |HasAuthor=Adam Teller
  |HasAuthor=Adam Teller
  |HasSources=Pomniki dziejowe Lwowa, vol. 1 (1892)...
  |HasSources=Pomniki dziejowe Lwowa, vol. 1 (1892)...
|HasMapKind=Geo
  |HasStructureFile=File:1.4.4-structure.json
  |HasStructureFile=File:1.4.4-structure.json
|HasImage=
  |HasRegion=Galicia; Bukovina
  |HasRegion=Galicia; Bukovina
  |HasGeoLocation=48.8, 22.5
  |HasGeoLocation=48.8, 22.5
Line 175: Line 192:
  |BelongsToTopic=Economics; Demography and Statistics
  |BelongsToTopic=Economics; Demography and Statistics
  |HasRelatedEntries=Article:011; Article:055
  |HasRelatedEntries=Article:011; Article:055
}}
</pre>
An Image-kind map (no structure file, static image instead):
<pre>
{{Map
|HasMapID=1.4.5
|HasTitle=Market Square, 1890
|HasMapKind=Image
|HasStructureFile=
|HasImage=Image:MarketSquare1890.jpg
}}
}}
</pre>
</pre>


Properties with type notes:
Properties with type notes:
* HasStructureFile — page reference to File: namespace (e.g. File:1.4.4-structure.json); the JSON must be uploaded to the wiki as a file
* HasMapKind — text, controlled vocabulary ("Geo" or "Image"); determines whether the map is backed by a structure JSON file or a static image
* HasStructureFile — page reference to File: namespace (e.g. File:1.4.4-structure.json); the JSON must be uploaded to the wiki as a file; used for Geo-kind maps
* HasImage — page reference to Image: namespace; reused from Person/Community; used for Image-kind maps, displayed as a thumbnail whenever set
* HasGeoLocation — SMW Geographic coordinates type ("lat, lng"), same convention as Community
* HasGeoLocation — SMW Geographic coordinates type ("lat, lng"), same convention as Community
* HasZoom — SMW Number type
* HasZoom — SMW Number type

Latest revision as of 08:37, 16 August 2026



Use this template on Map: pages to store spatial map metadata.

Example:

{{Map
 |HasMapID=1.4.4
 |HasTitle=Trade Routes
 |HasDescription=Arrows follow the direction of trade; dots mark the trading towns.
 |HasAuthor=Adam Teller
 |HasSources=Pomniki dziejowe Lwowa, vol. 1 (1892)...
 |HasMapKind=Geo
 |HasStructureFile=File:1.4.4-structure.json
 |HasImage=
 |HasRegion=Galicia; Bukovina
 |HasGeoLocation=48.8, 22.5
 |HasZoom=5
 |HasTimePeriod=1772-1914; Before 1772
 |BelongsToTopic=Economics; Demography and Statistics
 |HasRelatedEntries=Article:011; Article:055
}}

An Image-kind map (no structure file, static image instead):

{{Map
 |HasMapID=1.4.5
 |HasTitle=Market Square, 1890
 |HasMapKind=Image
 |HasStructureFile=
 |HasImage=Image:MarketSquare1890.jpg
}}

Properties with type notes:

  • HasMapKind — text, controlled vocabulary ("Geo" or "Image"); determines whether the map is backed by a structure JSON file or a static image
  • HasStructureFile — page reference to File: namespace (e.g. File:1.4.4-structure.json); the JSON must be uploaded to the wiki as a file; used for Geo-kind maps
  • HasImage — page reference to Image: namespace; reused from Person/Community; used for Image-kind maps, displayed as a thumbnail whenever set
  • HasGeoLocation — SMW Geographic coordinates type ("lat, lng"), same convention as Community
  • HasZoom — SMW Number type
  • HasRegion — list of text values, controlled vocabulary (semicolon-separated)
  • BelongsToTopic — list of text values from controlled vocabulary (semicolon-separated)
  • HasTimePeriod — list of text values, controlled vocabulary (semicolon-separated)
  • HasRelatedEntries — list of page references to Article: namespace (semicolon-separated)
  • All others — text