<commit_before><% content_for :page_title, "Geocoding " + @plaque.title %>

<%= render 'plaques/edit_bar', :plaque => @plaque %>

<div class="panel">
  <h1>Where is this plaque?</h1>
  <%= form_for(@plaque) do |f| %>
    <% unless @plaque.geolocated? || @geocodes.length == 0%>
      <p>
        <strong>Geocodes from Flickr</strong><br/>
        <% @geocodes.each do |geocode| %>
          <%= geocode[0] %>, <%= geocode[1] %> (<%= geocode[2] %>)<br />
        <% end %>
      </p>
    <% end %>
    <br/>
    <p>Our goal is to accurately locate all plaques through real-life evidence. We do not use geocoding software as the results are inaccurate and it taint the openness of our data. It is okay to plot an approximate position, but please be sure to flag it as uncertain.</p>
    <br/>
    <% if current_user %>
      <p><%= label_tag(:address) %> <%= f.text_field(:address, size: 100) %></p>
      <p><%= f.label :area_id, "It's in" %> <%= f.collection_select :area_id, @areas, :id, :full_name, {:include_blank => true} %></p>
    <% end %>
    <p>Find the address '<%= @plaque.full_address %>' <a href="http://maps.google.com/maps?q=<%= @plaque.full_address %>&z=18" target="_new">on Google Maps</a></p>
    <div class="edit_lat_long">
      <p><%= label_tag(:streetview_url, "OpenStreetMap/Google/Geohack url:") %> <%= text_field_tag(:streetview_url, ' ', size: 100) %></p>
      <p>
        <%= f.label :latitude %> <%= f.text_field :latitude, :readonly => !current_user %>
        <%= f.label :longitude %> <%= f.text_field :longitude, :readonly => !current_user %> <a href="http://maps.google.com/maps?q=<%= @plaque.latitude %>,<%= @plaque.longitude %>&z=18" target="_new">on Google Maps</a>
      </p>
      <p>I am certain that this location is accurate <%= f.check_box :is_accurate_geolocation %> because it was located from a geocoded photo, or I have seen this plaque in Google Streetview/real life </p>
      <p><%= f.submit "Update", :class => :button  %></p>
    </div>
    <p>Of course, a photo will give you the position where the photographer was standing and Google Streetview where the cameracar was. You can drag and drop the blue dot to refine the position.</p>
    <div id="map" style="height: 400px; width: 100%; margin-top: 15px;"></div>
    <script>
      var map = null;
      var lat_element = null;
      var lon_element = null;
      var geolocation = new L.LatLng(52, 0);
      var view = 5;

      document.addEventListener("DOMContentLoaded", function() {
      	lat_element = document.getElementById('plaque_latitude');
      	lon_element = document.getElementById('plaque_longitude');

      	lat_element.addEventListener('blur', update_map);
      	lon_element.addEventListener('blur', update_map);

      	update_geolocation_from_text_fields();

      	var plaque_icon = new L.DivIcon({ className: 'plaque-marker', html: '', iconSize : 16 });

      	map = L.map('map').setView(geolocation, view);
<commit_msg>turn off annoying scroll zoom<commit_after><% content_for :page_title, "Geocoding " + @plaque.title %>

<%= render 'plaques/edit_bar', :plaque => @plaque %>

<div class="panel">
  <h1>Where is this plaque?</h1>
  <%= form_for(@plaque) do |f| %>
    <% unless @plaque.geolocated? || @geocodes.length == 0%>
      <p>
        <strong>Geocodes from Flickr</strong><br/>
        <% @geocodes.each do |geocode| %>
          <%= geocode[0] %>, <%= geocode[1] %> (<%= geocode[2] %>)<br />
        <% end %>
      </p>
    <% end %>
    <br/>
    <p>Our goal is to accurately locate all plaques through real-life evidence. We do not use geocoding software as the results are inaccurate and it taint the openness of our data. It is okay to plot an approximate position, but please be sure to flag it as uncertain.</p>
    <br/>
    <% if current_user %>
      <p><%= label_tag(:address) %> <%= f.text_field(:address, size: 100) %></p>
      <p><%= f.label :area_id, "It's in" %> <%= f.collection_select :area_id, @areas, :id, :full_name, {:include_blank => true} %></p>
    <% end %>
    <p>Find the address '<%= @plaque.full_address %>' <a href="http://maps.google.com/maps?q=<%= @plaque.full_address %>&z=18" target="_new">on Google Maps</a></p>
    <div class="edit_lat_long">
      <p><%= label_tag(:streetview_url, "OpenStreetMap/Google/Geohack url:") %> <%= text_field_tag(:streetview_url, ' ', size: 100) %></p>
      <p>
        <%= f.label :latitude %> <%= f.text_field :latitude, :readonly => !current_user %>
        <%= f.label :longitude %> <%= f.text_field :longitude, :readonly => !current_user %> <a href="http://maps.google.com/maps?q=<%= @plaque.latitude %>,<%= @plaque.longitude %>&z=18" target="_new">on Google Maps</a>
      </p>
      <p>I am certain that this location is accurate <%= f.check_box :is_accurate_geolocation %> because it was located from a geocoded photo, or I have seen this plaque in Google Streetview/real life </p>
      <p><%= f.submit "Update", :class => :button  %></p>
    </div>
    <p>Of course, a photo will give you the position where the photographer was standing and Google Streetview where the cameracar was. You can drag and drop the blue dot to refine the position.</p>
    <div id="map" style="height: 400px; width: 100%; margin-top: 15px;"></div>
    <script>
      var map = null;
      var lat_element = null;
      var lon_element = null;
      var geolocation = new L.LatLng(52, 0);
      var view = 5;

      document.addEventListener("DOMContentLoaded", function() {
      	lat_element = document.getElementById('plaque_latitude');
      	lon_element = document.getElementById('plaque_longitude');

      	lat_element.addEventListener('blur', update_map);
      	lon_element.addEventListener('blur', update_map);

      	update_geolocation_from_text_fields();

      	var plaque_icon = new L.DivIcon({ className: 'plaque-marker', html: '', iconSize : 16 });

      	map = L.map('map').setView(geolocation, view);
        map.scrollWheelZoom.disable();

{'fraction_non_alphanumeric': 0.16971630015108277, 'fraction_numerical': 0.010072183985227464, 'mean_word_length': 3.5, 'pattern_counts': {'":': 0, '<': 135, '<?xml version=': 0, '>': 145, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5990297', 'n_tokens_mistral': 2156, 'n_tokens_neox': 1947, 'n_words': 541}