Changeset 618


Ignore:
Timestamp:
Dec 16, 2007, 10:47:54 PM (12 years ago)
Author:
Nick Burch
Message:

Start on bad postcode reporting stuff

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/openspace.npemap.org.uk/index.html

    r617 r618  
    1818var osMap;
    1919var markers;
    20 var url = "/cgi/get-postcodes.fcgi";
     20//var url = "/local-cgi/get-postcodes.fcgi";
     21var url = "/real-cgi/get-postcodes.fcgi";
    2122var grid = "osgb";
    2223
     
    4344        markers.clearMarkers();
    4445
    45         // Only display at zoom levels 8+
     46        // Update the link
     47        var en = osMap.getCenter();
     48        var easting = Math.round(en.lon/1000);
     49        var northing = Math.round(en.lat/1000);
     50        $('npe-link').href = "http://www.npemap.org.uk/tiles/map.html#" + easting + "," + northing + ",1";
     51
     52        // Only fetch postcode markers at zoom levels 8+
    4653        if(osMap.zoom < 8) {
    4754                return;
     
    8895
    8996        var pos = new OpenSpace.MapPoint(easting, northing);
    90         var content = "<div><b>Postcode:</b> " + postcode + "<br /><b>Location:</b> " + easting + ", " + northing + "<br /><b>Source:</b> " + sources[source] + "<br /><b>ID:</b> " + id + "</div>";
     97        var content = "<div>" +
     98                "<b>Postcode:</b> " + postcode + "<br />" +
     99                "<b>Location:</b> " + easting + ", " + northing + "<br />" +
     100                "<b>Source:</b> " + sources[source] + "<br />" +
     101                "<b>ID:</b> " + id +  "<br /><br />" +
     102                "<a href='#' id='bad-"+id+"'>Problem?</a>" +
     103        "</div>";
    91104
    92105        var marker = osMap.createMarker(pos, null, content);
     
    131144<div id="spinner" />
    132145
     146<div class="report_form" id="report_form" style="display:none">
     147<form method="post" action="../../cgi/bad-postcode.fcgi" id="bad_form">
     148        <input type="hidden" name="postcode" id="postcode_id_detail" />
     149        <input type="hidden" name="grid" id="grid2" />
     150        <label for="reason"><span title="Why you think it is incorrect">Problem:</span></label>
     151
     152        <input type="text" name="reason" id="reason" size="45"/><br/>
     153        <label for="reason_email"><span title="So we can let you know what we're doing about it.">email</span></label>
     154        <input type="text" name="email" id="reason_email" size="30"/>
     155        <input alt="submit" src="../images/btn_submit.png" type="image" />
     156</form>
     157</div>
     158
    133159</body>
    134160</html>
Note: See TracChangeset for help on using the changeset viewer.