PageSourceSearch

https://its.bydgoszcz.pl/js/class/MapEvent.js

js its.bydgoszcz.pl collected 2026-10-04 17:15:22 UTC 1,762 bytes, 69 lines download raw bytes

1var MapEvent = function(){
2	
3	this.id				= 0;
4	this.name			= "";
5	this.description	= "";
6	this.lat			= 53.12180000;
7	this.lon			= 18.01000000;
8	this.type			= null;
9	this.dateFrom		= null;
10	this.dateTo		= null;	
11	this.datesError		= "BRAK WYBRANYCH DAT";
12
13 this.validateDates = function(){
14	 var e = this;
15	 if(e.dateFrom==null){
16		 e.datesError = "DATA ROZPOCZECIA JEST BŁĘDNA";
17		 return false;}
18	 if(e.dateTo==null) {
19		 e.datesError = "DATA ZAKOŃCZENIA JEST BŁĘDNA";
20		 return false;		 
21	 }
22	 
23	 
24	 
25	 var d1 = new Date(e.dateFrom);
26	 var d2 = new Date(e.dateTo);
27	 
28	 var roznica = d2.getTime()-d1.getTime();
29	 if(roznica<0){
30		 e.datesError = "DATA ZAKOŃCZENIA JEST WCZEŚNIEJ NIŻ ROZPOCZECIA";
31		 return false;
32	 }
33	 
34	 return true;
35 };
36 this.getObject = function(){
37     var t = this;
38     var ob = {};
39            ob.id		= t.id;
40            ob.name		= t.name;
41            ob.description	= t.description;
42            ob.lat              =   t.lat;
43            ob.lon              =   t.lon;
44            ob.type		= t.type;
45            ob.dateFrom		= t.dateFrom;
46            ob.dateTo           =   t.dateTo;
47            return ob;        
48 };
49 this.setFromObject = function(ob){
50        this.id=ob.id;
51        this.name=ob.name;
52        this.description=ob.description;
53        this.lat=ob.lat;
54        this.lon=ob.lon ; 
55        this.type= ob.type;	
56        this.dateFrom=ob.dateFrom;	
57        this.dateTo=ob.dateTo;
58 };
59 this.getIcon = function(){
60     var t = this;
61     switch(t.type){
62        case "roadEvent": return Events.getInstance().roadEventIcoUrl_m; break; 
63        case "roadWorks": return Events.getInstance().roadWorksIcoUrl_m; break; 
64        case "massEvent": return Events.getInstance().massEventIcoUrl_m; break; 
65     }
66 };
67	
68};
69

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.