Pu Zhibing
2024-12-13 73b750200f25df08aa64124da49e7461f9de6653
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
/**
 * 初始化城市管理详情对话框
 */
var TOpenCityInfoDlg = {
    tOpenCityInfoData : {},
    editor: null,
    validateFields: {
        provinceId: {
            validators: {
                notEmpty: {
                    message: '请选择省'
                }
            }
        },
        cityId: {
            validators: {
                notEmpty: {
                    message: '请选择市'
                }
            }
        },
        isQualifications: {
            validators: {
                notEmpty: {
                    message: '请选择是否需要网约车资格证'
                }
            }
        }
    }
};
 
/**
 * 验证数据是否为空
 */
TOpenCityInfoDlg.validate = function () {
    $('#openCityForm').data("bootstrapValidator").resetForm();
    $('#openCityForm').bootstrapValidator('validate');
    return $("#openCityForm").data('bootstrapValidator').isValid();
};
 
 
/**
 * 清除数据
 */
TOpenCityInfoDlg.clearData = function() {
    this.tOpenCityInfoData = {};
}
 
/**
 * 设置对话框中的数据
 *
 * @param key 数据的名称
 * @param val 数据的具体值
 */
TOpenCityInfoDlg.set = function(key, val) {
    this.tOpenCityInfoData[key] = (typeof val == "undefined") ? $("#" + key).val() : val;
    return this;
}
 
/**
 * 设置对话框中的数据
 *
 * @param key 数据的名称
 * @param val 数据的具体值
 */
TOpenCityInfoDlg.get = function(key) {
    return $("#" + key).val();
}
 
/**
 * 关闭此对话框
 */
TOpenCityInfoDlg.close = function() {
    parent.layer.close(window.parent.TOpenCity.layerIndex);
}
 
/**
 * 收集数据
 */
TOpenCityInfoDlg.collectData = function() {
    this
    .set('id')
    .set('code')
    .set('lon')
    .set('lat')
    .set('isQualifications')
    .set('areaName')
    .set('cityName')
    .set('provinceName')
    .set('flag')
    .set('insertTime')
    .set('insertUser')
    .set('updateTime')
    .set('updateUser');
}
/**
 * 提交添加
 */
TOpenCityInfoDlg.addSubmit = function() {
 
    this.clearData();
    this.collectData();
    if(!this.validate()){
        return ;
    }
    var subArr=[];
    $(".timeClass").each(function () {
        subArr.push({
            busId:$(this).find("input[name*='busId']").val(),
            time:$(this).find("input[name*='time']").val(),
            type:$(this).find("input[name*='type']").val(),
            sort:$(this).find("input[name*='sort']").val(),
        })
    });
    var subArr1=[];
    $(".siteClass").each(function () {
        subArr1.push({
            busId:$(this).find("input[name*='busId']").val(),
            time:$(this).find("input[name*='time']").val(),
            name:$(this).find("input[name*='name']").val(),
            lonAndLat:$(this).find("input[name*='lonAndLat']").val(),
            siteType:$(this).find("input[name*='siteType']").val(),
        })
    });
    if(subArr.length <= 0){
        Feng.error("请选择经营业务");
        return;
    }
 
    //获取经纬度
    var provinceValue = $("#provinceId option:selected").text();
    var cityValue = $("#cityId option:selected").text();
    if ("选择市" == cityValue){
        cityValue = "";
    }
    var areaValue = $("#areaId option:selected").text();
    if ("选择区" == areaValue){
        areaValue = "";
    }
    //提交信息
    var ajax = new $ax(Feng.ctxPath + "/tOpenCity/add", function(data){
        Feng.success("添加成功!");
        window.parent.TOpenCity.table.refresh();
        TOpenCityInfoDlg.close();
    },function(data){
        Feng.error("添加失败!" + data.responseJSON.message + "!");
    });
    ajax.set(this.tOpenCityInfoData);
    ajax.set("businessTypeStr",JSON.stringify(subArr));
    ajax.set("sites",JSON.stringify(subArr1));
    ajax.set("areaName",provinceValue);
    ajax.set("cityName",cityValue);
    ajax.set("provinceName",areaValue);
    ajax.set("provinceId",$("#areaId").val());
    ajax.set("cityId",$("#cityId").val());
    ajax.set("areaId",$("#provinceId").val());
    ajax.start();
}
 
/**
 * 提交修改
 */
