";
};
$.fn.eqMap.polyObjectHtml = function(obj) {
return "ehllo";
};
//map configs.
$.fn.eqMap.standardDefaults = {
evid: null, //used only for historic map
lat: 45.07, //starting center
lng: -125.95, //starting center
zoom: 6,
attributionControl:true,
zoomControl: true,
closePopupOnClick: true,
dragging: true,
scrollWheelZoom: true,
zoomToFit: false,
drawControl: true,
//End gmap API calls
magMin: -2,
magMax: 7,
authNetworks: ['ci'],
//Throw warning(alert) when this many events are requested.;
list_limit: 2500,
plot_relative_to_evid: false,
//define collections for points(eqs and stations)
params: {
eq: {},
sta: {}
}, //these are top level since they may need overwriting on dynamic templates
//eqs:
//evid should be int for historical map before/after icons
//auth string
//version int
//lat float float
//lng float
//depth_km float
//depth_mi float
//magnitude, float
//event_time_utc string time stamp (optional for bubble and list only)
//event_time_local string time stamp (optional for bubble and list only)
//event_time_epoch float
//events.etype" string ('re', 'le', 'ex', 'px') regional, local, explosion, probable explosion
points: {
eq: {
displayOnLoad: true,
urls: ["https://pnsn.org/events/recent_events.json", "https://pnsn.org/non_net_events/recent_events.json"],
icon: $.fn.eqMap.eqIcon,
bubbleHtml: $.fn.eqMap.eqBubbleHtml,
listHtml: $.fn.eqMap.eqListHtml,
temporalSteps: [3600 * 2, 2 * 86400],
cluster: null
}
//sta: {}
},
staIcon: $.fn.eqMap.staIcon,
//x-section icons
xSectionIconA: "A", //or really whatever HTML you want
xSectionIconB: "B",
xSectionIconDrag: "
",
xSectionIconTrans: "",
//you may add polygons by hosting a kml file on a webserver.
//gmaps caches the kml file. Use the following format for testing or if you have a dynamically generated kml file.
//url: "http://webserver/path/to/file.kml?dummy=" + (new Date()).getTime()
// you can validate your kml at http://googlemapsapi.blogspot.com/2007/06/validate-your-kml-online-or-offline.html
//A checkbox event is added to display each polygon file. Using a checkbox is optional.
//This Example assumes polygon is called 'boundaries' and displayOnDefault is set to true
//
//
//
//
//
//
polygons: {
boundaries: {
url: "https://pnsn.org/assets/json/pnsn_boundaries.geojson",
displayOnLoad: true
},
faults: {
url: "https://pnsn.org/assets/json/pnsn_faults.geojson",
displayOnLoad: false
}
},
bubbleHtmlSta: $.fn.eqMap.staBubbleHtml,
listHtmlSta: $.fn.eqMap.staListHtml,
contAvailURL : $.fn.eqMap.contAvailURL,
trigAvailURL : $.fn.eqMap.trigAvailURL,
//add logo to map
// logo: {
// logoHref: "/",
// logoWidth: "75px",
// logoSrc: "/assets/pnsn_logo_rev_no_wave_outline.png"
// },
// map summary html, i.e. Total, Largest, Smallest, Latest, Earliest
summaryHtmlEq: function(eqs) {
var minMag = eqs[0];
var maxMag = eqs[0];
var minDate = eqs[0];
var maxDate = eqs[0];
$.each(eqs, function(i, eq) {
if (parseFloat(eq.epoch) > parseFloat(maxDate.epoch)) {
maxDate = eq;
}
if (parseFloat(eq.epoch) < parseFloat(minDate.epoch)) {
minDate = eq;
}
if (parseFloat(eq.mag) > parseFloat(maxMag.mag)) {
maxMag = eq;
}
if (parseFloat(eq.mag) < parseFloat(minMag.mag)) {
minMag = eq;
}
});
var minDateObj = new Date(minDate.epoch * 1000);
var maxDateObj = new Date(maxDate.epoch * 1000);
return "