WFS Fires , danger and GPS

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';
fireIconUrl = 'http://www.sparcsonline.com/tng/sites/all/modules/sparcs/sparcsmap/images/icons/fire_icon.svg';


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 fireIcon = L.icon({
    iconUrl: fireIconUrl,
    iconSize: [12, 12],
    iconAnchor: [6, 0],
    popupAnchor: [2, 2]
});

var owsrootUrl = 'http://gs.vm.sparcsonline.com/geoserver/sparcs/ows';

function setupAjax(typeName, SrsName, finalCallback) {
    var Ajaxparams = {
        service: 'WFS',
        version: '2.0',
        request: 'GetFeature',
        typeName: typeName,
        outputFormat: 'text/javascript',
        format_options: 'callback:getJson',
        SrsName: SrsName
    };
    var LayerParams = {
        url: owsrootUrl + L.Util.getParamString(L.Util.extend(Ajaxparams)),
        dataType: 'jsonp',
        jsonpCallback: 'getJson',
        success: finalCallback,
    };
    return LayerParams;
}




var gpsParameters = {
    service: 'WFS',
    version: '2.0',
    request: 'GetFeature',
    typeName: 'current_fire_gps',
    outputFormat: 'text/javascript',
    format_options: 'callback:getJson',
    SrsName: 'EPSG:4269'
};

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


var myStyle = {
    "color": "#ff0000",
        "weight": 2,
        "opacity": 0.65
};

var gpslayer = new L.geoJson(null, {
    style: myStyle,
    onEachFeature: function (feature, layer) {
        layer.bindPopup('<h3>' + feature.properties.fireid +
            '</h3>' + '<a href=mailto:' + feature.properties.user_email + '>' + feature.properties.user_ + '</a><br>' +
            '<br><small>Uploded: ' + feature.properties.date_ +
           ...