Subversion Repositories SmartDukaan

Rev

Rev 27402 | Rev 27408 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 27402 Rev 27405
Line 7... Line 7...
7
  height: 100%;
7
  height: 100%;
8
  width:100%;
8
  width:100%;
9
  position:absolute
9
  position:absolute
10
 
10
 
11
}
11
}
-
 
12
.map-icon-label .map-icon {
-
 
13
	font-size: 24px;
-
 
14
	color: #FFFFFF;
-
 
15
	line-height: 48px;
-
 
16
	text-align: center;
-
 
17
	white-space: nowrap;
12
 
18
}
13
/* Optional: Makes the sample page fill the window. */
19
/* Optional: Makes the sample page fill the window. */
14
html,
20
html,
15
body {
21
body {
16
  height: 100%;
22
  height: 100%;
17
  margin: 0;
23
  margin: 0;
Line 61... Line 67...
61
	   const coordinates = [];
67
	   const coordinates = [];
62
	   const icons = [];
68
	   const icons = [];
63
	   const lineSymbol = {
69
	   const lineSymbol = {
64
	    path: google.maps.SymbolPath.FORWARD_CLOSED_ARROW,
70
	    path: google.maps.SymbolPath.FORWARD_CLOSED_ARROW,
65
	   };
71
	   };
66
	
-
 
-
 
72
	  var infoWindow = new google.maps.InfoWindow();
67
	   
73
	   
68
	   for (var j = 0; j < locationMap.length; j++) {
74
	   for (var j = 0; j < locationMap.length; j++) {
69
			coordinates.push({lat:locationMap[j].lat, lng:locationMap[j].lng});
75
			coordinates.push({lat:locationMap[j].lat, lng:locationMap[j].lng});
70
			 icons.push({icon: lineSymbol, offset: "50%"});
76
			 icons.push({icon: lineSymbol, offset: "50%"});
-
 
77
			
-
 
78
		var data = locationMap[j];
-
 
79
		  var mapLength = locationMap.length;
-
 
80
		    console.log(mapLength);
-
 
81
			 var marker = new google.maps.Marker({
-
 
82
	          map: map,
-
 
83
	          position: {lat:locationMap[j].lat, lng:locationMap[j].lng},
-
 
84
	           icon: {
-
 
85
				path: google.maps.SymbolPath.CIRCLE,
-
 
86
				scale: 10 ,
-
 
87
				fillColor: '#00CCBB',
-
 
88
				fillOpacity: 1,
-
 
89
				strokeColor: '',
-
 
90
				strokeWeight: 0
-
 
91
			   },
-
 
92
			 
-
 
93
		   });
-
 
94
		   
-
 
95
		   var lastlocationmarker = new google.maps.Marker({
-
 
96
	          map: map,
-
 
97
	          position: {lat:locationMap[mapLength-1].lat, lng:locationMap[mapLength-1].lng}, 
-
 
98
		   });
-
 
99
	
-
 
100
		(function(marker, data) {
-
 
101
		      google.maps.event.addListener(marker, "mouseover", function(e) {
-
 
102
		        var d = new Date(data.createTime)
-
 
103
		        infoWindow.setContent(d.toLocaleString());
-
 
104
		        infoWindow.open(map, marker);
-
 
105
		  });
-
 
106
		      
-
 
107
	       google.maps.event.addListener(marker, "mouseout", function(e) {
-
 
108
	         infoWindow.close();
-
 
109
	      });
-
 
110
	    })(marker, data);
-
 
111
						   
71
		 }
112
		 }
72
	  const flightPath = new google.maps.Polyline({
113
	  const flightPath = new google.maps.Polyline({
73
	    path: coordinates,
114
	    path: coordinates,
74
	    icons: icons,
115
	    icons: icons,
75
	    geodesic: true,
116
	    geodesic: true,
Line 77... Line 118...
77
	    strokeOpacity: 1.0,
118
	    strokeOpacity: 1.0,
78
	    strokeWeight: 2
119
	    strokeWeight: 2
79
	  });
120
	  });
80
	  flightPath.setMap(map);
121
	  flightPath.setMap(map);
81
	
122
	
-
 
123
	
82
	}  
124
	} 
-
 
125
	 
83
}
126
}
84
</script>
127
</script>
85
 
128