From 0723049b7785749898fede88452055a66c49770e Mon Sep 17 00:00:00 2001
From: fengxiang <110431245@qq.com>
Date: Wed, 07 Feb 2018 11:50:51 +0800
Subject: [PATCH] 地图相关资源

---
 src/main/webapp/js/moralmap.js |   40 +++++++++++++++++++++-------------------
 1 files changed, 21 insertions(+), 19 deletions(-)

diff --git a/src/main/webapp/js/moralmap.js b/src/main/webapp/js/moralmap.js
index 107a9c1..4efef27 100644
--- a/src/main/webapp/js/moralmap.js
+++ b/src/main/webapp/js/moralmap.js
@@ -26,20 +26,20 @@
 	/*
 	 * ������mac������������version
 	 */
-	moralMap.getVersion = function(mac){
-		var version = null;
-		$.ajax({
-			type:"get",
-			url:"getversion?mac="+mac,
-			async:false,
-			success:function(jsonData){
-				if(jsonData!=null&&typeof jsonData=='object'){
-					version = jsonData['version'];
-				}
-			}
-		});
-		return version;
-	}
+	// moralMap.getVersion = function(mac){
+	// 	var version = null;
+	// 	$.ajax({
+	// 		type:"get",
+	// 		url:"getversion?mac="+mac,
+	// 		async:false,
+	// 		success:function(jsonData){
+	// 			if(jsonData!=null&&typeof jsonData=='object'){
+	// 				version = jsonData['version'];
+	// 			}
+	// 		}
+	// 	});
+	// 	return version;
+	// }
 	/*
 	 * ���������������������
 	 */
@@ -260,7 +260,7 @@
 			mac: (row['mac']).toLowerCase(),
 			longitude: row['longitude'],
 			latitude: row['latitude'],
-			version:moralMap.getVersion(row['mac'])
+            version:row['deviceVersion']['version']
 		}
 		var equStr = JSON.stringify(equ);
 		if(window["console"]!=undefined){
@@ -736,11 +736,13 @@
 	}
 	//������MonitorPoint������
 	moralMap.putEquipment = function(key, obj) {
-		key = String.prototype.toLowerCase.call(key);
-		if(moralMap['_equipments'] == undefined) {
-			moralMap['_equipments'] = {};
+		if(key!=null&&key!=""){
+            key = String.prototype.toLowerCase.call(key);
+            if(moralMap['_equipments'] == undefined) {
+                moralMap['_equipments'] = {};
+            }
+            moralMap['_equipments'][key] = obj;
 		}
-		moralMap['_equipments'][key] = obj;
 	}
 	moralMap.getEquipment = function(key) {
 		if(key == null){

--
Gitblit v1.8.0