Page MenuHomePhabricator

Add external map service limited to location
Open, NormalPublic

Description

Some map services offer their maps only for a limited region, so we need to show those links when the user is viewing only that region.

  • We could add geojson (geometry) field to the config file to specify the relevant region
  • The client could either see them based on the map view center, or overlaping bounding box
  • The geojson data will be stored in a separate file on the server, and merged with the externalData to minimize the payload (only referenced geojson objects will be attached to the result)

Schema:

{
  "regions": {
    // Value as returned from geoshapes service, GeoJSON's "geometries" field
    "Q30": {"type":"GeometryCollection","geometries":[{"type":"Polygon","coordinates":[[[-176.686, ...},
    ...
  }
  "services": [
  {
    "id": "us-and-canada-service",
    "featured": true,
    "region": ["Q30", "Q16"],  // US, Canada
    ...

Details

Related Gerrit Patches:
mediawiki/extensions/Kartographer : masterWIP: Add external map service limited to location

Event Timeline

Yurik created this task.Sep 24 2016, 10:55 AM
Restricted Application added a project: Discovery. · View Herald TranscriptSep 24 2016, 10:55 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Yurik updated the task description. (Show Details)Sep 27 2016, 3:20 PM
MaxSem added a subscriber: MaxSem.Sep 27 2016, 6:09 PM

Proper geocoding database would probably be noticeably heavy to download, do we need a geolocation API?

Yurik added a comment.Oct 6 2016, 8:40 PM

If we have server-side api, we would have to call it for every map move - so it will be a non-cachable flood of api calls on every map move stop. Instead, we should provide simplified (all data rounded to 1 decimal digit) simplified geoshapes that each client would download from cache, and reuse from thereon.

Yurik updated the task description. (Show Details)Oct 6 2016, 11:49 PM

Change 314636 had a related patch set uploaded (by Yurik):
WIP: Add external map service limited to location

https://gerrit.wikimedia.org/r/314636

Yurik removed a project: Maps.Dec 15 2016, 4:39 AM

Change 314636 abandoned by Sbisson:
WIP: Add external map service limited to location

Reason:
This change doesn't seem to be under active development. Please restore if I'm mistaken.

https://gerrit.wikimedia.org/r/314636

Pikne added a subscriber: Pikne.Sep 13 2018, 10:57 AM

Being able to configure both regional services and default services on wiki (T152971) would be nice.