Template:Map: Difference between revisions

From elijah
Jump to navigation Jump to search
WikiSync push v1.0
 
WikiSync push v1.1
 
(2 intermediate revisions by the same user not shown)
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|}}}
  |HasRegion={{{HasRegion|}}}
  |HasImage={{{HasImage|}}}
  |HasCenterLat={{{HasCenterLat|}}}
  |HasGeoLocation={{{HasGeoLocation|}}}
|HasCenterLng={{{HasCenterLng|}}}
  |HasZoom={{{HasZoom|}}}
  |HasZoom={{{HasZoom|}}}
}}
}}
Line 23: Line 23:
{{#if:{{{HasTimePeriod|}}}|
{{#if:{{{HasTimePeriod|}}}|
   {{#arraymap:{{{HasTimePeriod|}}}|;|@@|{{#set:HasTimePeriod=@@}}|}}
   {{#arraymap:{{{HasTimePeriod|}}}|;|@@|{{#set:HasTimePeriod=@@}}|}}
}}
<!-- List: Region -->
{{#if:{{{HasRegion|}}}|
  {{#arraymap:{{{HasRegion|}}}|;|@@|{{#set:HasRegion=@@}}|}}
}}
}}


Line 63: 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 72: Line 84:


     <!-- Metadata Table -->
     <!-- Metadata Table -->
     {{#if:{{{HasSources|}}}{{{HasRegion|}}}{{{HasCenterLat|}}}{{{HasCenterLng|}}}{{{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:{{{HasRegion|}}}|
         {{#if:{{{HasMapKind|}}}|
           <tr>
           <tr>
             <td style="color:#777; padding:0.12em 0.8em 0.12em 0; white-space:nowrap; vertical-align:top; width:30%;">'''Region'''</td>
             <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;">{{{HasRegion}}}</td>
             <td style="color:#222;">{{{HasMapKind}}}</td>
           </tr>
           </tr>
         }}
         }}
         {{#if:{{{HasCenterLat|}}}|
         {{#if:{{{HasRegion|}}}|
           <tr>
           <tr>
             <td style="color:#777; padding:0.12em 0.8em 0.12em 0; white-space:nowrap; vertical-align:top;">'''Center Lat'''</td>
             <td style="color:#777; padding:0.12em 0.8em 0.12em 0; white-space:nowrap; vertical-align:top; width:30%;">'''Region'''</td>
             <td style="color:#222;">{{{HasCenterLat}}}</td>
             <td style="color:#222;">{{#arraymap:{{{HasRegion|}}}|;|@@|@@|, }}</td>
           </tr>
           </tr>
         }}
         }}
         {{#if:{{{HasCenterLng|}}}|
         {{#if:{{{HasGeoLocation|}}}|
           <tr>
           <tr>
             <td style="color:#777; padding:0.12em 0.8em 0.12em 0; white-space:nowrap; vertical-align:top;">'''Center Lng'''</td>
             <td style="color:#777; padding:0.12em 0.8em 0.12em 0; white-space:nowrap; vertical-align:top;">'''Center Coordinates'''</td>
             <td style="color:#222;">{{{HasCenterLng}}}</td>
             <td style="color:#222;">{{{HasGeoLocation}}}</td>
           </tr>
           </tr>
         }}
         }}
Line 171: 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
  |HasRegion=Galicia
|HasImage=
  |HasCenterLat=48.8
  |HasRegion=Galicia; Bukovina
|HasCenterLng=22.5
  |HasGeoLocation=48.8, 22.5
  |HasZoom=5
  |HasZoom=5
  |HasTimePeriod=1772-1914; Before 1772
  |HasTimePeriod=1772-1914; Before 1772
  |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
* HasCenterLat / HasCenterLng — SMW Number type
* 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
* HasZoom — SMW Number type
* HasRegion — text, controlled vocabulary
* HasRegion — list of text values, controlled vocabulary (semicolon-separated)
* BelongsToTopic — list of text values from controlled vocabulary (semicolon-separated)
* BelongsToTopic — list of text values from controlled vocabulary (semicolon-separated)
* HasTimePeriod — list of text values, controlled vocabulary (semicolon-separated)
* HasTimePeriod — list of text values, controlled vocabulary (semicolon-separated)

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