Template:Location map many: Difference between revisions
From Zoophilia Wiki
Jump to navigationJump to search
meta>Wikid77 Saved full 785-line version, after accidentally storing 280-line test version: when will text-edit windows get line numbers or line counts again? Naive no-numbered edits & faked PC viruses should end. |
meta>Wikid77 verified latitudes/longitudes within map: expanded template 16% with parameter checking |
||
Line 2: | Line 2: | ||
-- Template for image with markers/labels (see bottom "NOTES") | -- Template for image with markers/labels (see bottom "NOTES") | ||
-- | -- | ||
-- Warning: Code multi-nested 9 levels across | -- Warning: Code multi-nested 9 levels across 910+ lines. | ||
-- Warning: {{Might}}{{{appear|become}}}{{unreadable}}? | -- Warning: {{Might}}{{{appear|become}}}{{unreadable}}? | ||
-- Warning: Adding spaces can kill results. | -- Warning: Adding spaces can kill results. | ||
Line 31: | Line 31: | ||
}}<!-- endif label--> ({{Location map {{{1}}}|name}})]]<br /><!-- | }}<!-- endif label--> ({{Location map {{{1}}}|name}})]]<br /><!-- | ||
================================================== Marker/Label #1 | ================================================== Marker/Label #1 | ||
-->{{#if: {{{lat|{{{lat_deg|}}} }}} | -->{{#if: {{{lat|{{{lat_deg|}}} }}} | <!-- | ||
|<!-- | --then latitude-1 exists --------------- Verify lat./longitude | ||
-->{{#ifexpr:{{{lat|{{{lat_deg|}}}}}}<{{Location map {{{1}}}|bottom}} | |||
|<!--then-->Latitude#1 ({{{lat|{{{lat_deg|}}}}}}) < map<!-- | |||
--> min({{Location map {{{1}}}|bottom}}).|<!--else-->}} | |||
{{#ifexpr: {{{lat|{{{lat_deg|}}}}}} > {{Location map {{{1}}}|top}} | |||
|<!--then-->Latitude#1 ({{{lat|{{{lat_deg|}}}}}}) > map<!-- | |||
--> max({{Location map {{{1}}}|top}}).|<!--else-->}} | |||
{{#ifexpr: {{{long|{{{lon_deg|}}}}}} < {{Location map {{{1}}}|left}} | |||
|<!--then-->Longitude#1({{{long|{{{lon_deg|}}}}}}) < map<!-- | |||
--> min({{Location map {{{1}}}|left}}).| }} | |||
{{#ifexpr: {{{long|{{{lon_deg|}}}}}} >{{Location map {{{1}}}|right}} | |||
|<!--then-->Longitude#1 ({{{long|{{{lon_deg|}}}}}}) > map<!-- | |||
--> max({{Location map {{{1}}}|right}}).|<!--else-->}} | |||
<!-- --------------------------------- Begin point division #1 --> | |||
<div style="position: absolute; z-index: 2; top: {{#expr: | <div style="position: absolute; z-index: 2; top: {{#expr: | ||
100 * ({{Location map {{{1}}}|top}} - {{#if: {{{lat_deg|}}} | 100 * ({{Location map {{{1}}}|top}} - {{#if: {{{lat_deg|}}} | ||
Line 85: | Line 98: | ||
| background-color: {{{background|{{{bg}}}}}}; | | background-color: {{{background|{{{bg}}}}}}; | ||
}}">{{{label|}}}</span></div><!-- end-div label1 --> | }}">{{{label|}}}</span></div><!-- end-div label1 --> | ||
}}</div><!--end-div point#1-- | }}</div><!--end-div point#1--> | ||
|<!--else, no latitude1 -->}}<!--endif lat* -- | |<!--else, no latitude1 -->}}<!--endif lat* -- | ||
================================================= Marker/Label #2 | ================================================= Marker/Label #2 | ||
-->{{#if: {{{lat2|{{{lat2_deg|}}} }}} | -->{{#if: {{{lat2|{{{lat2_deg|}}} }}} | <!-- | ||
|<!-- | --then latitude-2 exists --------------- Verify lat./longitude | ||
-->{{ | |||
#ifexpr:{{{lat2|{{{lat2_deg|}}} }}}<{{Location map {{{1}}}|bottom}} | |||
|<!--then-->Latitude#2 ({{{lat2|{{{lat2_deg|}}}}}}) < map<!-- | |||
--> min({{Location map {{{1}}}|bottom}}).|<!--else-->}} | |||
{{#ifexpr: {{{lat2|{{{lat2_deg|}}}}}} > {{Location map {{{1}}}|top}} | |||
|<!--then-->Latitude#2 ({{{lat2|{{{lat2_deg|}}}}}}) > map<!-- | |||
--> max({{Location map {{{1}}}|top}}).|<!--else-->}} | |||
{{#ifexpr:{{{long2|{{{lon2_deg|}}}}}} <{{Location map {{{1}}}|left}} | |||
|<!--then-->Longitude#2({{{long2|{{{lon2_deg|}}}}}}) < map<!-- | |||
--> min({{Location map {{{1}}}|left}}).| }} | |||
{{#ifexpr: {{{long2|{{{lon2_deg|}}}}}}>{{Location map {{{1}}}|right}} | |||
|<!--then-->Longitude#2({{{long2|{{{lon2_deg|}}}}}}) > map<!-- | |||
--> max({{Location map {{{1}}}|right}}).|<!--else-->}} | |||
<!-- --------------------------------- Begin point division #2 --> | |||
<div style="position: absolute; z-index: 2; | <div style="position: absolute; z-index: 2; | ||
top: {{#expr: <!--To DEBUG, add ">" above to show calc below--> | top: {{#expr: <!--To DEBUG, add ">" above to show calc below--> | ||
Line 171: | Line 198: | ||
|<!--else, no latitude2 -->}}<!--endif lat2* -- | |<!--else, no latitude2 -->}}<!--endif lat2* -- | ||
================================================= Marker/Label #3 | ================================================= Marker/Label #3 | ||
-->{{#if: {{{lat3|{{{lat3_deg|}}} }}} | -->{{#if: {{{lat3|{{{lat3_deg|}}} }}} | <!-- | ||
|<!-- | --then latitude-3 exists --------------- Verify lat./longitude | ||
-->{{ | |||
#ifexpr:{{{lat3|{{{lat3_deg|}}} }}}<{{Location map {{{1}}}|bottom}} | |||
|<!--then-->Latitude#3 ({{{lat3|{{{lat3_deg|}}}}}}) < map<!-- | |||
--> min({{Location map {{{1}}}|bottom}}).|<!--else-->}} | |||
{{#ifexpr: {{{lat3|{{{lat3_deg|}}}}}} > {{Location map {{{1}}}|top}} | |||
|<!--then-->Latitude#3 ({{{lat3|{{{lat3_deg|}}}}}}) > map<!-- | |||
--> max({{Location map {{{1}}}|top}}).|<!--else-->}} | |||
{{#ifexpr:{{{long3|{{{lon3_deg|}}}}}} <{{Location map {{{1}}}|left}} | |||
|<!--then-->Longitude#3({{{long3|{{{lon3_deg|}}}}}}) < map<!-- | |||
--> min({{Location map {{{1}}}|left}}).| }} | |||
{{#ifexpr: {{{long3|{{{lon3_deg|}}}}}}>{{Location map {{{1}}}|right}} | |||
|<!--then-->Longitude#3({{{long3|{{{lon3_deg|}}}}}}) > map<!-- | |||
--> max({{Location map {{{1}}}|right}}).|<!--else-->}} | |||
<!-- --------------------------------- Begin point division #3 --> | |||
<div style="position: absolute; z-index: 2; | <div style="position: absolute; z-index: 2; | ||
top: {{#expr: <!--To DEBUG, add ">" above to show calc below--> | top: {{#expr: <!--To DEBUG, add ">" above to show calc below--> | ||
Line 254: | Line 295: | ||
|<!--else, no latitude3 -->}}<!--endif lat3* -- | |<!--else, no latitude3 -->}}<!--endif lat3* -- | ||
================================================= Marker/Label #4 | ================================================= Marker/Label #4 | ||
-->{{#if: {{{lat4|{{{lat4_deg|}}} }}} | -->{{#if: {{{lat4|{{{lat4_deg|}}} }}} | <!-- | ||
|<!-- | --then latitude-4 exists --------------- Verify lat./longitude | ||
-->{{ | |||
#ifexpr:{{{lat4|{{{lat4_deg|}}} }}}<{{Location map {{{1}}}|bottom}} | |||
|<!--then-->Latitude#4 ({{{lat4|{{{lat4_deg|}}}}}}) < map<!-- | |||
--> min({{Location map {{{1}}}|bottom}}).|<!--else-->}} | |||
{{#ifexpr: {{{lat4|{{{lat4_deg|}}}}}} > {{Location map {{{1}}}|top}} | |||
|<!--then-->Latitude#4 ({{{lat4|{{{lat4_deg|}}}}}}) > map<!-- | |||
--> max({{Location map {{{1}}}|top}}).|<!--else-->}} | |||
{{#ifexpr:{{{long4|{{{lon4_deg|}}}}}} <{{Location map {{{1}}}|left}} | |||
|<!--then-->Longitude#4({{{long4|{{{lon4_deg|}}}}}}) < map<!-- | |||
--> min({{Location map {{{1}}}|left}}).| }} | |||
{{#ifexpr: {{{long4|{{{lon4_deg|}}}}}}>{{Location map {{{1}}}|right}} | |||
|<!--then-->Longitude#4({{{long4|{{{lon4_deg|}}}}}}) > map<!-- | |||
--> max({{Location map {{{1}}}|right}}).|<!--else-->}} | |||
<!-- --------------------------------- Begin point division #4 --> | |||
<div style="position: absolute; z-index: 2; | <div style="position: absolute; z-index: 2; | ||
top: {{#expr: <!--To DEBUG, add ">" above to show calc below--> | top: {{#expr: <!--To DEBUG, add ">" above to show calc below--> | ||
Line 337: | Line 392: | ||
|<!--else, no latitude4 -->}}<!--endif lat4* -- | |<!--else, no latitude4 -->}}<!--endif lat4* -- | ||
================================================= Marker/Label #5 | ================================================= Marker/Label #5 | ||
-->{{#if: {{{lat5|{{{lat5_deg|}}} }}} | -->{{#if: {{{lat5|{{{lat5_deg|}}} }}} | <!-- | ||
|<!-- | --then latitude-5 exists --------------- Verify lat./longitude | ||
-->{{ | |||
#ifexpr:{{{lat5|{{{lat5_deg|}}} }}}<{{Location map {{{1}}}|bottom}} | |||
|<!--then-->Latitude#5 ({{{lat5|{{{lat5_deg|}}}}}}) < map<!-- | |||
--> min({{Location map {{{1}}}|bottom}}).|<!--else-->}} | |||
{{#ifexpr: {{{lat5|{{{lat5_deg|}}}}}} > {{Location map {{{1}}}|top}} | |||
|<!--then-->Latitude#5 ({{{lat5|{{{lat5_deg|}}}}}}) > map<!-- | |||
--> max({{Location map {{{1}}}|top}}).|<!--else-->}} | |||
{{#ifexpr:{{{long5|{{{lon5_deg|}}}}}} <{{Location map {{{1}}}|left}} | |||
|<!--then-->Longitude#5({{{long5|{{{lon5_deg|}}}}}}) < map<!-- | |||
--> min({{Location map {{{1}}}|left}}).| }} | |||
{{#ifexpr: {{{long5|{{{lon5_deg|}}}}}}>{{Location map {{{1}}}|right}} | |||
|<!--then-->Longitude#5({{{long5|{{{lon5_deg|}}}}}}) > map<!-- | |||
--> max({{Location map {{{1}}}|right}}).|<!--else-->}} | |||
<!-- --------------------------------- Begin point division #5 --> | |||
<div style="position: absolute; z-index: 2; | <div style="position: absolute; z-index: 2; | ||
top: {{#expr: <!--To DEBUG, add ">" above to show calc below--> | top: {{#expr: <!--To DEBUG, add ">" above to show calc below--> | ||
Line 420: | Line 489: | ||
|<!--else, no latitude5 -->}}<!--endif lat5* -- | |<!--else, no latitude5 -->}}<!--endif lat5* -- | ||
================================================= Marker/Label #6 | ================================================= Marker/Label #6 | ||
-->{{#if: {{{lat6|{{{lat6_deg|}}} }}} | -->{{#if: {{{lat6|{{{lat6_deg|}}} }}} | <!-- | ||
|<!-- | --then latitude-6 exists --------------- Verify lat./longitude | ||
-->{{ | |||
#ifexpr:{{{lat6|{{{lat6_deg|}}} }}}<{{Location map {{{1}}}|bottom}} | |||
|<!--then-->Latitude#6 ({{{lat6|{{{lat6_deg|}}}}}}) < map<!-- | |||
--> min({{Location map {{{1}}}|bottom}}).|<!--else-->}} | |||
{{#ifexpr: {{{lat6|{{{lat6_deg|}}}}}} > {{Location map {{{1}}}|top}} | |||
|<!--then-->Latitude#6 ({{{lat6|{{{lat6_deg|}}}}}}) > map<!-- | |||
--> max({{Location map {{{1}}}|top}}).|<!--else-->}} | |||
{{#ifexpr:{{{long6|{{{lon6_deg|}}}}}} <{{Location map {{{1}}}|left}} | |||
|<!--then-->Longitude#6({{{long6|{{{lon6_deg|}}}}}}) < map<!-- | |||
--> min({{Location map {{{1}}}|left}}).| }} | |||
{{#ifexpr: {{{long6|{{{lon6_deg|}}}}}}>{{Location map {{{1}}}|right}} | |||
|<!--then-->Longitude#6({{{long6|{{{lon6_deg|}}}}}}) > map<!-- | |||
--> max({{Location map {{{1}}}|right}}).|<!--else-->}} | |||
<!-- --------------------------------- Begin point division #6 --> | |||
<div style="position: absolute; z-index: 2; | <div style="position: absolute; z-index: 2; | ||
top: {{#expr: <!--To DEBUG, add ">" above to show calc below--> | top: {{#expr: <!--To DEBUG, add ">" above to show calc below--> | ||
Line 503: | Line 586: | ||
|<!--else, no latitude6 -->}}<!--endif lat6* -- | |<!--else, no latitude6 -->}}<!--endif lat6* -- | ||
================================================= Marker/Label #7 | ================================================= Marker/Label #7 | ||
-->{{#if: {{{lat7|{{{lat7_deg|}}} }}} | -->{{#if: {{{lat7|{{{lat7_deg|}}} }}} | <!-- | ||
|<!-- | --then latitude-7 exists --------------- Verify lat./longitude | ||
-->{{ | |||
#ifexpr:{{{lat7|{{{lat7_deg|}}} }}}<{{Location map {{{1}}}|bottom}} | |||
|<!--then-->Latitude#7 ({{{lat7|{{{lat7_deg|}}}}}}) < map<!-- | |||
--> min({{Location map {{{1}}}|bottom}}).|<!--else-->}} | |||
{{#ifexpr: {{{lat7|{{{lat7_deg|}}}}}} > {{Location map {{{1}}}|top}} | |||
|<!--then-->Latitude#7 ({{{lat7|{{{lat7_deg|}}}}}}) > map<!-- | |||
--> max({{Location map {{{1}}}|top}}).|<!--else-->}} | |||
{{#ifexpr:{{{long7|{{{lon7_deg|}}}}}} <{{Location map {{{1}}}|left}} | |||
|<!--then-->Longitude#7({{{long7|{{{lon7_deg|}}}}}}) < map<!-- | |||
--> min({{Location map {{{1}}}|left}}).| }} | |||
{{#ifexpr: {{{long7|{{{lon7_deg|}}}}}}>{{Location map {{{1}}}|right}} | |||
|<!--then-->Longitude#7({{{long7|{{{lon7_deg|}}}}}}) > map<!-- | |||
--> max({{Location map {{{1}}}|right}}).|<!--else-->}} | |||
<!-- --------------------------------- Begin point division #7 --> | |||
<div style="position: absolute; z-index: 2; | <div style="position: absolute; z-index: 2; | ||
top: {{#expr: <!--To DEBUG, add ">" above to show calc below--> | top: {{#expr: <!--To DEBUG, add ">" above to show calc below--> | ||
Line 586: | Line 683: | ||
|<!--else, no latitude7 -->}}<!--endif lat7* -- | |<!--else, no latitude7 -->}}<!--endif lat7* -- | ||
================================================= Marker/Label #8 | ================================================= Marker/Label #8 | ||
-->{{#if: {{{lat8|{{{lat8_deg|}}} }}} | -->{{#if: {{{lat8|{{{lat8_deg|}}} }}} | <!-- | ||
|<!-- | --then latitude-8 exists --------------- Verify lat./longitude | ||
-->{{ | |||
#ifexpr:{{{lat8|{{{lat8_deg|}}} }}}<{{Location map {{{1}}}|bottom}} | |||
|<!--then-->Latitude#8 ({{{lat8|{{{lat8_deg|}}}}}}) < map<!-- | |||
--> min({{Location map {{{1}}}|bottom}}).|<!--else-->}} | |||
{{#ifexpr: {{{lat8|{{{lat8_deg|}}}}}} > {{Location map {{{1}}}|top}} | |||
|<!--then-->Latitude#8 ({{{lat8|{{{lat8_deg|}}}}}}) > map<!-- | |||
--> max({{Location map {{{1}}}|top}}).|<!--else-->}} | |||
{{#ifexpr:{{{long8|{{{lon8_deg|}}}}}} <{{Location map {{{1}}}|left}} | |||
|<!--then-->Longitude#8({{{long8|{{{lon8_deg|}}}}}}) < map<!-- | |||
--> min({{Location map {{{1}}}|left}}).| }} | |||
{{#ifexpr: {{{long8|{{{lon8_deg|}}}}}}>{{Location map {{{1}}}|right}} | |||
|<!--then-->Longitude#8({{{long8|{{{lon8_deg|}}}}}}) > map<!-- | |||
--> max({{Location map {{{1}}}|right}}).|<!--else-->}} | |||
<!-- --------------------------------- Begin point division #8 --> | |||
<div style="position: absolute; z-index: 2; | <div style="position: absolute; z-index: 2; | ||
top: {{#expr: <!--To DEBUG, add ">" above to show calc below--> | top: {{#expr: <!--To DEBUG, add ">" above to show calc below--> | ||
Line 669: | Line 780: | ||
|<!--else, no latitude8 -->}}<!--endif lat8* -- | |<!--else, no latitude8 -->}}<!--endif lat8* -- | ||
================================================= Marker/Label #9 | ================================================= Marker/Label #9 | ||
-->{{#if: {{{lat9|{{{lat9_deg|}}} }}} | -->{{#if: {{{lat9|{{{lat9_deg|}}} }}} | <!-- | ||
|<!-- | --then latitude-9 exists --------------- Verify lat./longitude | ||
-->{{ | |||
#ifexpr:{{{lat9|{{{lat9_deg|}}} }}}<{{Location map {{{1}}}|bottom}} | |||
|<!--then-->Latitude#9 ({{{lat9|{{{lat9_deg|}}}}}}) < map<!-- | |||
--> min({{Location map {{{1}}}|bottom}}).|<!--else-->}} | |||
{{#ifexpr: {{{lat9|{{{lat9_deg|}}}}}} > {{Location map {{{1}}}|top}} | |||
|<!--then-->Latitude#9 ({{{lat9|{{{lat9_deg|}}}}}}) > map<!-- | |||
--> max({{Location map {{{1}}}|top}}).|<!--else-->}} | |||
{{#ifexpr:{{{long9|{{{lon9_deg|}}}}}} <{{Location map {{{1}}}|left}} | |||
|<!--then-->Longitude#9({{{long9|{{{lon9_deg|}}}}}}) < map<!-- | |||
--> min({{Location map {{{1}}}|left}}).| }} | |||
{{#ifexpr: {{{long9|{{{lon9_deg|}}}}}}>{{Location map {{{1}}}|right}} | |||
|<!--then-->Longitude#9({{{long9|{{{lon9_deg|}}}}}}) > map<!-- | |||
--> max({{Location map {{{1}}}|right}}).|<!--else-->}} | |||
<!-- --------------------------------- Begin point division #9 --> | |||
<div style="position: absolute; z-index: 2; | <div style="position: absolute; z-index: 2; | ||
top: {{#expr: <!--To DEBUG, add ">" above to show calc below--> | top: {{#expr: <!--To DEBUG, add ">" above to show calc below--> | ||
Line 778: | Line 903: | ||
-- 09Sep07 Rewrote to auto-position markers by marksize/markhigh. | -- 09Sep07 Rewrote to auto-position markers by marksize/markhigh. | ||
-- 10Sep07 Rewrote to require latitudes, avoid oversized pages. | -- 10Sep07 Rewrote to require latitudes, avoid oversized pages. | ||
-- 11Sep07 Verified latitudes/longitudes (expanded template 16%). | |||
--> | --> | ||
{{/doc}} | {{/doc}} |