Last modified: 2007-11-02 19:38:02 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 http://geotags.com/geo/geotags2.html 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 http://ontoworld.org/wiki/Type:Geographic_coordinate describes all the working coordinate formats.
Thanks for the analysis. I also came across the decimal seperator issue. We will see what we can do.
I think all of the above work now. Some more tests might be in order.