maps v3 cluster infobox etc
by ian_smithz
JavaScript
/**
* Created by sparker on 27/05/15.
*/
(function(factory) {
if (typeof define === "function" && define.amd) {
define (["jquery"], factory);
} else {
factory(jQuery);
}
}(function ($) {
$.extend($.fn, {
networkReporting: function (options) {
var attached = $.data(this[0], "networkReporting");
if (attached) {
return attached;
}
attached = new $.networkReporting(options, this[0]);
$.data(this[0], "networkReporting", attached);
return attached;
}
});
$.networkReporting = function (options) {
this.settings = $.extend(true, {}, $.networkReporting.defaults, options);
this.init();
};
$.extend($.networkReporting, {
defaults: {
mapViewButtonSelector: '#mapViewButton',
tableViewButtonSelector: '#tableViewButton',
mapViewSelector: '#mapView',
tableViewSelector: '#tableView',
networkOverviewViewSelector: '#networkOverview',
loadingViewSelector: '#network-loading-view',
tableViewTableSelector: '#tableViewTable',
dataTablesSearchBoxSelector: '#dtSearchBox',
dataTablesSearchResetSelector: '#dtSearchReset',
dataTablesSiteSelectSelector: '#dtSiteSelect',
dataTablesOptions: {
dom: 'tp'
},
filterButtonContainerSelector: '#service-type-filter-buttons',
filterButtonSelector: 'label',
allFilterButtonSelector: '#All',
mapElementId: 'map_canvas',
defaultLatitude: 53.8,
defaultLongitude: -4.3,
editAliasURL: '/edit-alias',
loadDataURL: '/network-reporting-api/getOverview',
lineDetailURL: '/network-reporting-detail',
connectionStatusURL: '/network-reporting-api/getConnectionStatus',
imageUnknown: {
url:...