Last modified: 2007-11-02 19:38:02 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 11679 - Geographic coordinate requires degree symbol, other compact format issues
Geographic coordinate requires degree symbol, other compact format issues
Product: MediaWiki extensions
Classification: Unclassified
Semantic MediaWiki (Other open bugs)
All All
: Normal enhancement (vote)
: ---
Assigned To: Markus Krötzsch
Depends on:
  Show dependency treegraph
Reported: 2007-10-16 09:49 UTC by S Page
Modified: 2007-11-02 19:38 UTC (History)
0 users

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


Description S Page 2007-10-16 09:49:47 UTC
User on semediawiki-devel complained that [[coordinates::38.926832, -77.03201]] for Washington, DC doesn't work.

This isn't a regression from 0.7, but it would be nice to support a more compact format. Formats like use this:
  <META NAME="geo.position" CONTENT="49.2;-123.4"> 

The code works by splitting on °|SMW_GEO_MIN|SMW_GEO_SEC|N|E|W|S 
in this case there's no split and the entire string is in $curnum.  This is hard to fix because comma might be a decimal point separator, but perhaps you could special case a check for /number,number/.

Arguably the code should report an error at  "// unprocessed chunk, error" if it hasn't accumulated a latitude.

Also, [[coordinates::32.715N 117.163W]] doesn't work, again the degree symbol is required.  In this case the code fails because no angle has accumulated, but $curnum holds the decimal value.

For now describes all the working coordinate formats.
Comment 1 Markus Krötzsch 2007-10-18 13:42:23 UTC
Thanks for the analysis. I also came across the decimal seperator issue. We will see what we can do.
Comment 2 Markus Krötzsch 2007-11-02 19:38:02 UTC
I think all of the above work now. Some more tests might be in order.

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