source: trunk/npemap.org.uk/static/api/geocoder.shtml @ 379

Last change on this file since 379 was 379, checked in by David Sheldon, 14 years ago

Tell people the URL.

File size: 1.6 KB
Line 
1
2<!--#set var="title" value="Geocoder" -->
3<!--#set var="shownav" value="yes" -->
4<!--#include virtual="../inc/header.shtml" -->
5
6<div id="api">
7
8<h4>Geocoder</h4>
9
10<p>Look up the location that we have for a postcode. If we don't have an exact
11match for the postcode you request, then we will do our best. If we don't have
12an exact match, we will return #s where we don't have exact matches.
13</p>
14
15<p> If you request the response with the format of 'js', then you can specify
16the name of a funtion call to wrap around the JSON response. This will call
17that method with the JSON as a parameter. </p>
18
19<h4>URL</h4>
20
21<pre>http://www.npemap.org.uk/cgi/geocoder.fcgi</pre>
22
23<h4>Arguments</h4>
24<dl>
25<dt>postcode (required)</dt>
26<dd>The postcode that you wish the location of. You can enter just the outward part if you wish.</dd>
27
28</dl>
29
30<h4>Example response</h4>
31
32<pre>
33# Easting,Northing,Matched Postcode
34434807,219133,'OX7 3##'
35</pre>
36
37
38<h4>Explorer</h4>
39<p>Try out this method without writing any code.</p>
40
41<form method="get" action="/cgi/geocoder.fcgi" target="iframe">
42
43<p>
44postcode: <input type="text" name="postcode" value="" size="30"> <br/>
45
46format:
47<input id="format_text" type="radio" name="format" value="text"> <label for="format_text">Text</label>
48<input id="format_js" type="radio" name="format" value="js" checked> <label for="format_js">JS</label>
49<input id="format_xml" type="radio" name="format" value="xml"> <label for="format_xml">XML</label
50
51<input type="submit" value="Go" />
52</p>
53</form>
54<iframe name="iframe" style="width: 40em; height: 20em">Output here</iframe
55
56</div>
57
58<!--#include virtual="../inc/footer.shtml" -->
Note: See TracBrowser for help on using the repository browser.