Last modified: 2012-12-24 07:56:59 UTC
In my application I use `MapsLocation' class. I faced a minor issue: if I have an instance of `MaspLocation' class, there is no way to distinguish where zero altitude was explicitly set or altitude was not set at all, because zero is the default value which is also valid altitude value. Could be the default value of altitude changed to `null', so application can recognize whether altitude was set or not? Thanks.
Sure, feel free to modify this (as long as it does not break Maps/SM functionality). I'd actually like to make more extensive modifications to the coordinate/location handling, since right now it's a bit of a mess. The MapsCoordinateParser class does both formatting and parsing, and the MapsLocation class contains both the coordinates and a bunch of meta-data. It'd be better to have some MapsCoordinates class with parsing and formatting methods (possibly making use of separate parsing and formatting classes), and then a MapsLocation class which contains a MapsCoordinates one and holds the meta data.
These changes are on the roadmap for 1.1 btw. First need to rel 1.0.5.
Certainly done in version 3.0, which now uses this class: https://github.com/wikimedia/mediawiki-extensions-DataValues/blob/542a94b5e05d0be4ba2c4849d20f3d51731f609c/DataValues/includes/values/GeoCoordinateValue.php#L70