root/tools/routingservice/branches/wrs-2.0/data/templates/geocode/geocode_geojson.st

Revision 320, 1.0 KB (checked in by anton, 19 months ago)

Geocode OL template fixed

Line 
1{ "type": "FeatureCollection",
2        "features": [
3$parameters:{ p |       
4                \{ "type": "Feature",
5                        "geometry": \{
6                                "type": "Point",
7                                "coordinates":  $p.point$
8                        \},
9                        "crs": \{
10                                "type": "EPSG",
11                                "properties": \{"code": "$p.srid$"\}
12                        \},
13                        "properties": \{       
14                                "address": "$p.address$",
15                                "AddressDetails": \{
16                                        "Country": \{
17                                                "CountryNameCode": "$p.country$",
18                                                "AdministrativeArea": \{
19                                                        "AdministrativeAreaName": "$p.area$",
20                                                        "SubAdministrativeArea": \{
21                                                                "SubAdministrativeAreaName": "$p.subarea$",
22                                                                "Locality": \{
23                                                                        "LocalityName": "$p.locality$",
24                                                                        "Thoroughfare": \{
25                                                                                "ThoroughfareName": "$p.thouroughfare$"
26                                                                        \},
27                                                                        "PostalCode": \{
28                                                                                "PostalCodeNumber": "$p.postal$"
29                                                                        \}
30                                                                \}
31                                                        \}
32                                                \}
33                                        \},
34                                        "Accuracy": "$p.precision$"
35                                \}                     
36                        \}
37                \}
38};separator=","$               
39        ],
40        "status": {
41                "code": 200,
42                "request": "geocode"
43        },
44        "user": {
45                "request_id": "$p.request_id$"
46        },
47}
Note: See TracBrowser for help on using the browser.