]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/site/index.rhtml
Fixed up name search and postcode search
[rails.git] / app / views / site / index.rhtml
index 670f10a207558fe8d3e82ddc8a66c8850d6f1bb7..31b0a480e07d96015d1603511adf3ab24d49456b 100644 (file)
@@ -1,11 +1,24 @@
-<div id="geocoder">
-  <form action="/search.html">
-    <input type="text" name="query" value="" size="60">
-    <input type="submit" value="Search">
-  </form>
-</div>
 
 
+<div id="geocoder">
+  <%= start_form_tag :controller => 'geocoder', :action => 'search' %>
+  <%= text_field 'query', 'postcode'%>
+  <%= text_field 'query', 'place_name'%>
+  <%= submit_tag 'Search' %>
+  <%= end_form_tag %>
+
+<div id="geocoder-attribution">
+  Geolocation provided by <a href="http://npemap.org.uk/">npemap.org.uk</a>,
+  <a href="http://geocoder.us/">geocoder.us</a>, <a href="http://geocoder.ca/">geocoder.ca</a>
+  and <a href="http://www.geonames.org/">geonames.org</a>
+</div>
+<div id="postcode-helper">
+eg: SW15 6JH, 95472 or H2L4C1
+</div>
+<div id="placename-helper">
+eg:Essen
+</div>
+</div>
 
 <% lon =  params['lon'] || '-0.1' %>
 <% lat =  params['lat'] || '51.5' %>
@@ -36,7 +49,7 @@
   function init(){
 
     OpenLayers.Util.onImageLoadError = function() {
-      this.src = "http://<%= SERVER_URL %>/javascript/img/404.png";
+      this.src = "http://www.openstreetmap.org/javascript/img/404.png";
     }
     map = new OpenLayers.Map( "map", 
         {maxExtent: new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34), maxZoomLevel:18, maxResolution:156543, units:'meters', projection: "EPSG:41001"} );