<<Template:OSM Location map/testcases
Test of dateline functionality
Side by side comparison{{OSM Location map}} | {{OSM Location map/sandbox}} |
---|
<mapframe>: Attribute "mapstyle" has an invalid value
10 000km 6,000miles
Vancouver
6
Manila
4
3
1 Manila |
<mapframe>: Attribute "mapstyle" has an invalid value
10 000km 6,000miles
Vancouver
6
Manila
4
3
1 Manila |
Pacific centric map -180
Side by side comparison{{OSM Location map}} | {{OSM Location map/sandbox}} |
---|
<mapframe>: Attribute "mapstyle" has an invalid value
5000km 3,100miles
-123° Vancouver d=0 <div style="display:inline-block; position: absolute; line-height: 0.98;
Expression error: Unexpected < operator.
background-color: transparent; color:inherit;">
San Fran' 6
3 |
<mapframe>: Attribute "mapstyle" has an invalid value
5000km 3,100miles
-123° Vancouver d=0 <div style="display:inline-block; position: absolute; line-height: 0.98;
Expression error: Unexpected < operator.
background-color: transparent; color:inherit;">
San Fran' 6
Sidney 5
4
3
120° Manila d=-1 1 |
Pacific centric map 180
Side by side comparison{{OSM Location map}} | {{OSM Location map/sandbox}} |
---|
<mapframe>: Attribute "mapstyle" has an invalid value
5000km 3,100miles
-123° Vancouver d=1 <div style="display:inline-block; position: absolute; line-height: 0.98;
Expression error: Unexpected < operator.
background-color: transparent; color:inherit;">
San Fran' 6
Sidney 5
4
3
120° Manila d=0 1 |
<mapframe>: Attribute "mapstyle" has an invalid value
5000km 3,100miles
-123° Vancouver d=1 <div style="display:inline-block; position: absolute; line-height: 0.98;
Expression error: Unexpected < operator.
background-color: transparent; color:inherit;">
San Fran' 6
Sidney 5
4
3
120° Manila d=0 1 |
Try with mark coords to confirm new logic not working for marks more complex than labels
Side by side comparison{{OSM Location map}} | {{OSM Location map/sandbox}} |
---|
<mapframe>: Attribute "mapstyle" has an invalid value
5000km 3,100miles
Vancouver
3 |
<mapframe>: Attribute "mapstyle" has an invalid value
5000km 3,100miles
Vancouver
6: Another area across date line
5. Sidney
4: area across date line
3
Manila |
First draft at instructions
Side by side comparison{{OSM Location map}} | {{OSM Location map/sandbox}} |
---|
<mapframe>: Attribute "mapstyle" has an invalid value
5000km 3,100miles
Eastern Hemisphere Western Hemisphere
If map centre has a negative Longitude, positive-lon marks (such as this one at 0,130) would need to set dateline=-1.
Longitude 100 120 140 160 180 -160 -140 -120 -100
If map centre has positive Longitude (as here), any negative-lon marks (such as this one at 0,-150) need to set dateline=1.
Map centre (0,160) Coping with marks both sides of the dateline (180th meridian):
The line of longitude that is both plus and minus 180° can be seen as a feint blue line through the Pacific on this map. It divides the Eastern and Western hemispheres.
The 'map centre' longitude selects which hemisphere is the main one for any mark coordinates. Any marks in that hemisphere need no further clarification.
However, to show a mark in the 'other' hemisphere, use the 'dateline=' parameter, otherwise it will end up in the 'wrong' direction relative to your map centre. Set it to -1 for positive (western hemisphere) longitude marks and to 1 for negative (eastern hemisphere) longitude marks, if the map centre is in the 'other' hemisphere.
nb. There is no such problem on the Prime meridian. Marks either side of 0° longitude work as expected without any need for dateline to be set. |
<mapframe>: Attribute "mapstyle" has an invalid value
5000km 3,100miles
Eastern Hemisphere Western Hemisphere
If map centre has a negative Longitude, positive-lon marks (such as this one at 0,130) would need to set dateline=-1.
Longitude 100 120 140 160 180 -160 -140 -120 -100
If map centre has positive Longitude (as here), any negative-lon marks (such as this one at 0,-150) need to set dateline=1.
Map centre (0,160) Coping with marks both sides of the dateline (180th meridian):
The line of longitude that is both plus and minus 180° can be seen as a feint blue line through the Pacific on this map. It divides the Eastern and Western hemispheres.
The 'map centre' longitude selects which hemisphere is the main one for any mark coordinates. Any marks in that hemisphere need no further clarification.
However, to show a mark in the 'other' hemisphere, use the 'dateline=' parameter, otherwise it will end up in the 'wrong' direction relative to your map centre. Set it to -1 for positive (western hemisphere) longitude marks and to 1 for negative (eastern hemisphere) longitude marks, if the map centre is in the 'other' hemisphere.
nb. There is no such problem on the Prime meridian. Marks either side of 0° longitude work as expected without any need for dateline to be set. |