<commit_before><% content_for :stylesheet_yield do %>
  <link rel="stylesheet" href="http://code.leafletjs.com/leaflet-0.3.1/leaflet.css">
  <link rel="stylesheet" href="http://code.leafletjs.com/leaflet-0.3.1/leaflet.ie.css">

<% end %>

<!--<div id="map-main">-->
<!--  <div id="map-content-top">

  </div>
-->
  <% if @coordinates %>
  <div>
    <div class="controls">
        <div class="input-append">
            <%= form_tag("/map", :method=> "post") do%>
                <%= text_field_tag(:q, nil,  :value => @address_str,  :class => 'form-inline input-xx-large') %><%= submit_tag("Go", :class => 'btn btn-info btn') %>
            <% end %>
        </div>
    </div>
<!-- div that will display the map that is set using below javascript -->
    <div id="map"></div>
            <div class="detail-col">
                <table>
                    <thead>
                        <td><h4><%= @address.address %></h4>
                        <hr></hr></td>
                        
                    </thead>
                    <tr>
                        <td class="risk risk-title">Risk of this location:</td>
                    </tr>
                    <tr>
                        <% if @risk_level %>    
                          <td class="risk risk-<%= @risk_level %>"><%= @risk_text %>
                          </td>
                        <% else %>
                          <td class="risk">No risk data is available at this location</td>
                        <% end %>
                    </tr>
                    <tr>
                        <td class="note">
                            <a href="#" id="map-pop" data-content="<strong> About Risk Level </strong><br>The risk level is supplied by the Texas Forest Service Wildfire Risk Assessment 
                            Portal (TxWRAP), which uses the Fire Intensity Scale (FIS). 
                            The FIS quantifies potential fire intensity based on high to extreme weather 
                            conditions, fuels, and topography." class="note">About Risk Level</a>
                            <!--<a href="#" class="tooltip"> About Risk Level <span> 
                            <img class="callout" src="/assets/callout.png" /> 
                            <strong> About Risk Level </strong>
                            <br /> 
                            The risk level is supplied by the Texas Forest Service Wildfire Risk Assessment 
                            Portal (TxWRAP), which uses the Fire Intensity Scale (FIS). 
                            The FIS quantifies potential fire intensity based on high to extreme weather 
                            conditions, fuels, and topography. </span> </a>  
                            <span> 
                            <img class="callout" src="/assets/callout.png" /> -->
                            &#124;
                        <a href="http://www.texaswildfirerisk.com/Map" target="blank">go to TxWRAP site</a>
                        </td> 
                    </tr>        
                   <!-- <tr>
                        <td colspan="2" class="note">See more about your risk level, here.</td>
                    </tr>-->
                    <tr>
                        <td><span class="condition-type">Wind: </span><span class="condition"><%= @wind_conditions %></span></td>
                    </tr>
                    <tr>
                        <td><span class="condition-type">Humidity:</span><span class="class="condition"> <%= @relative_humidity %></span></td>
                    </tr>
                    <tr>
                        <td><span class="condition-type">Inside of a Burn Ban: </span><span class="class="condition"> <%= @inside_burnban %></span></td>
                    </tr>
                    <tr id="map-controls">
                        <td><label for="firestations" class="condition-type">Show Fire Stations</label>&nbsp<input type="checkbox" id="firestations" name="firestations" checked="checked" /></td>
                        </tr>
                        <tr>
                        <td class="note">
                            <a href="#" id="stations-pop" data-content="<strong>Please note</strong> that fire stations are shown for information purposes to better understand your local environment. Geographic proximity to a fire station, or many stations, does <b>not</b> mean you are safer." class="note">Important note about fire stations</a></td>

                    </tr>       
                </table>
            </div>
            <% unless user_signed_in? %>
                <div class="detail-col">
                  <h4>
                      Join prepared.ly &mdash; it's free!
                  </h4>
                    <a href="users/sign_up"><button class="btn btn-info btn-large"> <i class="icon-user icon-white"></i> sign up now </button></a>
                 </div>   
             <% end %>
             <div class="detail-col">
                  <h4>
                      Want to start getting more prepared <em>right now</em>?
                  </h4>
                    <a href="/tasks"><button class="btn btn-success btn-large"> <i class="icon-fire icon-white"></i> Get started! </button></a>
            </div>   



      </div>
    </div>  
