Basic stations & forecast point2

by spydmobile

HTML

<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.css">
<script src="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.js"></script>
<script src="http://leafletjs.com/dist/leaflet.js"></script>
<p>
    <div id="map" style="height: 480px;"></div>
</p>

JavaScript

console.clear();
console.log("Initializing");
mbUrl = 'https://{s}.tiles.mapbox.com/v3/{id}/{z}/{x}/{y}.png';
var mbAttr = 'Imagery © Mapbox';
var grayscale = L.tileLayer(mbUrl, {
    id: 'examples.map-20v6611k',
    attribution: mbAttr
}),
    streets = L.tileLayer(mbUrl, {
        id: 'examples.map-i86knfo3',
        attribution: mbAttr
    });


var weatherStations = {
    "type": "FeatureCollection",
    "features": [
        {
            "type": "Feature",
            "properties": {
                "popupContent": "Fort Smith HQ",
                "distance": "123 km to fire"
            },
            "geometry": {
                "type": "Point",
                "coordinates": [ -111.909, 60.0026]
            }
        },{
            "type": "Feature",
            "properties": {
                "popupContent": "Powder Lake QD",
                "distance": "456 km to fire"
            },
            "geometry": {
                "type": "Point",
                "coordinates": [-109.336, 61.0482]
            }
        },{
            "type": "Feature",
            "properties": {
                "popupContent": "Ninelin QD",
                "distance": "99 km to fire"
            },
            "geometry": {
                "type": "Point",
                "coordinates": [ -131.342, 67.8531]
            }
        }
    ]
};

var targetLocation = {
    "type": "FeatureCollection",
    "features": [
     {
            "type": "Feature",
            "properties": {
                "popupContent": "Wildfire ZZ001-99",
                "metadata": "Started on Wed"
            },
            "geometry": {
                "type": "Point",
                "coordinates": [ -123.429, 63.2075]
            }
        }
    ]
};

var map = L.map('map', {
    crs: L.CRS.EPSG900913,
    center: [65, -115],
    zoom: 4,
    layers: [streets, ]
});


  var stnLayer = L.geoJson([weatherStations], {
			style: function (feature) {
				return feature.properties &&...