Skip to content

Commit

Permalink
Add geographic references of maps to RSS feed (GeoRSS).
Browse files Browse the repository at this point in the history
Currently, this works only for bounding boxes, not for administrative
boundaries.

Signed-off-by: Gaël Utard <[email protected]>
Signed-off-by: Maxime Petazzoni <[email protected]>
  • Loading branch information
Gaël Utard authored and mpetazzoni committed Aug 7, 2010
1 parent 27cf64b commit 7795fad
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion www/maposmatic/feeds.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

import datetime

from django.contrib.syndication.feeds import Feed
from django.contrib.gis.feeds import Feed
from django.utils.translation import ugettext_lazy as _

from www.maposmatic import models
Expand Down Expand Up @@ -69,3 +69,9 @@ def items(self):
def item_title(self, item):
return item.maptitle

def item_geometry(self, item):
if item.administrative_city:
return None
else:
return (item.lon_upper_left, item.lat_upper_left,
item.lon_bottom_right, item.lat_bottom_right)

0 comments on commit 7795fad

Please sign in to comment.