<!--
  </div>-->
  <% else %>
  <div>Please enter a valid street address and try again.</div>
  <% end %>
</div>
<% content_for :javascript_yield do %>
  <!-- scripts -->
  <script type="text/javascript">
  $(document).ready(function() {
    $("#map-pop")
     .popover({/*trigger: 'manual'*/})
     .click(function(e){
       e.preventDefault();
       //$('#map-pop').popover('show');
    });
   });
  $(document).ready(function() {
    $("#stations-pop")
     .popover({/*trigger: 'manual'*/})
     .click(function(e){
       e.preventDefault();
       //$('#stations-pop').popover('show');
    });
   });
  </script>
  <script src="http://code.leafletjs.com/leaflet-0.3.1/leaflet.js"></script>
<!--  <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
  <script type="text/javascript" src="app/assets/javascripts/wax.leaflet.min.js"></script>
  <script type="text/javascript" src="app/assets/javascripts/cartodb-leaflet.js"></script>-->

  <% if @coordinates %>
    <script type="text/javascript">
        $(document).ready(function() {

          stamenTilesWithStations();

          function stamenTilesWithStations() {

            // make a map, using normal leaflet and stamen toner tiles
            var map = new L.Map('map', {maxZoom: 18});
            var mapCenter = new L.LatLng(<%= @address.latlon.y %>, <%= @address.latlon.x %>);
            var mapZoom = 12;
            var baseUrl = 'http://{s}.tile.stamen.com/terrain/{z}/{x}/{y}.jpg',
                attrib = 'Map tiles by Stamen',
                baseLayer = new L.TileLayer(baseUrl, {attribution: attrib, maxZoom:18});
            map.addLayer(baseLayer);

            var tx_burn_ban_counties = new L.CartoDBLayer({
            show_cartodb_logo: false,
            map_canvas: 'map',
            map: map,
            user_name:'tinio',
            table_name: 'cntys04',
            query: "SELECT cartodb_id, the_geom_webmercator FROM {{table_name}} WHERE name in (<%= @counties_list %>)",
            infowindow: "SELECT cartodb_id, name_locas FROM {{table_name}} WHERE cartodb_id={{feature}}",
            auto_bound: false 
            });

            var homeMarker = new L.Marker(new L.LatLng(<%= @address.latlon.y %>, <%= @address.latlon.x %>));
            map.addLayer(homeMarker);
            map.setView(mapCenter, mapZoom);


            var MyIcon = L.Icon.extend({
                iconUrl: '/assets/firestation.png',
                shadowUrl: '',
                iconSize: new L.Point(40, 13),
                shadowSize: new L.Point(0, 0),
                iconAnchor: new L.Point(20, 13),
                popupAnchor: new L.Point(-3, -26)
            });

            var icon = new MyIcon();

            var fire_stations = <%=raw @fs.to_json %>

            var stations = new L.LayerGroup();
            for(f in fire_stations){
                station = fire_stations[f];
                console.log(station);
                
                var m = new L.Marker(new L.LatLng(station.latlon.coordinates[1], station.latlon.coordinates[0]), {icon:icon});
                stations.addLayer(m);
                m.bindPopup(station.address + "<br />Austin, TX " + station.zip).openPopup();
            }
            map.addLayer(stations);

            $('#firestations').click(function(){
                if($(this).is(":checked")){
                     map.addLayer(stations);
                }else{
                    map.removeLayer(stations);
                }
            })

          }
        });
    </script>
  <% end %>
<% end %>

<commit_msg>tried to add WMS layer of red flag warnings<commit_after><% content_for :stylesheet_yield do %>
  <link rel="stylesheet" href="http://code.leafletjs.com/leaflet-0.3.1/leaflet.css">
  <link rel="stylesheet" href="http://code.leafletjs.com/leaflet-0.3.1/leaflet.ie.css">

<% end %>

<!--<div id="map-main">-->
<!--  <div id="map-content-top">

  </div>