TOpenCityInfoDlg.editSubmit = function() {
 
    this.clearData();
    this.collectData();
    if(!this.validate()){
        return ;
    }
    var subArr=[];
    $(".timeClass").each(function () {
        subArr.push({
            busId:$(this).find("input[name*='busId']").val(),
            time:$(this).find("input[name*='time']").val(),
            type:$(this).find("input[name*='type']").val(),
            sort:$(this).find("input[name*='sort']").val(),
        })
    });
    var subArr1=[];
    $(".siteClass").each(function () {
        subArr1.push({
            busId:$(this).find("input[name*='busId']").val(),
            time:$(this).find("input[name*='time']").val(),
            name:$(this).find("input[name*='name']").val(),
            lonAndLat:$(this).find("input[name*='lonAndLat']").val(),
            siteType:$(this).find("input[name*='siteType']").val(),
        })
    });
    if(subArr.length <= 0){
        Feng.error("请选择经营业务");
        return;
    }
 
    //获取经纬度
    var provinceValue = $("#provinceId option:selected").text();
    var cityValue = $("#cityId option:selected").text();
    if ("选择市" == cityValue){
        cityValue = "";
    }
    var areaValue = $("#areaId option:selected").text();
    if ("选择区" == areaValue){
        areaValue = "";
    }
    //提交信息
    var ajax = new $ax(Feng.ctxPath + "/tOpenCity/update", function(data){
        Feng.success("修改成功!");
        window.parent.TOpenCity.table.refresh();
        TOpenCityInfoDlg.close();
    },function(data){
        Feng.error("修改失败!" + data.responseJSON.message + "!");
    });
    ajax.set(this.tOpenCityInfoData);
    ajax.set("businessTypeStr",JSON.stringify(subArr));
    ajax.set("sites",JSON.stringify(subArr1));
    ajax.set("areaName",provinceValue);
    ajax.set("cityName",cityValue);
    ajax.set("provinceName",areaValue);
    ajax.set("provinceId",$("#areaId").val());
    ajax.set("cityId",$("#cityId").val());
    ajax.set("areaId",$("#provinceId").val());
    ajax.start();
}
 
$(function() {
    Feng.initValidator("openCityForm", TOpenCityInfoDlg.validateFields);
});
 
/**
 * 省改变时执行
 */
TOpenCityInfoDlg.provinceChange = function () {
    var provinceId = $("#provinceId").val();
    var ajax = new $ax(Feng.ctxPath + "/tOpenCity/change", function(data){
        if(data!=null){
            var content='<option value="">选择市</option>';
            $.each(data, function(k,v) {
                content += "<option value='"+v.id+"'>"+v.name+"</option>";
            });
            $("#cityId").empty().append(content);
            $("#areaId").empty().append('<option value="">选择区</option>');
        }
    });
    ajax.set("id",provinceId);
    ajax.start();
}
/**
 * 市改变时执行
 */
TOpenCityInfoDlg.cityChange = function () {
    var cityId = $("#cityId").val();
    var ajax = new $ax(Feng.ctxPath + "/tOpenCity/change", function(data){
        if(data!=null){
            var content='<option value="">选择区</option>';
            $.each(data, function(k,v) {
                content += "<option value='"+v.id+"'>"+v.name+"</option>";
            });
            $("#areaId").empty().append(content);
        }
    });
    ajax.set("id",cityId);
    ajax.start();
}
 
/**
 * 点击添加业务类型
 */
