ProfessionalWiki / ProfessionalWiki/Maps

Map centred on the Pacific Ocean

Open
#777 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
JavaScript
Stars
78
Forks
65
Avg merge
9h 17m
Merged PRs (30d)
6

Description

Setup
  • Maps version: 11.0.1
  • MW version: 1.39.12
  • PHP version: 8.2.28 (fpm-fcgi)
  • SMW version: 4.2.0
Issue

On a map with coordinates on either side of the 180° meridian (International Date Line), they are plotted on the far left and right on a map centred on the Atlantic Ocean and not together on a map centred on the Pacific Ocean.
For example: {{#display_map:Tuvalu; Tokelau}}

Image
The option of getting something like the next map would be nice.
Image

On static maps you can force it by adding 360 to negative longitudes, but that is not so easy for SMW-generated maps or maps based on place names.

Same problem with maps that use a geojson with coordinates on either side of the 180° meridian, you probably want them together on a map centred on the Pacific Ocean, but they are now plotted on the far left and right on a map centred on the Atlantic Ocean.

By the looks of it, the map service has no problem with latitudes greater than 180 degrees. So the problem can be solved if there is an option where western latitudes or negative latitudes are converted to eastern latitudes or positive latitudes in the range of 180 to 360 degrees before being sent to the map service.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the {{#display_map:Tuvalu; Tokelau}} example and trace how place-name coordinates and GeoJSON coordinates reach the map service. Compare the Atlantic- and Pacific-centred examples, then verify that locations crossing the 180° meridian are grouped together without manual longitude changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
data-visualization, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.