-->
  <% if @coordinates %>
  <div>
    <div class="controls">
        <div class="input-append">
            <%= form_tag("/map", :method=> "post") do%>
                <%= text_field_tag(:q, nil,  :value => @address_str,  :class => 'form-inline input-xx-large') %><%= submit_tag("Go", :class => 'btn btn-info btn') %>
            <% end %>
        </div>
    </div>
<!-- div that will display the map that is set using below javascript -->
    <div id="map"></div>
            <div class="detail-col">
                <table>
                    <thead>
                        <td><h4><%= @address.address %></h4>
                        <hr></hr></td>
                        
                    </thead>
                    <tr>
                        <td class="risk risk-title">Risk of this location:</td>
                    </tr>
                    <tr>
                        <% if @risk_level %>    
                          <td class="risk risk-<%= @risk_level %>"><%= @risk_text %>
                          </td>
                        <% else %>
                          <td class="risk">No risk data is available at this location</td>
                        <% end %>
                    </tr>
                    <tr>
                        <td class="note">
                            <a href="#" id="map-pop" data-content="<strong> About Risk Level </strong><br>The risk level is supplied by the Texas Forest Service Wildfire Risk Assessment 
                            Portal (TxWRAP), which uses the Fire Intensity Scale (FIS). 
                            The FIS quantifies potential fire intensity based on high to extreme weather 
                            conditions, fuels, and topography." class="note">About Risk Level</a>
                            <!--<a href="#" class="tooltip"> About Risk Level <span> 
                            <img class="callout" src="/assets/callout.png" /> 
                            <strong> About Risk Level </strong>
                            <br /> 
                            The risk level is supplied by the Texas Forest Service Wildfire Risk Assessment 
                            Portal (TxWRAP), which uses the Fire Intensity Scale (FIS). 
                            The FIS quantifies potential fire intensity based on high to extreme weather 
                            conditions, fuels, and topography. </span> </a>  
                            <span> 
                            <img class="callout" src="/assets/callout.png" /> -->
                            &#124;
                        <a href="http://www.texaswildfirerisk.com/Map" target="blank">go to TxWRAP site</a>
                        </td> 
                    </tr>        
                   <!-- <tr>
                        <td colspan="2" class="note">See more about your risk level, here.</td>
                    </tr>-->
                    <tr>
                        <td><span class="condition-type">Wind: </span><span class="condition"><%= @wind_conditions %></span></td>
                    </tr>
                    <tr>
                        <td><span class="condition-type">Humidity:</span><span class="class="condition"> <%= @relative_humidity %></span></td>
                    </tr>
                    <tr>
                        <td><span class="condition-type">Inside of a Burn Ban: </span><span class="class="condition"> <%= @inside_burnban %></span></td>
                    </tr>
                    <tr id="map-controls">
                        <td><label for="firestations" class="condition-type">Show Fire Stations</label>&nbsp<input type="checkbox" id="firestations" name="firestations" checked="checked" /></td>
                        </tr>
                        <tr>
                        <td class="note">
                            <a href="#" id="stations-pop" data-content="<strong>Please note</strong> that fire stations are shown for information purposes to better understand your local environment. Geographic proximity to a fire station, or many stations, does <b>not</b> mean you are safer." class="note">Important note about fire stations</a></td>

                    </tr>       
                </table>
            </div>
            <% unless user_signed_in? %>
                <div class="detail-col">
                  <h4>
                      Join prepared.ly &mdash; it's free!
                  </h4>
                    <a href="users/sign_up"><button class="btn btn-info btn-large"> <i class="icon-user icon-white"></i> sign up now </button></a>
                 </div>   
             <% end %>
             <div class="detail-col">
                  <h4>
                      Want to start getting more prepared <em>right now</em>?
                  </h4>
                    <a href="/tasks"><button class="btn btn-success btn-large"> <i class="icon-fire icon-white"></i> Get started! </button></a>
            </div>   



      </div>
    </div>  
<!--
  </div>-->
  <% else %>
  <div>Please enter a valid street address and try again.</div>
  <% end %>
