Last modified: 2014-02-12 23:45:54 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T52192, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 50192 - nearby search api to expose wikipedia nearby articles
nearby search api to expose wikipedia nearby articles
Status: RESOLVED INVALID
Product: MobileFrontend
Classification: Unclassified
Feature requests (Other open bugs)
unspecified
All All
: Unprioritized enhancement
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-25 19:59 UTC by Luigi Assom
Modified: 2014-02-12 23:45 UTC (History)
9 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Luigi Assom 2013-06-25 19:59:13 UTC
Hi, 

wikipedia exposes the nearby search of articles:
http://en.m.wikipedia.org/wiki/Special:Nearby

I now you can use prop=coordinates to expose the coordinates of one article.

http://en.wikipedia.org/w/api.php?action=query&prop=coordinates&titles=New%20Jersey|Venice&format=jsonfm

Is there any api to expose the nearby service for fetching articles close to one's coordinate?
How to do the nearby above?

I would like to fetch the curid (or curid + titles + images via prop modules) of closest articles, as in nearby indeed
Comment 1 Luigi Assom 2013-06-25 20:04:01 UTC
I would like to make a query to wikipedia to fetch articles close to a location of the users, such as (fake example here).

http://en.wikipedia.org/w/api.php?action=query&prop=coordinates&titles=New%20Jersey|Venice&format=jsonfm

Is there any nearby module exposing results which can be done in combination of other props?
How to obtain the nearby search like in wikimedia mobile?
{
    "query": {
        "pages": {
            "21648": {
                "pageid": 21648,
                "ns": 0,
                "title": "San Marco Square",
                "coordinates": [
                    {
                        "lat": 40,
                        "lon": -74.5,
                        "primary": "",
                        "globe": "earth"
                    }
                ]
            },
            "32616": {
                "pageid": 32616,
                "ns": 0,
                "title": "Venice",
                "coordinates": [
                    {
                        "lat": 45.4375,
                        "lon": 12.3358,
                        "primary": "",
                        "globe": "earth"
                    }
                ]
            }
        }
    }
}
Comment 2 Jon 2013-06-25 20:12:15 UTC
I'm not too clear on what the bug is here.

There is an API
http://en.wikipedia.org/wiki/Special:ApiSandbox?action=geosearch#action=query&list=geosearch&format=json&gscoord=51%7C3&gsradius=1000&gslimit=10

The extension that provides it is documented here:
http://www.mediawiki.org/wiki/Extension:GeoData

Hope this helps!
Come to irc.freenode.org #wikimedia-mobile to chat some more about this 


Also note there are plans to explore enabling nearby on a per page basis:
https://gerrit.wikimedia.org/r/#/c/70236/
Comment 3 Andre Klapper 2013-06-26 09:35:18 UTC
[Not an accessibility issue, removing the keyword. See http://en.wikipedia.org/wiki/Web_accessibility ]

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links