มอดูล:Location map/data/United States

จากวิกิพีเดีย สารานุกรมเสรี
Documentation icon คู่มือการใช้งานมอดูล[ดู] [แก้] [ประวัติ] [ล้างแคช]
แผนที่ที่ตั้งของสหรัฐ
name สหรัฐ
x 50.0 + 124.03149777329222 * ((1.9694462586094064-($1 * pi / 180)) * sin(0.6010514667026994 * ($2 + 96) * pi / 180))
y 50.0 + 1.6155950752393982 * 124.03149777329222 * ( 0.02613325650382181 - (1.3236744353715044 - (1.9694462586094064 - ($1 * pi / 180)) * cos(0.6010514667026994 * ($2 + 96) * pi / 180)))
image Usa edcp location map.svg
image1 Usa edcp relief location map.png

มอดูล:Location map/data/United States คือมอดูลนิยามแผนที่แบบ equidistant conic projection ของสหรัฐ เพื่อใช้กำหนดตำแหน่งบนแผนที่ค่าเริ่มต้นหรือแผนที่ใกล้เคียงด้วยสัญลักษณ์หรือข้อความโดยใช้ค่าพิกัดละติจูดและลองจิจูด

การใช้งาน

เมื่อกำหนดค่าพารามิเตอร์ "United States" ลงในแม่แบบต่าง ๆ ด้านล่าง จะใช้ค่านิยามจากมอดูลนี้

ค่านิยาม

  • name = สหรัฐ
    ชื่อที่ใช้ในคำอธิบายแผนที่ค่าเริ่มต้น (default map)
  • image = Usa edcp location map.svg
    ภาพแผนที่ค่าเริ่มต้น ไม่ต้องใส่ "Image:" หรือ "File:" (หรือ "ภาพ:" หรือ "ไฟล์:")
  • image1 = Usa edcp relief location map.png
    ภาพแผนที่ทางเลือก (alternative map) มักจะเป็นแผนที่ภูมิประเทศ (relief map) ซึ่งกำหนดให้แสดงได้โดยใช้พารามิเตอร์ relief หรือ AlternativeMap
  • x = 50.0 + 124.03149777329222 * ((1.9694462586094064-($1 * pi / 180)) * sin(0.6010514667026994 * ($2 + 96) * pi / 180))
    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 = 50.0 + 1.6155950752393982 * 124.03149777329222 * ( 0.02613325650382181 - (1.3236744353715044 - (1.9694462586094064 - ($1 * pi / 180)) * cos(0.6010514667026994 * ($2 + 96) * pi / 180)))
    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

แผนที่ทางเลือก (Alternative map)

The {{Location map}}, {{Location map many}}, and {{Location map+}} templates have parameters to specify an alternative map image. The map displayed as image1 can be used with the relief or AlternativeMap parameters. Examples may be found below or in the following:

ตัวอย่างการใช้ในแม่แบบตำแหน่งบนแผนที่ (location map)

แม่แบบ Location map ใช้แผนที่ปกติ (image)

วอชิงตัน ดี.ซี.ตั้งอยู่ในสหรัฐ
วอชิงตัน ดี.ซี.
วอชิงตัน ดี.ซี.
วอชิงตัน ดี.ซี. (สหรัฐ)
{{Location map | USA
| width   = 250
| label   = วอชิงตัน ดี.ซี.
| lat_deg = 38.89
| lon_deg = -77.04
}}

แม่แบบ Location map many ใช้แผนที่ภูมิประเทศ (image1)

Location map/data/United Statesตั้งอยู่ในสหรัฐ
วอชิงตัน ดี.ซี.
วอชิงตัน ดี.ซี.
ซีแอตเทิล
ซีแอตเทิล
สถานที่สองแห่งในสหรัฐ
{{Location map many | USA
| relief   = yes
| width    = 250
| caption  = สถานที่สองแห่งในสหรัฐ
| label1   = วอชิงตัน ดี.ซี.
| lat1_deg = 38.89
| lon1_deg = -77.04
| label2   = ซีแอตเทิล
| lat2_deg = 47.61
| lon2_deg = -122.33
}}

แม่แบบ Location map+, ใช้แผนที่ AlternativeMap

Location map/data/United Statesตั้งอยู่ในสหรัฐ
วอชิงตัน ดี.ซี.
วอชิงตัน ดี.ซี.
ซีแอตเทิล
ซีแอตเทิล
สถานที่สองแห่งในสหรัฐ
{{Location map+ | USA
| AlternativeMap = Usa edcp relief location map.png
| caption = สถานที่สองแห่งในสหรัฐ
| width   = 250
| places  =
  {{Location map~ | USA
  | label   = วอชิงตัน ดี.ซี.
  | lat_deg = 38.89
  | lon_deg = -77.04
  }}
  {{Location map~ | USA
  | label   = ซีแอตเทิล
  | lat_deg = 47.61
  | lon_deg = -122.33
  }}
}}

ดูเพิ่ม

แม่แบบตำแหน่งบนแผนที่
  • แม่แบบ:Location map แสดงสัญลักษณ์และข้อความบนแผนที่ได้ 1 ตำแหน่งโดยใช้ค่าละติจูดและลองจิจูด
  • แม่แบบ:Location map many แสดงสัญลักษณ์และข้อความบนแผนที่ได้สูงสุด 9 ตำแหน่ง
  • แม่แบบ:Location map+ แสดงสัญลักษณ์และข้อความบนแผนที่ได้ไม่จำกัดจำนวน
การสร้างค่านิยามแผนที่ใหม่
แม่แบบกล่องข้อมูล (Infobox template) ที่ใช้แม่แบบตำแหน่งบนแผนที่
List

return require('Module:Location map/data/USA')