Template:SaintMapSimple: Difference between revisions

no edit summary
(Created page with "<noinclude> This template generates a map for a saint's page, displaying birth, death, and notable locations from the Saints table. Usage: {{SaintMapSimple}} </noinclude><includeonly> {{#vardefine:mapdata| {{#cargo_query: |tables=Saints |fields=SaintBirthCoordinates__full=Coordinates,SaintBirthPlace=Label |where=SaintName='{{PAGENAME}}' AND SaintBirthCoordinates__full IS NOT NULL AND SaintBirthPlace IS NOT NULL |format=template |template=SaintMapPoint |default= }}|{{#car...")
 
No edit summary
Line 1: Line 1:
<noinclude>
{{#display_map:
This template generates a map for a saint's page, displaying birth, death, and notable locations from the Saints table.
Usage: {{SaintMapSimple}}
</noinclude><includeonly>
{{#vardefine:mapdata|
{{#cargo_query:
{{#cargo_query:
|tables=Saints
|tables=Saints
Line 11: Line 7:
|template=SaintMapPoint
|template=SaintMapPoint
|default=
|default=
}}|{{#cargo_query:
}};{{#cargo_query:
|tables=Saints
|tables=Saints
|fields=SaintDeathCoordinates__full=Coordinates,DeathPlace=Label
|fields=SaintDeathCoordinates__full=Coordinates,DeathPlace=Label
Line 18: Line 14:
|template=SaintMapPoint
|template=SaintMapPoint
|default=
|default=
}}|{{#cargo_query:
}};{{#cargo_query:
|tables=Saints
|tables=Saints
|fields=NotableCoordinates1__full=Coordinates,NotableLabel1=Label
|fields=NotableCoordinates1__full=Coordinates,CONCAT(NotableLabel1, ' (', NotableAddress1, ')')=Label
|where=SaintName='{{PAGENAME}}' AND NotableCoordinates1__full IS NOT NULL AND NotableLabel1 IS NOT NULL
|where=SaintName='{{PAGENAME}}' AND NotableCoordinates1__full IS NOT NULL AND NotableLabel1 IS NOT NULL
|format=template
|format=template
|template=SaintMapPoint
|template=SaintMapPoint
|default=
|default=
}}|{{#cargo_query:
}};{{#cargo_query:
|tables=Saints
|tables=Saints
|fields=NotableCoordinates2__full=Coordinates,NotableLabel2=Label
|fields=NotableCoordinates2__full=Coordinates,CONCAT(NotableLabel2, ' (', NotableAddress2, ')')=Label
|where=SaintName='{{PAGENAME}}' AND NotableCoordinates2__full IS NOT NULL AND NotableLabel2 IS NOT NULL
|where=SaintName='{{PAGENAME}}' AND NotableCoordinates2__full IS NOT NULL AND NotableLabel2 IS NOT NULL
|format=template
|format=template
|template=SaintMapPoint
|template=SaintMapPoint
|default=
|default=
}}|{{#cargo_query:
}};{{#cargo_query:
|tables=Saints
|tables=Saints
|fields=NotableCoordinates3__full=Coordinates,NotableLabel3=Label
|fields=NotableCoordinates3__full=Coordinates,CONCAT(NotableLabel3, ' (', NotableAddress3, ')')=Label
|where=SaintName='{{PAGENAME}}' AND NotableCoordinates3__full IS NOT NULL AND NotableLabel3 IS NOT NULL
|where=SaintName='{{PAGENAME}}' AND NotableCoordinates3__full IS NOT NULL AND NotableLabel3 IS NOT NULL
|format=template
|format=template
|template=SaintMapPoint
|template=SaintMapPoint
|default=
|default=
}}|{{#cargo_query:
}};{{#cargo_query:
|tables=Saints
|tables=Saints
|fields=NotableCoordinates4__full=Coordinates,NotableLabel4=Label
|fields=NotableCoordinates4__full=Coordinates,CONCAT(NotableLabel4, ' (', NotableAddress4, ')')=Label
|where=SaintName='{{PAGENAME}}' AND NotableCoordinates4__full IS NOT NULL AND NotableLabel4 IS NOT NULL
|where=SaintName='{{PAGENAME}}' AND NotableCoordinates4__full IS NOT NULL AND NotableLabel4 IS NOT NULL
|format=template
|template=SaintMapPoint
|default=
}};{{#cargo_query:
|tables=Saints
|fields=NotableCoordinates5__full=Coordinates,CONCAT(NotableLabel5, ' (', NotableAddress5, ')')=Label
|where=SaintName='{{PAGENAME}}' AND NotableCoordinates5__full IS NOT NULL AND NotableLabel5 IS NOT NULL
|format=template
|format=template
|template=SaintMapPoint
|template=SaintMapPoint
|default=
|default=
}}
}}
}}{{#display_map:
{{#arraymap:{{#var:mapdata}}|,|$x|{{#replace:$x|\n|}}|;}}
|width=600
|width=600
|height=400
|height=400
|zoom=3
|zoom=3
|format=leaflet
|format=leaflet
|markercluster=off
}}
}}
</includeonly>