Changeset 302 for tools

Show
Ignore:
Timestamp:
04/21/09 13:40:49 (17 months ago)
Author:
daniel
Message:

Added OL template to services
Added JSON to templates

Location:
tools/routingservice/branches/wrs-2.0/data
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • tools/routingservice/branches/wrs-2.0/data/services.xml

    r297 r302  
    1010                        <template name="gpx" format="xml" url="./data/templates/route/route_gpx.st"/> 
    1111                        <template name="xls" format="xml" url="./data/templates/route/route_xls.st"/> 
     12                        <template name="ol" format="html" url="./data/templates/route/route_openlayers.st"/> 
    1213                </templates> 
    1314                <in> 
     
    2930                        <template name="kml" format="xml" url="./data/templates/catch/catch_kml.st"/> 
    3031                        <template name="gml" format="xml" url="./data/templates/catch/catch_gml.st"/> 
     32                        <template name="ol" format="html" url="./data/templates/catch/catch_openlayers.st"/> 
    3133                </templates> 
    3234                <in> 
  • tools/routingservice/branches/wrs-2.0/data/templates/catch/catch_openlayers.st

    r301 r302  
    88    <script type="text/javascript"> 
    99        var map; 
    10                 var feature = { 
    11                  
    12                 }; 
     10                var feature = { "type": "FeatureCollection", 
     11                                                "features": [ 
     12                                                        { "type": "Feature", 
     13                                                                "geometry": { 
     14                                                                        "type": "Polygon", 
     15                                                                        "coordinates": [[ $poly$ ]] 
     16                                                                }, 
     17                                                                "crs": { 
     18                                                                        "type": "EPSG", 
     19                                                                        "properties": {"code": "srid"} 
     20                                                                }, 
     21                                                                "properties": {} 
     22                                                        } 
     23                                                ], 
     24                                                "status": { 
     25                                                        "code": 200, 
     26                                                        "request": "catch" 
     27                                                }, 
     28                                                "user": { 
     29                                                        "request_id": "$request_id$" 
     30                                                } 
     31                                        }; 
    1332 
    1433        function init() { 
  • tools/routingservice/branches/wrs-2.0/data/templates/route/route_openlayers.st

    r300 r302  
    88    <script type="text/javascript"> 
    99        var map; 
    10                 var feature = { 
    11                  
    12                 }; 
     10                var feature = { "type": "FeatureCollection", 
     11                                                "features": [ 
     12$parameters:{ p | 
     13                                                        \{ "type": "Feature", 
     14                                                                "geometry": \{ 
     15                                                                        "type": "LineString", 
     16                                                                        "coordinates": [ 
     17                                                                                $p.line$ 
     18                                                                        ] 
     19                                                                \}, 
     20                                                                "crs": \{ 
     21                                                                        "type": "EPSG", 
     22                                                                        "properties": \{"code": "srid"\} 
     23                                                                \}, 
     24                                                                "properties": \{ 
     25                                                                        "id": "$p.id$" 
     26                                                                \} 
     27                                                        \} 
     28};separator=","$ 
     29                                                ], 
     30                                                "status": { 
     31                                                        "code": 200, 
     32                                                        "request": "route" 
     33                                                }, 
     34                                                "user": { 
     35                                                        "request_id": "$request_id$" 
     36                                                } 
     37                                        }; 
    1338 
    1439        function init() {