function addBusinessType(){
    var businessType=$("#businessType option:selected").text();
    if ("选择经营业务" == businessType){
        Feng.info("请选择经营业务");
        return;
    }
    var businessSort=$("#businessSort").val();
    if ("" == businessSort){
        Feng.info("排序不能为空");
        return;
    }else if (!reg.test(businessSort)) {
        Feng.info("排序格式不正确");
        return;
    }
 
    //获取所有的值
    var subArr=[];
    $(".timeClass").each(function () {
        subArr.push({
            busId:$(this).find("input[name*='busId']").val(),
            time:$(this).find("input[name*='time']").val(),
            type:$(this).find("input[name*='type']").val(),
            sort:$(this).find("input[name*='sort']").val(),
        })
    });
    for(var i=0;i<subArr.length;i++){
        var time = subArr[i].time;
        var type = subArr[i].type;
        var sort = subArr[i].sort;
        if (type == businessType) {
            Feng.info("经营业务已存在,请重新选择");
            return;
        }
        if (sort == businessSort) {
            Feng.info("排序已存在,请重新填写");
            return;
        }
    }
    var str = '<tr class="timeClass">' +
        '<td><input type="hidden" id="busId" name="busId" value="0"><input type="hidden" id="time" name="time" value="'+getNowFormatDate()+'">' + getNowFormatDate() + '</td>' +
        '<td><input type="hidden" id="type" name="type" value="'+businessType+'">' + businessType + '</td>' +
        '<td><input type="hidden" id="sort" name="sort" value="'+businessSort+'">' + businessSort + '</td><td><button onclick="deleteSub(this)">移除</button></td></tr>';
    $("#coun").append(str);
}
function addSite(){
 
    var siteName=$("#siteName").val();
    var siteType=$("#siteType").val();
    var type = siteType;
    if ("" == siteName){
        Feng.info("站点名称不能为空");
        return;
    }
    if ("" == siteType){
        Feng.info("请选择站点类型");
        return;
    }
    if (siteType == 1){
        siteType = "机场"
    }else{
        siteType = "动车"
    }
    //获取所有的值
    var subArr=[];
    $(".siteClass").each(function () {
 
        subArr.push({
            name:$(this).find("input[name*='name']").val(),
            time:$(this).find("input[name*='time']").val(),
        })
    });
    for(var i=0;i<subArr.length;i++){
        var name = subArr[i].name;
        if (name == siteName) {
            Feng.info("站点名称已存在,请重新填写");
            return;
        }
    }
    var lon = $("#lon").val();
    var lat = $("#lat").val();
    var lonAndLat = "("+lon+","+lat+")";
    var str = '<tr class="siteClass">' +
        '<td><input type="hidden" id="busId" name="busId" value="0">' +
        '<input type="hidden" id="time" name="time" value="'+getNowFormatDate()+'">' + getNowFormatDate() + '</td>' +
        '<td><input type="hidden" name="name" value="'+siteName+'">' + // 保留隐藏输入以存储原始值
        '<input type="text" class="editable-name" value="'+siteName+'" onchange="updateHiddenInput(this)"> ' + // 添加可编辑输入
        '</td>' +        '<td><input type="hidden" id="lonAndLat" name="lonAndLat" value="'+lonAndLat+'">' + lonAndLat + '</td>' +
        '<td><input type="hidden" id="siteType" name="siteType" value="'+type+'">' + siteType + '</td>' +
        '<td><button onclick="deleteSub(this)">移除</button></td></tr>';
    $("#site").append(str);
}
 
function updateHiddenInput(inputElement) {
    var hiddenInput = inputElement.previousElementSibling; // 假设可编辑输入后面紧跟着隐藏输入
    hiddenInput.value = inputElement.value; // 当可编辑输入的值改变时,更新隐藏输入的值
}
function deleteSub(e) {
    $(e).parent().parent().remove();
}
 
