ಟೆಂಪ್ಲೇಟು:Location map Russia (equirectangular)
name | Russia | |||
---|---|---|---|---|
border coordinates | ||||
81.8 | ||||
19.6333 | ←↕→ | -169.667 | ||
41.19 | ||||
map center | 61°29′42″N 104°58′59″E / 61.495°N 104.98315°E | |||
x | (100*(({{{3}}} + ({{{3}}} < 0)*360) - 19.6333)/((-169.667 + 360) - 19.6333)) | |||
y | (100*({{{2}}} - 81.8)/(41.19 - 81.8)) | |||
image | Russia location map.svg
| |||
Template:Location map Russia (equirectangular) is a location map definition used to overlay markers and labels on an equirectangular projection map of ರಷ್ಯಾ. The markers are placed by latitude and longitude coordinates on the default map or a similar map image.
Usage
ಬದಲಾಯಿಸಿThese definitions are used by the following templates when invoked with parameter "Russia (equirectangular)":
{{Location map | Russia (equirectangular) | ...}}
{{Location map many | Russia (equirectangular) | ...}}
{{Location map+ | Russia (equirectangular) | ...}}
{{Location map~ | Russia (equirectangular) | ...}}
Map definition
ಬದಲಾಯಿಸಿ- name
- used in default map caption (
Russia
) - image
- the default map image, without "Image:" or "File:" (
Russia location map.svg
) - x
- an expression to calculate a location on the map via its longitude; evaluates as 0 along the left edge and 100 along the right edge
- y
- an expression to calculate a location on the map via its latitude; evaluates as 0 along the top edge and 100 along the bottom edge
Technical details
ಬದಲಾಯಿಸಿFor a map using an equirectangular projection which does not cross +/-180 longitude, or +/-90 latitude, the following expressions can be used:
x = 100*(long - left)/(right - left)
y = 100*(lat - top)/(bottom - top)
where lat and long are the degrees latitude and longitude respectively. Here, top and bottom are the degrees latitude of the top and bottom edges of the map, left and right are the degrees latitude of the left and right edges of the map.
Things are a bit more complicated when the map crosses +/-180 longitude, and some sort of "modulo arithmetic" is required. Here, we add 360 if the longitude is less than 0, then use a mapping based on positive coordinates. The following table can be used to check if the expressions are working as desired:
location | lat | long | (x,y) test | (x,y) exact |
---|---|---|---|---|
top/left | 81.8 | 19.6333 | (0,-0) | (0,0) |
top/right | 81.8 | -169.667 | (100,-0) | (100,0) |
bottom/left | 41.19 | 19.6333 | (0,100) | (0,100) |
bottom/right | 41.19 | -169.667 | (100,100) | (100,100) |
center | 61.495 | 104.98315 | (50,50) | (50,50) |
Examples
ಬದಲಾಯಿಸಿLocation map: Eastern hemisphere, Deg/Min/Sec coordinates
ಬದಲಾಯಿಸಿLua error in ಮಾಡ್ಯೂಲ್:Location_map at line 526: Unable to find the specified location map definition: "Module:Location map/data/Russia (equirectangular)" does not exist.
{{Location map | Russia (equirectangular) | width = 300 | float = right | caption = Location of [[Moscow]] in Russia | label = Moscow | background = lightblue | position = right | lat_deg= 55 | lat_min=45 | lat_sec=06 | lat_dir=N | lon_deg=037 | lon_min=37 | lon_sec=04 | lon_dir=E }}
Location map: Eastern hemisphere, Decimal coordinates
ಬದಲಾಯಿಸಿLua error in ಮಾಡ್ಯೂಲ್:Location_map at line 526: Unable to find the specified location map definition: "Module:Location map/data/Russia (equirectangular)" does not exist.
{{Location map | Russia (equirectangular) | width = 300 | float = right | caption = Location of [[Moscow]] in Russia | label = Moscow | background = lightblue | position = right | lat = 55.75167 | long = 37.61778 }}
Location map: Western hemisphere, Deg/Min/Sec coordinates
ಬದಲಾಯಿಸಿLua error in ಮಾಡ್ಯೂಲ್:Location_map at line 526: Unable to find the specified location map definition: "Module:Location map/data/Russia (equirectangular)" does not exist.
{{Location map | Russia (equirectangular) | width = 300 | float = right | caption = Location of [[Egvekinot]] in Russia | label = Egvekinot | background = lightgreen | position = left | lat_deg= 66 | lat_min=19 | lat_sec=06 | lat_dir=N | lon_deg=179 | lon_min=07 | lon_sec=24 | lon_dir=W }}
Location map: Western hemisphere, Decimal coordinates
ಬದಲಾಯಿಸಿLua error in ಮಾಡ್ಯೂಲ್:Location_map at line 526: Unable to find the specified location map definition: "Module:Location map/data/Russia (equirectangular)" does not exist.
{{Location map | Russia (equirectangular) | width = 300 | float = right | caption = Location of [[Egvekinot]] in Russia | label = Egvekinot | background = lightgreen | position = left | lat = 66.31833 | long = -179.12333 }}
Location map many: Deg/Min/Sec coordinates
ಬದಲಾಯಿಸಿLua error in ಮಾಡ್ಯೂಲ್:Location_map/multi at line 143: Unable to find the specified location map definition: "Module:Location map/data/Russia (equirectangular)" does not exist.
{{Location map many | Russia (equirectangular) | width = 300 | float = right | caption = [[Moscow]] and [[Egvekinot]] in Russia | label = Moscow | label_size = 90 | bg = lightblue | pos = right | lat_deg= 55 | lat_min=45 | lat_sec=06 | lat_dir=N | lon_deg=037 | lon_min=37 | lon_sec=04 | lon_dir=E | label2 = Egvekinot | label2_size = 90 | bg2 = lightgreen | pos2 = left | lat2_deg= 66 | lat2_min=19 | lat2_sec=06 | lat2_dir=N | lon2_deg=179 | lon2_min=07 | lon2_sec=24 | lon2_dir=W }}
Location map many: Decimal coordinates
ಬದಲಾಯಿಸಿLua error in ಮಾಡ್ಯೂಲ್:Location_map/multi at line 143: Unable to find the specified location map definition: "Module:Location map/data/Russia (equirectangular)" does not exist.
{{Location map many | Russia (equirectangular) | width = 300 | float = right | caption = [[Moscow]] and [[Egvekinot]] in Russia | label = Moscow | label_size = 90 | bg = lightblue | pos = right | lat = 55.75167 | long = 37.61778 | label2 = Egvekinot | label2_size = 90 | bg2 = lightgreen | pos2 = left | lat2 = 66.31833 | long2 = -179.12333 }}