Changeset 4080 for cows/trunk


Ignore:
Timestamp:
31/07/08 15:32:05 (11 years ago)
Author:
spascoe
Message:

JSON debugged for IE7

Location:
cows/trunk/cows/pylons/templates
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cows/trunk/cows/pylons/templates/wms_capabilities_1_3_0.xml

    r4032 r4080  
    109109      <ContactPosition py:content="rp.positionName"/> 
    110110 
    111       <py:with vars="cn=rp.contactInfo" py:if="cn is not None"> 
     111      <py:with vars="cn=rp.contactInfo" py:if="rp.contactInfo is not None"> 
    112112        <ContactAddress py:if="cn.address is not None"> 
    113113          <AddressType>postal</AddressType> 
  • cows/trunk/cows/pylons/templates/wms_capabilities_json.txt

    r4079 r4080  
    33{% for ds in c.capabilities.contents.datasetSummaries %} 
    44  "${ds.identifier}": { 
    5     title: "${ds.titles[0]}", 
     5    "title": "${ds.titles[0]}", 
    66    {% if len(ds.abstracts)>0 %} 
    7     abstract: "${ds.abstracts[0]}", 
     7    "abstract": "${ds.abstracts[0]}", 
    88    {% end %} 
    9     crss: [${','.join(ds.CRSs)}], 
     9    "crss": [${','.join([`x` for x in ds.CRSs])}], 
    1010    {% with exBBox = ds.wgs84BoundingBoxes[0] %} 
    11     exbbox: [${exBBox.lowerCorner[0]}, ${exBBox.lowerCorner[1]}, ${exBBox.upperCorner[0]}, ${exBBox.upperCorner[1]}], 
     11    "exbbox": [${exBBox.lowerCorner[0]}, ${exBBox.lowerCorner[1]}, ${exBBox.upperCorner[0]}, ${exBBox.upperCorner[1]}], 
    1212    {% end %} 
    13     bboxes: { 
     13    "bboxes": { 
    1414    {% for bb in ds.boundingBoxes %} 
    1515      "${bb.crs}": [${'%.2f'%bb.lowerCorner[0]}, ${'%.2f'%bb.lowerCorner[1]}, ${'%.2f'%bb.upperCorner[0]}, ${'%.2f'%bb.upperCorner[1]}]{% if bb!=ds.boundingBoxes[-1]%},{% end %} 
    1616    {% end %} 
    1717    }, 
    18     dimensions: { 
     18    "dimensions": { 
    1919    {% with d_ns = ds.dimensions.keys() %} 
    2020    {% for d_n in d_ns %} 
    2121      "${d_n}": { 
    22         units: "${ds.dimensions[d_n].valuesUnit}", 
    23         unitSymbol: "${ds.dimensions[d_n].unitSymbol}", 
    24         default: "${ds.dimensions[d_n].defaultValue}", 
    25         extent: [${','.join(ds.dimensions[d_n].possibleValues.allowedValues)}], 
     22        "units": "${ds.dimensions[d_n].valuesUnit}", 
     23        "unitSymbol": "${ds.dimensions[d_n].unitSymbol}", 
     24        "default": "${ds.dimensions[d_n].defaultValue}", 
     25        "extent": [${','.join([`x` for x in ds.dimensions[d_n].possibleValues.allowedValues])}] 
    2626      }{% if d_n!=d_ns[-1] %},{% end %} 
     27    {% end %} 
    2728    {% end %} 
    2829    } 
Note: See TracChangeset for help on using the changeset viewer.