Esempio n. 1
0
def writeMapIndexKmlForDay(request, out, day, isToday):
    if isToday:
        dateStr = 'Today'
    else:
        dateStr = day.strftime('%Y-%m-%d')

    out.write("""
<Folder>
  <name>%(dateStr)s</name>
""" % dict(dateStr=dateStr))
    for layerOpts in meta.getTimeSeries():
        if 'map' in layerOpts:
            writeMapIndexKmlForDayAndLayer(request, out, day, layerOpts)
    out.write("</Folder>")
Esempio n. 2
0
def writeMapIndexKmlForDay(request, out, day, isToday):
    if isToday:
        dateStr = 'Today'
    else:
        dateStr = day.strftime('%Y-%m-%d')

    out.write("""
<Folder>
  <name>%(dateStr)s</name>
""" % dict(dateStr=dateStr))
    for layerOpts in meta.getTimeSeries():
        if 'map' in layerOpts:
            writeMapIndexKmlForDayAndLayer(request, out, day, layerOpts)
    out.write("</Folder>")
Esempio n. 3
0
def getMeta(request):
    return HttpResponse(dumps(meta.getTimeSeries()),
                        content_type='application/json')
Esempio n. 4
0
def getMeta(request):
    return HttpResponse(dumps(meta.getTimeSeries()),
                        content_type='application/json')