/*
//获取当前时间,格式YYYY-MM-DD
function getNowFormatDate() {
    var date = new Date();
    var seperator1 = "-";
    var year = date.getFullYear();
    var month = date.getMonth() + 1;
    var strDate = date.getDate();
    if (month >= 1 && month <= 9) {
        month = "0" + month;
    }
    if (strDate >= 0 && strDate <= 9) {
        strDate = "0" + strDate;
    }
    var currentdate = year + seperator1 + month + seperator1 + strDate;
    return currentdate;
}
var  map = new AMap.Map('container', {
    resizeEnable: true, // 允许缩放
    zoom: 15        // 设置地图的缩放级别,0 - 20
});
var marker;
//搜索地图
TOpenCityInfoDlg.searchByStationName  = function(e,type){
    var keyword="";
    if(type==2){
        keyword = $(e).parent().prev().find("input").val();
    }else {
        if($("#address").val()!=null && $("#address").val()!=''){
            keyword = $("#address").val();
        }
    }
    type=1;
    AMap.plugin('AMap.Geocoder', function() {
        var geocoder = new AMap.Geocoder();
        console.log(geocoder)
        console.log(keyword)
        geocoder.getLocation(keyword, function(status, result) {
            console.log(status,result)
            if (status === 'complete' && result.info === 'OK') {
                // 经纬度
                var lng = result.geocodes[0].location.lng;
                var lat = result.geocodes[0].location.lat;
                $("#longitude").val(lng)
                $("#latitude").val(lat)
                // 地图实例
                map = new AMap.Map('container', {
                    resizeEnable: true, // 允许缩放
                    center: [lng, lat], // 设置地图的中心点
                    zoom: 15        // 设置地图的缩放级别,0 - 20
                });
                //地图画点
                //addMarker(lng,lat);
                if(type==1 || type==2){
                    showInfoClick();
                    if(lng == null){
                    }else{
                        addMarker(lng,lat);
                    }
                }else{
                    addMarker(lng,lat);
                }
            } else {
                console.log('定位失败!');
            }
        });
    });
 
}
//地图点击事件
function showInfoClick(){
    map.on('click', function (e) {
        addMarker(e.lnglat.getLng(),e.lnglat.getLat());
    });
}
//删除点
function removeMarkers(){
    if(marker!=null){
        map.remove(marker);
    }
 
}
// 实例化点标记
function addMarker(lon,lat) {
    removeMarkers();
    marker = new AMap.Marker({
        map: map,
        position: new AMap.LngLat(lon, lat),   // 经纬度
    });
    //加经纬度
    $("#lon").val(lon);
    $("#lat").val(lat);
    var lnglatXY = [lon, lat];//地图上所标点的坐标
    AMap.service('AMap.Geocoder',function() {//回调函数
        geocoder = new AMap.Geocoder({
        });
        geocoder.getAddress(lnglatXY, function (status, result) {
            if (status === 'complete' && result.info === 'OK') {
                //获得了有效的地址信息:
                //即,result.regeocode.formattedAddress
                // alert(result.regeocode.formattedAddress)
                //document.getElementById("address").value=result.regeocode.formattedAddress;//将获取到的地址信息赋值给文本框,保存进数据库
 
                var address = result.regeocode.formattedAddress;
                var city = result.regeocode.addressComponent.city;
                var province = result.regeocode.addressComponent.province;
                var district = result.regeocode.addressComponent.district;
                $("#address").val(address);
            } else {
                //获取地址失败
            }
        });
    })
}*/
//起点地图加载
var marker, map = new AMap.Map("container", {
    resizeEnable: true,
    zoom: 15,
    zooms: [3, 20]
}); //定位标注当前位置
/*map.plugin('AMap.Geolocation', function () {
    geolocation = new AMap.Geolocation({
        enableHighAccuracy: true, //是否使用高精度定位,默认:true
        timeout: 10000, //超过10秒后停止定位,默认:无穷大
        maximumAge: 0, //定位结果缓存0毫秒,默认:0
        convert: true, //自动偏移坐标,偏移后的坐标为高德坐标,默认:true
        showButton: true, //显示定位按钮,默认:true
        showMarker: true, //定位成功后在定位到的位置显示点标记,默认:true
        showCircle: true, //定位成功后用圆圈表示定位精度范围,默认:true
        panToLocation: true, //定位成功后将定位到的位置作为地图中心点,默认:true
        buttonPosition: 'LB', //定位按钮的停靠位置  LB左下角、  RB右下角
        buttonOffset: new AMap.Pixel(10, 20), //定位按钮与设置的停靠位置的偏移量,默认:Pixel(10, 20)
        zoomToAccuracy: true, //定位成功后调整地图视野范围使定位位置及精度范围视野内可见,默认:false
    });
 
    function onComplete(data) {
        var str = [];
        city = data.addressComponent.citycode;
        str.push('定位结果:' + data.position);
        str.push('定位类别:' + data.location_type);
        if (data.accuracy) {
            str.push('精度:' + data.accuracy + ' 米');
        }
        //如为IP精确定位结果则没有精度信息
        str.push('是否经过偏移:' + (data.isConverted ? '是' : '否'));
        var lnglatXY = [data.position.getLng(), data.position.getLat()];
        //地图上所标点的坐标
        AMap.service('AMap.Geocoder', function () {
            //回调函数
            geocoder = new AMap.Geocoder({});
            geocoder.getAddress(lnglatXY, function (status, result) {
                if (status === 'complete' && result.info === 'OK') {
//获得了有效的地址信息:                    //即,result.regeocode.formattedAddress
//                     console.log(result.regeocode.formattedAddress);
                    var address = result.regeocode.formattedAddress;
                    str.push('详细地址:' + address);
// todo 不弹出信息框
// alert(str.join(' | '));
                } else {
// alert(str.join(' | ')); //获取地址失败
                }
            });
        })
} //解析定位错误信息
function onError(data) {
    alert('定位失败,原因:' + data.message);
}
 
    map.addControl(geolocation);
    geolocation.getCurrentPosition()
    AMap.event.addListener(geolocation, 'complete', onComplete);
//返回定位信息
    AMap.event.addListener(geolocation, 'error', onError);
    //返回定位出错信息
}); //解析定位结果
*/
var city;
map.on('click', function (e) {
    if (marker != null) {
        marker.setMap(null);
    }
//添加标记点
    console.log(e.lnglat.getLng())
    console.log(e.lnglat.getLat())
    $("#lon").val(e.lnglat.getLng());
    $("#lat").val(e.lnglat.getLat());
    marker = new AMap.Marker({
        map: map,
        position: new AMap.LngLat(e.lnglat.getLng(), e.lnglat.getLat()),   // 经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9]
    });
    regeoCode(e.lnglat.getLng(), e.lnglat.getLat());
});
 
 
var infoWindow = new AMap.InfoWindow({
    autoMove: true,
    offset: {
        x: 0,
        y: -30
    }
}); //回调函数
 
 
//根据经纬度获取详细地址
function regeoCode(lon, lat) {
 
    var lnglat = [];
    lnglat.push(lon);
    lnglat.push(lat);
    map.clearMap()
    map.add(marker);
    marker.setPosition(lnglat);
 
    AMap.service('AMap.Geocoder', function () {
        geocoder = new AMap.Geocoder({});
        geocoder.getAddress(lnglat, function (status, result) {
            if (status === 'complete' && result.regeocode) {
                var address = result.regeocode.formattedAddress;
                $("#address").val(address);
            } else {
                Feng.error('根据经纬度查询地址失败')
            }
            var data = {
                "name": result.regeocode.addressComponent.neighborhood,
                "location": {
                    "lat": lat,
                    "lng": lon
                },
                "address": address,
                "tel": "",
                "type": result.regeocode.addressComponent.neighborhoodType
            };
            // infoWindow.setContent(createContent(data));
            infoWindow.open(map, marker.getPosition());
        });
    })
}
 
 
//输入搜索点信息
var autoOptions = {
    city: city, //在规定城市搜索、默认全国
    input: "address"
};
 