</div>
<% content_for :javascript_yield do %>
  <!-- scripts -->
  <script type="text/javascript">
  $(document).ready(function() {
    $("#map-pop")
     .popover({/*trigger: 'manual'*/})
     .click(function(e){
       e.preventDefault();
       //$('#map-pop').popover('show');
    });
   });
  $(document).ready(function() {
    $("#stations-pop")
     .popover({/*trigger: 'manual'*/})
     .click(function(e){
       e.preventDefault();
       //$('#stations-pop').popover('show');
    });
   });
  </script>
  <script src="http://code.leafletjs.com/leaflet-0.3.1/leaflet.js"></script>
<!--  <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
  <script type="text/javascript" src="app/assets/javascripts/wax.leaflet.min.js"></script>
  <script type="text/javascript" src="app/assets/javascripts/cartodb-leaflet.js"></script>-->

  <% if @coordinates %>
    <script type="text/javascript">
        $(document).ready(function() {

          stamenTilesWithStations();

          function stamenTilesWithStations() {

            // make a map, using normal leaflet and stamen toner tiles
            var map = new L.Map('map', {maxZoom: 18});
            var mapCenter = new L.LatLng(<%= @address.latlon.y %>, <%= @address.latlon.x %>);
            var mapZoom = 12;
            var baseUrl = 'http://{s}.tile.stamen.com/terrain/{z}/{x}/{y}.jpg',
                attrib = 'Map tiles by Stamen',
                baseLayer = new L.TileLayer(baseUrl, {attribution: attrib, maxZoom:18});
            map.addLayer(baseLayer);

            var tx_burn_ban_counties = new L.CartoDBLayer({
            show_cartodb_logo: false,
            map_canvas: 'map',
            map: map,
            user_name:'tinio',
            table_name: 'cntys04',
            query: "SELECT cartodb_id, the_geom_webmercator FROM {{table_name}} WHERE name in (<%= @counties_list %>)",
            infowindow: "SELECT cartodb_id, name_locas FROM {{table_name}} WHERE cartodb_id={{feature}}",
            auto_bound: false 
            });

            var homeMarker = new L.Marker(new L.LatLng(<%= @address.latlon.y %>, <%= @address.latlon.x %>));
            map.addLayer(homeMarker);
            map.setView(mapCenter, mapZoom);


            var MyIcon = L.Icon.extend({
                iconUrl: '/assets/firestation.png',
                shadowUrl: '',
                iconSize: new L.Point(40, 13),
                shadowSize: new L.Point(0, 0),
                iconAnchor: new L.Point(20, 13),
                popupAnchor: new L.Point(-3, -26)
            });

            var icon = new MyIcon();

            var fire_stations = <%=raw @fs.to_json %>

            var stations = new L.LayerGroup();
            for(f in fire_stations){
                station = fire_stations[f];
                console.log(station);
                
                var m = new L.Marker(new L.LatLng(station.latlon.coordinates[1], station.latlon.coordinates[0]), {icon:icon});
                stations.addLayer(m);
                m.bindPopup(station.address + "<br />Austin, TX " + station.zip).openPopup();
            }
            map.addLayer(stations);

            $('#firestations').click(function(){
                if($(this).is(":checked")){
                     map.addLayer(stations);
                }else{
                    map.removeLayer(stations);
                }
            })

            var redflags = new L.TileLayer.WMS("http://2192.168.127.12/cgi-bin/mapserv?map=/usr/local/mapserver_config/db_data/fwx.map", {
              VERSION: '1.1.1',
              REQUEST: 'GetMap',
              SRS: 'EPSG:4326',
              tileSize: 1024,
              LAYERS: 'fwx',
              TRANSPARENT: true,
              FORMAT: 'image/png'
            })
            map.addLayer(redflags);
          }
        });
    </script>
  <% end %>
<% end %>


{'fraction_non_alphanumeric': 0.15261220677910234, 'fraction_numerical': 0.0062077679503378565, 'mean_word_length': 1.5098579897973252, 'pattern_counts': {'":': 2, '<': 361, '<?xml version=': 0, '>': 369, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 1, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6482096', 'n_tokens_mistral': 5355, 'n_tokens_neox': 4914, 'n_words': 1143}