轨迹回放App开放页面
### 资源地址: ui/tracking/js /jquery-1.8.3.min.js(第三方资源) ui/ tracking /js/ API.js ui/ tracking /js/ MapWidget.js ui/ tracking /js/ TrackingWidget.js ### 演示包下载: static/file/openpage_v1_92 "点击下载") 展示效果如图 ![](static/picture/595f5e34240eb.jpg) ### Demo示例: - 1.引入资源(资源可以下载到本地) ```html <!-- 控件依赖的js --> <script src="ui/tracking/js/jquery-1.8.3.min.js"></script> <script src=" ui/tracking/js/API.js"></script> <script src=" ui/tracking/js/MapWidget.js"></script> <script src=" ui/tracking/js/TrackingWidget.js"></script> ``` - 2.创建容器 ```html <div id="widget"></div> ``` - 3.渲染组件 ```javascript <script type="text/javascript"> var _w=$("#widget").TrackingWidget({ merchantId:"100000", userName:"jasion_api", getTrackingParam:function(merchantId,userName,requestTime,vehicleId,startTime,endTime,excute,widget){ var param={ merchantId:merchantId, userName:userName, requestTime:requestTime, vehicleId:vehicleId, startTime:startTime, endTime:endTime }; $.ajax({ type:"POST", url:"http://172.16.0.105:8080/SSO/md5/getVehicleListParamMD5", dataType:"json", data:param, success:function(result){ var sign=result.sign; param.sign=sign; excute(param,widget); }, error:function(XMLHttpRequest, textStatus, errorThrown){ } }); }, getTripParam:function(merchantId,userName,requestTime,vehicleId,startTime,excute,widget){ var param={ merchantId:merchantId, userName:userName, requestTime:requestTime, vehicleId:vehicleId, startTime:startTime }; $.ajax({ type:"POST", url:"http://172.16.0.105:8080/SSO/md5/getVehicleListParamMD5", dataType:"json", data:param, success:function(result){ var sign=result.sign; param.sign=sign; excute(param,widget); }, error:function(XMLHttpRequest, textStatus, errorThrown){ } }); } }); </script> ``` getTrackingParam, getTripParam这两个个函数是需要用户自己实现的后台加密处理。 通过ajax经后台加密后,得到加密的请求参数后,再执行查询成为的业务数据 excute(param,widget) 后台的加密方式实现及加密密钥,我们会通过邮件告知对方。 ### 组件参数说明 |参数名称|类型|说明|备注| |:---- |:------- |:--- |------ | |merchantId |String |商户Id |必填 | |userName |String |请求用户名|必填|