var auto = new AMap.Autocomplete(autoOptions);
var placeSearch = new AMap.PlaceSearch({
    pageSize: 5, // 单页显示结果条数
    pageIndex: 1, // 页码
    children: 0, //不展示子节点数据
    city: city, // 兴趣点城市
    citylimit: true, //是否强制限制在设置的城市内搜索
    panel: "panel", // 结果列表将在此容器中进行展示。
    autoFitView: true, // 是否自动调整地图视野使绘制的 Marker点都处于视口的可见范围
    extensions: 'base', //返回基本地址信息  */
    map: map // 展现结果的地图实例
}); //构造地点查询类
 
AMap.event.addListener(auto, "select", select); //注册监听,当选中某条记录时会触发
function select(e) {
    console.log("============>e")
    console.log(e)
    placeSearch.setCity(e.poi.adcode);
    placeSearch.search(e.poi.name); //关键字查询查询        //设置搜索位置定点标注
    $("#lon").val(e.poi.location.lng);
    $("#lat").val(e.poi.location.lat);
    marker = new AMap.Marker({
        map: map,
        position: new AMap.LngLat(e.poi.location.lng, e.poi.location.lat),   // 经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9]
    });
    regeoCode(e.poi.location.lng, e.poi.location.lat);
    /* if (e.poi && e.poi.location) {
         map.setZoom(15);
         map.setCenter(e.poi.location);
         var id = e.poi.id; //详情查询
         placeSearch.getDetails(id, function (status, result) {
             if (status === 'complete' && result.info === 'OK') {
                 console.log("result-------------->")
                 console.log(result)
                 placeSearch_CallBack(result);
             }
         });
     }*/
}
 
function placeSearch_CallBack(data) {
    if (marker != null) {
        marker.setMap(null);
    }
    var poiArr = data.poiList.pois; //添加marker
    marker = new AMap.Marker({
        map: map,
        position: poiArr[0].location
    });
    map.add(marker);
    marker.setPosition(marker.getPosition());
 
    // infoWindow.setContent(createContent(poiArr[0]));
    infoWindow.open(map, marker.getPosition());
}
 
function createContent(poi) {
    console.log(poi);
//信息窗体内容
    $("#address").val(poi.address);
    $("#lon").val(poi.location.lng);
    $("#lat").val(poi.location.lat);
 
    var s = [];
    s.push("<b>名称:" + poi.name + "</b>");
    s.push("地址:" + poi.address);
    s.push("电话:" + poi.tel);
    s.push("类型:" + poi.type);
    return s.join("<br>");
}