* David MENTRE <[email protected]> [2012-12-14 08:41:50]: > Hello Maxime, > > Regarding your patch > http://git.savannah.gnu.org/cgit/maposmatic/ocitysmap.git/commit/?id=6b61f42c23a636dfab1d61d313b609f6006e4697 > > > + def as_json_bounds(self): > + """Returns this bounding box as an array of arrays that can be > + serialized as JSON.""" > + return [[self._lat1, self._long1], > + [self._lat2, self._long2]] > > I would have sent something like a record with named fields, it would > have been clearer and avoid programming errors. > > Something like: [{"lat":_lat1, "long":_long1}, {"lat":_lat2, "long":_long2}].
No there's actually a very good reason why it's a simple array (I was playing with Leaflet and it's easier to create bounds from an array like this in their API). /Max -- Maxime Petazzoni <http://www.bulix.org> ``One by one, the penguins took away my sanity.'' Writing software in California
signature.asc
Description: Digital signature
