maposmatic-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Maposmatic-dev] Comment about patch 6b61f42c23a636dfab1d61d313b609f


From: Maxime Petazzoni
Subject: Re: [Maposmatic-dev] Comment about patch 6b61f42c23a636dfab1d61d313b609f6006e4697
Date: Sun, 16 Dec 2012 03:54:51 -0800
User-agent: Mutt/1.5.21 (2010-09-15)

* David MENTRE <address@hidden> [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

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]