# HG changeset patch # User Paul Boddie # Date 1360017350 -3600 # Node ID 2f8738a3b04cacd98ae7d8313ea557049171f61b # Parent 398454f2163f208c51304a0a390f299765d1a820 Allowed events with a map reference but without a location to be positioned. Such events employ a location constructed from the position as the location heading in the resulting map pop-up element. diff -r 398454f2163f -r 2f8738a3b04c EventAggregatorSupport.py --- a/EventAggregatorSupport.py Mon Feb 04 19:20:12 2013 +0100 +++ b/EventAggregatorSupport.py Mon Feb 04 23:35:50 2013 +0100 @@ -2974,13 +2974,22 @@ event_details = event.getDetails() location = event_details.get("location") + geo = event_details.get("geo") + + # Make a temporary location if an explicit position is given + # but not a location name. + + if not location and geo: + location = "%s %s" % tuple(geo) + + # Map the location to a position. if location is not None and not event_locations.has_key(location): # Get any explicit position of an event. - if event_details.has_key("geo"): - latitude, longitude = event_details["geo"] + if geo: + latitude, longitude = geo # Or look up the position of a location using the locations # page.