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.
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.