|
@@ -972,177 +972,7 @@ $(function() {
|
|
|
map.clearOverlays();
|
|
|
var addFirst;
|
|
|
if (typepage == 3 || typepage == 5){
|
|
|
- for (var z = 0; z < getClick1.length; z++) {
|
|
|
- var add = getClick1[z].address;
|
|
|
- const tempAdd = add;
|
|
|
- myGeo.getPoint(tempAdd, function(point) {
|
|
|
- if (point) {
|
|
|
- var address = new BMap.Point(point.lng, point.lat);
|
|
|
- addFirst = address;
|
|
|
- for (var index = 0; index < getClick1.length; index++) {
|
|
|
- var getClick1dep = getClick1[index].dep;
|
|
|
- var getClick1addre = getClick1[index].address;
|
|
|
- var getClick1type = getClick1[index].type;
|
|
|
- var getClick1special = getClick1[index].specialtype;
|
|
|
- var getClick1tag = getClick1[index].tag;
|
|
|
- var getClick1tag2 = getClick1[index].tag2;
|
|
|
- var getClick1tag3 = getClick1[index].tag3;
|
|
|
- var getClick1content = getClick1[index].content;
|
|
|
- var getClick1img = getClick1[index].img;
|
|
|
- var getClick1tel = getClick1[index].tel;
|
|
|
- var getClick1time = getClick1[index].time;
|
|
|
- var getClick1Index = getClick1[index].clickIndex;
|
|
|
- var getClick1Url = getClick1[index].url;
|
|
|
- var getClick1Sptype = getClick1[index].sptype;
|
|
|
- var sContnet = ''
|
|
|
- sContnet += "<ul class='titleFirstDifrenet'>"
|
|
|
- sContnet += "<li class='title_flex' title='"+getClick1dep+"'>"
|
|
|
- sContnet += getClick1dep
|
|
|
- if ((getClick1type == null || getClick1type == undefined)||getClick1type == '') {
|
|
|
- sContnet += ''
|
|
|
- } else {
|
|
|
- if (getClick1special == "中学") {
|
|
|
- if (getClick1type == "中学"){
|
|
|
- sContnet += ''
|
|
|
- } else {
|
|
|
- sContnet += "<p class='flex_blue'>· "
|
|
|
- sContnet += getClick1type
|
|
|
- sContnet += "</p>"
|
|
|
- }
|
|
|
- sContnet += "<p class='flex_blue'>· "
|
|
|
- sContnet += getClick1special
|
|
|
- sContnet += "</p>"
|
|
|
- } else {
|
|
|
- sContnet += "<p class='flex_blue'>· "
|
|
|
- sContnet += getClick1type
|
|
|
- sContnet += "</p>"
|
|
|
- }
|
|
|
- sContnet += "</li>"
|
|
|
- }
|
|
|
- if ((getClick1tag == null || getClick1tag == undefined)||getClick1tag=='') {
|
|
|
- sContnet += ""
|
|
|
- } else {
|
|
|
- sContnet += "<li class='flex_orange'>"
|
|
|
- sContnet += "<div class='three_tag'>"
|
|
|
- sContnet += getClick1tag
|
|
|
- if ((getClick1tag2 == undefined || getClick1tag2 == null) || getClick1tag2 =='') {
|
|
|
- sContnet += "</div>"
|
|
|
- } else {
|
|
|
- sContnet += "</div>"
|
|
|
- sContnet += "<div class='three_tag'>"
|
|
|
- sContnet += getClick1tag2
|
|
|
- sContnet += "</div>"
|
|
|
- }
|
|
|
- if ((getClick1tag3 == undefined || getClick1tag3 == null)||getClick1tag3=='') {
|
|
|
- sContnet += "</li>"
|
|
|
- } else {
|
|
|
- sContnet += "<div class='three_tag'>"
|
|
|
- sContnet += getClick1tag3
|
|
|
- sContnet += "</div>"
|
|
|
- sContnet += "</li>"
|
|
|
- }
|
|
|
- }
|
|
|
- if (getClick1content == "") {
|
|
|
- sContnet += ''
|
|
|
- } else if ((getClick1content == undefined || getClick1content == null)||getClick1content=='') {
|
|
|
- sContnet += ''
|
|
|
- } else {
|
|
|
- sContnet += "<li>"
|
|
|
- sContnet += "<a class='a_blue'>"
|
|
|
- sContnet += "<p class='content_p'>"
|
|
|
- sContnet += getClick1content
|
|
|
- sContnet += "</p>"
|
|
|
- sContnet += "</a>"
|
|
|
- }
|
|
|
- sContnet += "</li>"
|
|
|
- if (getClick1img == "") {
|
|
|
- sContnet += ''
|
|
|
- } else if (getClick1img == undefined || getClick1img == null) {
|
|
|
- sContnet += ''
|
|
|
- } else {
|
|
|
- sContnet += "<li class='img_box'>"
|
|
|
- sContnet += "<img class='two_img' src='" +PATH+getClick1img + "'>"
|
|
|
- sContnet += "</li>"
|
|
|
- }
|
|
|
- sContnet += "<li class='address_box'>"
|
|
|
- sContnet += "<p><span class='flex_address'>地址:</span>"
|
|
|
- sContnet += getClick1addre
|
|
|
- sContnet += "</p>"
|
|
|
- if ((getClick1time == null || getClick1time == undefined)||getClick1time=='') {
|
|
|
- sContnet += ''
|
|
|
- } else if(getClick1Sptype == '查阅场所'){
|
|
|
- sContnet += "<p><span class='flex_address'>查询时间:</span>"
|
|
|
- sContnet += getClick1time
|
|
|
- sContnet += "</p>"
|
|
|
- } else if(getClick1Sptype == '受理场所'){
|
|
|
- sContnet += "<p><span class='flex_address'>受理时间:</span>"
|
|
|
- sContnet += getClick1time
|
|
|
- sContnet += "</p>"
|
|
|
- } else if(getClick1Sptype == '政务服务'){
|
|
|
- sContnet += "<p><span class='flex_address'>办理时间:</span>"
|
|
|
- sContnet += getClick1time
|
|
|
- sContnet += "</p>"
|
|
|
- } else {
|
|
|
- sContnet += "<p><span class='flex_address'>办公时间:</span>"
|
|
|
- sContnet += getClick1time
|
|
|
- sContnet += "</p>"
|
|
|
- }
|
|
|
- if ((getClick1tel == null || getClick1tel == undefined)||getClick1tel==''){
|
|
|
- sContnet += ''
|
|
|
- } else {
|
|
|
- sContnet += "<p><span class='flex_address'>办公电话:</span>"
|
|
|
- sContnet += getClick1tel
|
|
|
- sContnet += "</p>"
|
|
|
- }
|
|
|
- if ((getClick1Url == undefined || getClick1Url == null)||getClick1Url=='') {
|
|
|
- sContnet += ''
|
|
|
- } else if(getClick1Sptype == "民政服务") {
|
|
|
- sContnet += "<a href='"+getClick1Url+"' target='_blank' style='color: #2775CC;text-decoration:underline;'>预约祭扫</a>"
|
|
|
- } else if(getClick1Sptype == "住房保障"){
|
|
|
- sContnet += "<br><a href='"+arrUrl+"' target='_blank' style='color: #2775CC;text-decoration:underline;'>公租房申请</a>"
|
|
|
- } else {
|
|
|
- sContnet += "<br><a href='"+getClick1Url+"' target='_blank' style='color: #2775CC;text-decoration:underline;'>在线预约</a>"
|
|
|
- }
|
|
|
- sContnet += "<br><a class='correct_html' style='color: #2775CC;text-decoration:underline;'>我要纠错</a>"
|
|
|
- sContnet += "</li>"
|
|
|
- sContnet += "<li class='btn_box'>"
|
|
|
- sContnet += "<button class='one_bus'>公交</button>"
|
|
|
- sContnet += "<button class='two_car'>自驾</button>"
|
|
|
- sContnet += "</li>"
|
|
|
- sContnet += "<div class='grey_line'></div>"
|
|
|
- sContnet += "<li>"
|
|
|
- sContnet += "<div class='flex_four_wrap'>"
|
|
|
- sContnet += "<ul class='text-tab-title-two'>"
|
|
|
- sContnet += "<a><img src='./img/zxbl.png'></a>"
|
|
|
- sContnet += "<a href='http://www.cqna.gov.cn/ghwd/znwd/index.html' target='_blank'><img src='./img/xwgd.png'></a>"
|
|
|
- sContnet += "</ul>"
|
|
|
- sContnet += "<div class='text-tab-content'>"
|
|
|
- sContnet += "<ul class='text-tab-item text-show'>"
|
|
|
- $.each(res.data,function(j){
|
|
|
- sContnet += "<li>"
|
|
|
- sContnet += "<a href='"+res.data[j].matterUrl+"' target='_blank'>"
|
|
|
- sContnet += "<h6></h6>"
|
|
|
- sContnet += "<p title='"+res.data[j].itemName+"'>"+res.data[j].itemName+"</p>"
|
|
|
- sContnet += "</a>"
|
|
|
- sContnet += "</li>"
|
|
|
- });
|
|
|
- sContnet += "</ul>"
|
|
|
- sContnet += "</div>"
|
|
|
- sContnet += "</div>"
|
|
|
- sContnet += "</li>"
|
|
|
- sContnet += "</ul>"
|
|
|
- if (tempAdd == getClick1addre) {
|
|
|
- setTimeout(function(){
|
|
|
- addMarker1(getClick1Index, index, address, new BMap.InfoWindow(sContnet, getClick1addre), getClick1dep);
|
|
|
- },300)
|
|
|
- }
|
|
|
- document.querySelectorAll(".two_img").onload = function() {
|
|
|
- infoWindow.redraw();
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }, "重庆市");
|
|
|
- }
|
|
|
+ renderInformationWindow(getClick1,res)
|
|
|
}else{
|
|
|
for (var z = 0; z < getClick.length; z++) {
|
|
|
var add = getClick[z].address;
|
|
@@ -1329,6 +1159,180 @@ $(function() {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+ function renderInformationWindow(arr,res){
|
|
|
+ for (var z = 0; z < arr.length; z++) {
|
|
|
+ var add = arr[z].address;
|
|
|
+ const tempAdd = add;
|
|
|
+ myGeo.getPoint(tempAdd, function(point) {
|
|
|
+ if (point) {
|
|
|
+ var address = new BMap.Point(point.lng, point.lat);
|
|
|
+ addFirst = address;
|
|
|
+ for (var index = 0; index < arr.length; index++) {
|
|
|
+ var arrdep = arr[index].dep;
|
|
|
+ var arraddre = arr[index].address;
|
|
|
+ var arrtype = arr[index].type;
|
|
|
+ var arrspecial = arr[index].specialtype;
|
|
|
+ var arrtag = arr[index].tag;
|
|
|
+ var arrtag2 = arr[index].tag2;
|
|
|
+ var arrtag3 = arr[index].tag3;
|
|
|
+ var arrcontent = arr[index].content;
|
|
|
+ var arrimg = arr[index].img;
|
|
|
+ var arrtel = arr[index].tel;
|
|
|
+ var arrtime = arr[index].time;
|
|
|
+ var arrIndex = arr[index].clickIndex;
|
|
|
+ var arrUrl = arr[index].url;
|
|
|
+ var arrSptype = arr[index].sptype;
|
|
|
+ var sContnet = ''
|
|
|
+ sContnet += "<ul class='titleFirstDifrenet'>"
|
|
|
+ sContnet += "<li class='title_flex' title='"+arrdep+"'>"
|
|
|
+ sContnet += arrdep
|
|
|
+ if ((arrtype == null || arrtype == undefined)||arrtype == '') {
|
|
|
+ sContnet += ''
|
|
|
+ } else {
|
|
|
+ if (arrspecial == "中学") {
|
|
|
+ if (arrtype == "中学"){
|
|
|
+ sContnet += ''
|
|
|
+ } else {
|
|
|
+ sContnet += "<p class='flex_blue'>· "
|
|
|
+ sContnet += arrtype
|
|
|
+ sContnet += "</p>"
|
|
|
+ }
|
|
|
+ sContnet += "<p class='flex_blue'>· "
|
|
|
+ sContnet += arrspecial
|
|
|
+ sContnet += "</p>"
|
|
|
+ } else {
|
|
|
+ sContnet += "<p class='flex_blue'>· "
|
|
|
+ sContnet += arrtype
|
|
|
+ sContnet += "</p>"
|
|
|
+ }
|
|
|
+ sContnet += "</li>"
|
|
|
+ }
|
|
|
+ if ((arrtag == null || arrtag == undefined)||arrtag=='') {
|
|
|
+ sContnet += ""
|
|
|
+ } else {
|
|
|
+ sContnet += "<li class='flex_orange'>"
|
|
|
+ sContnet += "<div class='three_tag'>"
|
|
|
+ sContnet += arrtag
|
|
|
+ if ((arrtag2 == undefined || arrtag2 == null) || arrtag2 =='') {
|
|
|
+ sContnet += "</div>"
|
|
|
+ } else {
|
|
|
+ sContnet += "</div>"
|
|
|
+ sContnet += "<div class='three_tag'>"
|
|
|
+ sContnet += arrtag2
|
|
|
+ sContnet += "</div>"
|
|
|
+ }
|
|
|
+ if ((arrtag3 == undefined || arrtag3 == null)||arrtag3=='') {
|
|
|
+ sContnet += "</li>"
|
|
|
+ } else {
|
|
|
+ sContnet += "<div class='three_tag'>"
|
|
|
+ sContnet += arrtag3
|
|
|
+ sContnet += "</div>"
|
|
|
+ sContnet += "</li>"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (arrcontent == "") {
|
|
|
+ sContnet += ''
|
|
|
+ } else if ((arrcontent == undefined || arrcontent == null)||arrcontent=='') {
|
|
|
+ sContnet += ''
|
|
|
+ } else {
|
|
|
+ sContnet += "<li>"
|
|
|
+ sContnet += "<a class='a_blue'>"
|
|
|
+ sContnet += "<p class='content_p'>"
|
|
|
+ sContnet += arrcontent
|
|
|
+ sContnet += "</p>"
|
|
|
+ sContnet += "</a>"
|
|
|
+ }
|
|
|
+ sContnet += "</li>"
|
|
|
+ if (arrimg == "") {
|
|
|
+ sContnet += ''
|
|
|
+ } else if (arrimg == undefined || arrimg == null) {
|
|
|
+ sContnet += ''
|
|
|
+ } else {
|
|
|
+ sContnet += "<li class='img_box'>"
|
|
|
+ sContnet += "<img class='two_img' src='" +PATH+arrimg + "'>"
|
|
|
+ sContnet += "</li>"
|
|
|
+ }
|
|
|
+ sContnet += "<li class='address_box'>"
|
|
|
+ sContnet += "<p><span class='flex_address'>地址:</span>"
|
|
|
+ sContnet += arraddre
|
|
|
+ sContnet += "</p>"
|
|
|
+ if ((arrtime == null || arrtime == undefined)||arrtime=='') {
|
|
|
+ sContnet += ''
|
|
|
+ } else if(arrSptype == '查阅场所'){
|
|
|
+ sContnet += "<p><span class='flex_address'>查询时间:</span>"
|
|
|
+ sContnet += arrtime
|
|
|
+ sContnet += "</p>"
|
|
|
+ } else if(arrSptype == '受理场所'){
|
|
|
+ sContnet += "<p><span class='flex_address'>受理时间:</span>"
|
|
|
+ sContnet += arrtime
|
|
|
+ sContnet += "</p>"
|
|
|
+ } else if(arrSptype == '政务服务'){
|
|
|
+ sContnet += "<p><span class='flex_address'>办理时间:</span>"
|
|
|
+ sContnet += arrtime
|
|
|
+ sContnet += "</p>"
|
|
|
+ } else {
|
|
|
+ sContnet += "<p><span class='flex_address'>办公时间:</span>"
|
|
|
+ sContnet += arrtime
|
|
|
+ sContnet += "</p>"
|
|
|
+ }
|
|
|
+ if ((arrtel == null || arrtel == undefined)||arrtel==''){
|
|
|
+ sContnet += ''
|
|
|
+ } else {
|
|
|
+ sContnet += "<p><span class='flex_address'>办公电话:</span>"
|
|
|
+ sContnet += arrtel
|
|
|
+ sContnet += "</p>"
|
|
|
+ }
|
|
|
+ if ((arrUrl == undefined || arrUrl == null)||arrUrl=='') {
|
|
|
+ sContnet += ''
|
|
|
+ } else if(arrSptype == "民政服务") {
|
|
|
+ sContnet += "<a href='"+arrUrl+"' target='_blank' style='color: #2775CC;text-decoration:underline;'>预约祭扫</a>"
|
|
|
+ } else if(arrSptype == "住房保障"){
|
|
|
+ sContnet += "<br><a href='"+arrUrl+"' target='_blank' style='color: #2775CC;text-decoration:underline;'>公租房申请</a>"
|
|
|
+ } else {
|
|
|
+ sContnet += "<br><a href='"+arrUrl+"' target='_blank' style='color: #2775CC;text-decoration:underline;'>在线预约</a>"
|
|
|
+ }
|
|
|
+ sContnet += "<br><a class='correct_html' style='color: #2775CC;text-decoration:underline;'>我要纠错</a>"
|
|
|
+ sContnet += "</li>"
|
|
|
+ sContnet += "<li class='btn_box'>"
|
|
|
+ sContnet += "<button class='one_bus'>公交</button>"
|
|
|
+ sContnet += "<button class='two_car'>自驾</button>"
|
|
|
+ sContnet += "</li>"
|
|
|
+ sContnet += "<div class='grey_line'></div>"
|
|
|
+ sContnet += "<li>"
|
|
|
+ sContnet += "<div class='flex_four_wrap'>"
|
|
|
+ sContnet += "<ul class='text-tab-title-two'>"
|
|
|
+ sContnet += "<a><img src='./img/zxbl.png'></a>"
|
|
|
+ sContnet += "<a href='http://www.cqna.gov.cn/ghwd/znwd/index.html' target='_blank'><img src='./img/xwgd.png'></a>"
|
|
|
+ sContnet += "</ul>"
|
|
|
+ sContnet += "<div class='text-tab-content'>"
|
|
|
+ sContnet += "<ul class='text-tab-item text-show'>"
|
|
|
+ $.each(res.data,function(j){
|
|
|
+ sContnet += "<li>"
|
|
|
+ sContnet += "<a href='"+res.data[j].matterUrl+"' target='_blank'>"
|
|
|
+ sContnet += "<h6></h6>"
|
|
|
+ sContnet += "<p title='"+res.data[j].itemName+"'>"+res.data[j].itemName+"</p>"
|
|
|
+ sContnet += "</a>"
|
|
|
+ sContnet += "</li>"
|
|
|
+ });
|
|
|
+ sContnet += "</ul>"
|
|
|
+ sContnet += "</div>"
|
|
|
+ sContnet += "</div>"
|
|
|
+ sContnet += "</li>"
|
|
|
+ sContnet += "</ul>"
|
|
|
+ if (tempAdd == arraddre) {
|
|
|
+ setTimeout(function(){
|
|
|
+ addMarker1(arrIndex, index, address, new BMap.InfoWindow(sContnet, arraddre));
|
|
|
+ },300)
|
|
|
+ }
|
|
|
+ document.querySelectorAll(".two_img").onload = function() {
|
|
|
+ infoWindow.redraw();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }, "重庆市");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
// 将json数据渲染到地图
|
|
|
function xxGEO(arr) {
|
|
|
map.clearOverlays();
|
|
@@ -2160,7 +2164,7 @@ $(function() {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
- function addMarker1(getIndex, index, point, infoWindow, dep) {
|
|
|
+ function addMarker1(getIndex, index, point, infoWindow) {
|
|
|
var myIcon = new BMap.Icon("./img/location.png", new BMap.Size(40, 40));
|
|
|
var marker = new BMap.Marker(point, {
|
|
|
icon: myIcon
|