Browse Source

前端看地相关

master
gisnewbie 4 years ago
parent
commit
de31b15f40
  1. 80
      node_modules/@types/geojson/package.json
  2. 64
      node_modules/terraformer-wkt-parser/package.json
  3. 89
      node_modules/terraformer/package.json
  4. 41
      package-lock.json
  5. 4
      package.json
  6. 382
      pages/look/look.js
  7. 5
      pages/look/look.json
  8. 127
      pages/look/look.wxml
  9. 50
      pages/look/look.wxss
  10. 9
      project.config.json
  11. 3
      utils/gisApi.js

80
node_modules/@types/geojson/package.json generated vendored

@ -1,27 +1,59 @@
{
"_args": [
[
"@types/geojson@1.0.6",
"E:\\04_项目代码\\mini-program"
]
],
"_from": "@types/geojson@1.0.6",
"_id": "@types/geojson@1.0.6",
"_inBundle": false,
"_integrity": "sha512-Xqg/lIZMrUd0VRmSRbCAewtwGZiAk3mEUDvV4op1tGl+LvyPcb/MIOSxTl9z+9+J+R4/vpjiCAT4xeKzH9ji1w==",
"_location": "/@types/geojson",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "@types/geojson@1.0.6",
"name": "@types/geojson",
"version": "1.0.6",
"description": "TypeScript definitions for GeoJSON Format Specification Revision",
"license": "MIT",
"contributors": [
{
"name": "Jacob Bruun",
"url": "https://github.com/cobster",
"githubUsername": "cobster"
},
{
"name": "Arne Schubert",
"url": "https://github.com/atd-schubert",
"githubUsername": "atd-schubert"
}
],
"main": "",
"repository": {
"type": "git",
"url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git"
"escapedName": "@types%2fgeojson",
"scope": "@types",
"rawSpec": "1.0.6",
"saveSpec": null,
"fetchSpec": "1.0.6"
},
"_requiredBy": [
"/terraformer",
"/terraformer-wkt-parser"
],
"_resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-1.0.6.tgz",
"_spec": "1.0.6",
"_where": "E:\\04_项目代码\\mini-program",
"bugs": {
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues"
},
"contributors": [
{
"name": "Jacob Bruun",
"url": "https://github.com/cobster"
},
"scripts": {},
"dependencies": {},
"typesPublisherContentHash": "2a374692a48615d90fde45b274e247a1ec98647d93fe7c7ee355386108689bcd",
"typeScriptVersion": "2.3"
}
{
"name": "Arne Schubert",
"url": "https://github.com/atd-schubert"
}
],
"dependencies": {},
"description": "TypeScript definitions for GeoJSON Format Specification Revision",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme",
"license": "MIT",
"main": "",
"name": "@types/geojson",
"repository": {
"type": "git",
"url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git"
},
"scripts": {},
"typeScriptVersion": "2.3",
"typesPublisherContentHash": "2a374692a48615d90fde45b274e247a1ec98647d93fe7c7ee355386108689bcd",
"version": "1.0.6"
}

64
node_modules/terraformer-wkt-parser/package.json generated vendored

@ -1,19 +1,55 @@
{
"name": "terraformer-wkt-parser",
"description": "Well-Known Text parser",
"version": "1.2.1",
"author": "Jerry Sievert <code@legitimatesounding.com> (http://legitimatesounding.com)",
"_args": [
[
"terraformer-wkt-parser@1.2.1",
"E:\\04_项目代码\\mini-program"
]
],
"_from": "terraformer-wkt-parser@1.2.1",
"_id": "terraformer-wkt-parser@1.2.1",
"_inBundle": false,
"_integrity": "sha512-+CJyNLWb3lJ9RsZMTM66BY0MT3yIo4l4l22Jd9CrZuwzk54fsu4Sc7zejuS9fCITTuTQy3p06d4MZMVI7v5wSg==",
"_location": "/terraformer-wkt-parser",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "terraformer-wkt-parser@1.2.1",
"name": "terraformer-wkt-parser",
"escapedName": "terraformer-wkt-parser",
"rawSpec": "1.2.1",
"saveSpec": null,
"fetchSpec": "1.2.1"
},
"_requiredBy": [
"/"
],
"_resolved": "https://registry.npmjs.org/terraformer-wkt-parser/-/terraformer-wkt-parser-1.2.1.tgz",
"_spec": "1.2.1",
"_where": "E:\\04_项目代码\\mini-program",
"author": {
"name": "Jerry Sievert",
"email": "code@legitimatesounding.com",
"url": "http://legitimatesounding.com"
},
"bugs": {
"url": "https://github.com/Esri/terraformer-wkt-parser/issues"
},
"contributors": [
"Patrick Arlt <parlt@esri.com>",
"John Gravois <jgravois@esri.com>"
{
"name": "Patrick Arlt",
"email": "parlt@esri.com"
},
{
"name": "John Gravois",
"email": "jgravois@esri.com"
}
],
"dependencies": {
"@types/geojson": "^1.0.0",
"terraformer": "~1.0.5"
},
"description": "Well-Known Text parser",
"devDependencies": {
"gh-release": "^3.2.1",
"grunt": "^1.0.3",
@ -31,6 +67,9 @@
"directories": {
"test": "test"
},
"engines": {
"node": ">=4.2.6"
},
"files": [
"terraformer-wkt-parser.min.js",
"terraformer-wkt-parser.d.ts"
@ -43,19 +82,18 @@
],
"license": "MIT",
"main": "terraformer-wkt-parser.js",
"typings": "terraformer-wkt-parser.d.ts",
"name": "terraformer-wkt-parser",
"repository": {
"type": "git",
"url": "git@github.com:Esri/terraformer-wkt-parser.git"
"url": "git+ssh://git@github.com/Esri/terraformer-wkt-parser.git"
},
"scripts": {
"prepare": "grunt wkt-parser && grunt uglify",
"release": "./release.sh",
"test": "npm run test:node && grunt test",
"test:node": "jasmine --config=jasmine.json",
"test:ts": "tslint test.ts terraformer-wkt-parser.d.ts && tsc -p tsconfig.json && node test.js",
"release": "./release.sh"
"test:ts": "tslint test.ts terraformer-wkt-parser.d.ts && tsc -p tsconfig.json && node test.js"
},
"engines": {
"node": ">=4.2.6"
}
"typings": "terraformer-wkt-parser.d.ts",
"version": "1.2.1"
}

89
node_modules/terraformer/package.json generated vendored

@ -1,9 +1,56 @@
{
"name": "terraformer",
"version": "1.0.12",
"_args": [
[
"terraformer@1.0.12",
"E:\\04_项目代码\\mini-program"
]
],
"_from": "terraformer@1.0.12",
"_id": "terraformer@1.0.12",
"_inBundle": false,
"_integrity": "sha512-MokUp0+MFal4CmJDVL6VAO1bKegeXcBM2RnPVfqcFIp2IIv8EbPAjG0j/vEy/vuKB8NVMMSF2vfpVS/QLe4DBg==",
"_location": "/terraformer",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "terraformer@1.0.12",
"name": "terraformer",
"escapedName": "terraformer",
"rawSpec": "1.0.12",
"saveSpec": null,
"fetchSpec": "1.0.12"
},
"_requiredBy": [
"/terraformer-wkt-parser"
],
"_resolved": "https://registry.npmjs.org/terraformer/-/terraformer-1.0.12.tgz",
"_spec": "1.0.12",
"_where": "E:\\04_项目代码\\mini-program",
"author": {
"name": "Patrick Arlt",
"email": "parlt@esri.com",
"url": "http://patrickarlt.com"
},
"bugs": {
"url": "https://github.com/esri/terraformer/issues"
},
"contributors": [
{
"name": "Patrick Arlt",
"email": "parlt@esri.com",
"url": "http://patrickarlt.com"
},
{
"name": "Jerry Sievert",
"email": "jsievert@esri.com",
"url": "http://legitimatesounding.com"
}
],
"dependencies": {
"@types/geojson": "^7946.0.0 || ^1.0.0"
},
"description": "A Geo-toolkit built in Javascript.",
"main": "terraformer.js",
"typings": "terraformer.d.ts",
"devDependencies": {
"gh-release": "^3.5.0",
"grunt": "^1.0.4",
@ -20,31 +67,31 @@
"tslint": "^4.5.1",
"typescript": "^2.2.1"
},
"engines": {
"node": ">=4.2.6"
},
"files": [
"terraformer.min.js",
"terraformer.d.ts"
],
"scripts": {
"pretest": "grunt lint",
"test": "npm run test:node && grunt test",
"test:node": "jasmine --config=jasmine.json",
"test:ts": "tslint test.ts index.d.ts && tsc -p tsconfig.json && node test.js",
"release": "./release.sh"
"homepage": "https://github.com/esri/terraformer#readme",
"license": "MIT",
"main": "terraformer.js",
"name": "terraformer",
"optionalDependencies": {
"@types/geojson": "^7946.0.0 || ^1.0.0"
},
"repository": {
"type": "git",
"url": "git://github.com/esri/terraformer.git"
},
"author": "Patrick Arlt <parlt@esri.com> (http://patrickarlt.com)",
"contributors": [
"Patrick Arlt <parlt@esri.com> (http://patrickarlt.com)",
"Jerry Sievert <jsievert@esri.com> (http://legitimatesounding.com)"
],
"license": "MIT",
"optionalDependencies": {
"@types/geojson": "^7946.0.0 || ^1.0.0"
"scripts": {
"pretest": "grunt lint",
"release": "./release.sh",
"test": "npm run test:node && grunt test",
"test:node": "jasmine --config=jasmine.json",
"test:ts": "tslint test.ts index.d.ts && tsc -p tsconfig.json && node test.js"
},
"engines": {
"node": ">=4.2.6"
}
"typings": "terraformer.d.ts",
"version": "1.0.12"
}

41
package-lock.json generated

@ -1,47 +1,8 @@
{
"name": "mini-program",
"version": "1.0.0",
"lockfileVersion": 2,
"lockfileVersion": 1,
"requires": true,
"packages": {
"": {
"version": "1.0.0",
"license": "ISC",
"dependencies": {
"terraformer-wkt-parser": "^1.2.1"
}
},
"node_modules/@types/geojson": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-1.0.6.tgz",
"integrity": "sha512-Xqg/lIZMrUd0VRmSRbCAewtwGZiAk3mEUDvV4op1tGl+LvyPcb/MIOSxTl9z+9+J+R4/vpjiCAT4xeKzH9ji1w=="
},
"node_modules/terraformer": {
"version": "1.0.12",
"resolved": "https://registry.npmjs.org/terraformer/-/terraformer-1.0.12.tgz",
"integrity": "sha512-MokUp0+MFal4CmJDVL6VAO1bKegeXcBM2RnPVfqcFIp2IIv8EbPAjG0j/vEy/vuKB8NVMMSF2vfpVS/QLe4DBg==",
"deprecated": "terraformer is deprecated and no longer supported. Please use @terraformer/arcgis.",
"engines": {
"node": ">=4.2.6"
},
"optionalDependencies": {
"@types/geojson": "^7946.0.0 || ^1.0.0"
}
},
"node_modules/terraformer-wkt-parser": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/terraformer-wkt-parser/-/terraformer-wkt-parser-1.2.1.tgz",
"integrity": "sha512-+CJyNLWb3lJ9RsZMTM66BY0MT3yIo4l4l22Jd9CrZuwzk54fsu4Sc7zejuS9fCITTuTQy3p06d4MZMVI7v5wSg==",
"deprecated": "terraformer-wkt-parser is deprecated and no longer supported. Please use @terraformer/wkt.",
"dependencies": {
"@types/geojson": "^1.0.0",
"terraformer": "~1.0.5"
},
"engines": {
"node": ">=4.2.6"
}
}
},
"dependencies": {
"@types/geojson": {
"version": "1.0.6",

4
package.json

@ -14,5 +14,7 @@
"license": "ISC",
"dependencies": {
"terraformer-wkt-parser": "^1.2.1"
}
},
"devDependencies": {},
"keywords": []
}

382
pages/look/look.js

@ -1,6 +1,20 @@
// pages/look/look.js
const $api = require('../../utils/gisApi').API;
const WKT = require('../../utils/terraformer-wkt-parser.min');
const gisUtil = require('../../utils/gitUtil')
const global = {};
//年份范围
const date = new Date();
const year = date.getFullYear();
const yearSpan=3;
const max = year + yearSpan;
const min = 1949;
const arryList =[];
for(let idx=min;idx < max;idx++){
arryList.push({index:idx-min,value:idx,label:''+idx+'年' });
} ;
Page({
/**
@ -11,6 +25,10 @@ Page({
scale: 13,
latitude: 29.543812,
longitude: 106.434042,
centerLocation:{
latitude: 29.543812,
longitude: 106.434042,
},
markers: [],
circles:[],
polygons: [],
@ -49,9 +67,106 @@ Page({
id: 9,
name: '小组团',
state: false
}]
}],
halfScreenDialogVisible: false,
dialogVisible: false,
buttons: [{text: '取消'}, {text: '详情'}],
titleLand:'G01-XXXXXXXXXXX02',
totalConsArea:'42356',
startingFloorPrice:'45852',
transferPrice:'12553',
auctionDate:'2021-07-18',
years:arryList,
indexStart:0,
indexEnd:0,
},
bindPickerChangeStart(e){
let sIdx =Number(e.detail.value);
if(sIdx>this.data.indexEnd){
sIdx=this.data.indexEnd;
}
this.setData({
start:arryList[sIdx].value,
indexStart:sIdx
})
},
bindPickerChangeEnd(e){
let eIdx =Number(e.detail.value);
if(eIdx<this.data.indexStart){
eIdx=this.data.indexStart;
}
this.setData({
end:arryList[eIdx].value,
indexEnd:eIdx,
})
},
openLandInfo(feature) {
this.setData({
dialogVisible: true,
});
global.selectFeature=feature;
// console.log(feature)
//tid 代表地块类型,1:已出让,2:挂牌中;3:拟挂牌。
let tid = feature.tid;//tid:1,2,3
//属性property 包含 地块id字段,按需使用。
let property =feature.properties;
//添加---接口对接---获取地块数据------以下全部替换
console.log('添加---接口对接---获取地块数据------以下全部替换')
//变量 tid 代表地块类型,1:已出让,2:挂牌中;3:拟挂牌。
//变量 property 包含 地块id字段,按需使用。
console.log(property);
this.setData({
titleLand:'G01-XXXXXXXXXXX03',
totalConsArea:'68749',
startingFloorPrice:'25784',
transferPrice:'23546',
auctionDate:'2021-07-20',
});
//---------------------------------------
},
showLayerSetting() {
this.setData({
halfScreenDialogVisible: true
});
},
closeLayerSetting(e){
this.setData({
halfScreenDialogVisible: false
});
},
tapDialogButton(e) {
let index = e.detail.index;
if(index===0){
this.setData({
dialogVisible: false,
titleLand:'',
totalConsArea:'',
startingFloorPrice:'',
transferPrice:'',
auctionDate:'',
}) ;
global.selectFeature = null;
}
else{
console.log('跳转到地块详情页面')
//跳转到地块详情页面
this.navigateToLandDetail(1)
}
},
//跳转到地块详情页面
navigateToLandDetail(id){
wx.navigateTo({
url: '/pages/look-detail/look-detail?active=1',
})
},
// closeDialog: function () {
// let qdDialog = this.data.qdDialog;
// qdDialog.show = false;
// qdDialog.buttons = [];
// this.setData({ qdDialog: qdDialog })
// },
comeList() {
wx.navigateTo({
url: '/pages/look-list/look-list',
@ -77,8 +192,8 @@ Page({
let {
latitude,
longitude,
actives
} = this.data;
} = this.data.centerLocation;
let {actives} = this.data;
let state = false;
let hasAc = actives.some(item => item === id);
if (hasAc) {
@ -100,6 +215,7 @@ Page({
// 已出让
if (state) {
this.deletPolygon(id);
this.removeFeaturesToList(id);
} else {
this.inWhich({
latitude,
@ -111,6 +227,7 @@ Page({
// 挂牌中
if (state) {
this.deletPolygon(id);
this.removeFeaturesToList(id);
} else {
this.inQuotation({
latitude,
@ -122,6 +239,7 @@ Page({
// 待挂牌
if (state) {
this.deletPolygon(id);
this.removeFeaturesToList(id);
} else {
this.toBelisted({
latitude,
@ -191,16 +309,33 @@ Page({
this.clearCircles(id);
} else {
let data = [{
gid:1,
latitude,
longitude
}];
console.log(data)
}];
console.log(data);
this.setCircles(data, id);
}
break;
}
},
onMapTaped(e){
let that= this;
let {
latitude,
longitude
} = e.detail;
let point = {latitude,longitude} // 地图点击点的经纬度
let features = that.selectFeatureList(point);
console.log(features);
if(features && features.length>0){
let f = features[0];
// console.log(f);
// console.log(f);
that.openLandInfo(f)
}
},
// 清除地块
deletPolygon(id) {
let {
@ -234,8 +369,8 @@ Page({
latitude: item.lat,
longitude: item.lon,
iconPath,
width: 40,
height: 45,
width: 12,
height: 16,
}
})
if (markers.length > 0) {
@ -259,13 +394,13 @@ Page({
index--
}
}
console.log('markers', markers);
this.setData({
markers
})
}
}
},
//设置圆环
setCircles(data, id) {
let {
@ -273,30 +408,27 @@ Page({
} = this.data
let makeArr = data.map(item => {
console.log('---')
console.log(item)
let {
latitude,
longitude
}= item;
return {
id: item.gid,
aid: id,
latitude: item.latitude,
longitude: item.longitude,
latitude: latitude,
longitude: longitude,
color: '#2317da66',
fillColor: '#7cb5ec88',
radius: 3000,
strokeWidth: 2
}
})
if (circles.length > 0) {
circles = circles.concat(makeArr)
console.log(circles)
this.setData({
circles
})
}else{
circles = makeArr
console.log(circles)
this.setData({
circles
})
}
circles = makeArr;
this.setData({
circles
})
},
//清除圆环
clearCircles(id) {
@ -312,7 +444,6 @@ Page({
index--
}
}
console.log('circles', circles);
this.setData({
circles
})
@ -343,44 +474,96 @@ Page({
})
}
},
showCenterLocation(centerPoint){
let id = -1;
let{
latitude,
longitude,
}=centerPoint;
this.clearPoint(id);
let {
markers
} = this.data
let mark = {
aid: id,
id: id,
latitude,
longitude,
width: 16,
height:24,
}
markers.push(mark)
this.setData({
markers: markers
})
},
//定位当前
scaleBack() {
let that = this;
wx.getLocation({
type: 'gcj02',
success: function (res) {
res = {
latitude: 29.6267,
longitude: 106.5682
}; //测试数据(发布时删除)
let latitude = res.latitude
let longitude = res.longitude
let {
markers
} = that.data
let mark = {
id: -1,
latitude,
longitude,
}
markers.push(mark)
let latitude = Number(res.latitude)
let longitude = Number(res.longitude)
that.setData({
latitude: latitude,
longitude: longitude,
markers: markers
})
centerLocation:{
latitude,
longitude,
},
})
that.showCenterLocation({latitude,longitude})
}
})
},
//点击MORE标记点
markertap(e) {
let id = e.detail.markerId
wx.navigateTo({
url: '/pages/look-list/look-list?id=' + id,
})
},
regionchange(e) {
if(e.type==='end'){
let {
latitude,
longitude
} = e.detail.centerLocation;
this.data.longitude=longitude;
this.data.longitude=longitude;
this.setData({
centerLocation: e.detail.centerLocation
});
let {actives} = this.data;
let id9 = 9;
let state9 = actives.some(item => item === id9);
if (state9) {
this.clearCircles(id9);
let data = [{
latitude,
longitude
}];
this.setCircles(data, id9);
}
else {
this.clearCircles(id9);
}
let id7 = 7;
let state7= actives.some(item => item === id7);
if (state7) {
this.clearPoint(id7);
this.getComplete({
latitude,
longitude
}, id7);
}
else {
this.clearPoint(7);
}
//中心点--重绘
this.showCenterLocation({latitude,longitude})
}
},
// 已出让
inWhich(res, id) {
const that = this;
@ -388,13 +571,14 @@ Page({
start,
end
} = this.data;
$api.getLandListing({
$api.getLandList({
lon: res.longitude,
lat: res.latitude,
start: `${start}-01-01`,
end: `${end}-01-01`,
end: `${end}-12-31`,
}).then(data => {
that.setWKT(data, id);
that.addFeaturesToList(data,id);
})
},
@ -406,6 +590,7 @@ Page({
lat: res.latitude
}).then(data => {
that.setWKT(data, id);
that.addFeaturesToList(data,id);
})
},
@ -417,8 +602,66 @@ Page({
lat: res.latitude
}).then(data => {
that.setWKT(data, id);
that.addFeaturesToList(data,id);
})
},
addFeaturesToList(data, tid){
let key= 'key'+tid;
let features = data.map(item => {
let geomPoints = WKT.parse(item.geom).coordinates;
let properties =item;
properties.tid=tid;//类型
let polygon ={
key,tid,properties,
type: "Feature",
geometry: {
type: "Polygon",
coordinates:geomPoints
}
}
return polygon;
});
if(global.features[key] && global.features[key].length>0){
global.features[key] = global.features[key].concat(features)
}
else{
global.features[key] = features;
}
},
removeFeaturesToList(tid){
let key= 'key'+tid;
if(global.features[key] && global.features[key].length>0){
global.features[key]=[];
}
},
selectFeatureList(pt,maxCount){
maxCount = maxCount||1;
let x = pt.longitude;
let y = pt.latitude;
let selectList = [];
let features=[];
if(global.features['key1'] &&global.features['key1'].length>0){
features = features.concat(global.features['key1']);
}
if(global.features['key2'] &&global.features['key2'].length>0){
features = features.concat(global.features['key2']);
}
if(global.features['key3'] &&global.features['key3'].length>0){
features = features.concat(global.features['key3']);
}
for(let i =0; i < features.length;i++){
let feature =features[i];
let hitTest =gisUtil.isPointInPolygon(y,x,feature.geometry.coordinates[0]);
if(hitTest){
selectList.push(feature);
if(selectList.length>=maxCount){
break;
}
}
}
return selectList
},
// MORE地块
getMoreInfo(res, id) {
@ -470,7 +713,19 @@ Page({
that.setWKT(data, id);
})
},
/*
* 10和16进制转换
* prin 为true将10进制转为16进制
* prin 为false将16进制转为10进制
*/
ten2XO(ten){
let val = Number(ten);
let xo= val.toString(16)
if(val<16){
xo = '0'+xo
}
return xo;
},
// 地块数据解析
setWKT(data, id) {
let {
@ -495,12 +750,15 @@ Page({
})
}
})
let strokeColor = ''+ item.line_color + this.ten2XO(item.line_opaqueness);
let strokeWidth = item.strokeWidth ? Number(item.strokeWidth):2;
let fillColor = ''+ item.fill_color + this.ten2XO(item.fill_opaqueness);
let polygon = {
points,
strokeColor: '#FFF',
fillColor: '#FFCC4050', //`#${item.fillcolor}`,
strokeColor,
strokeWidth,
fillColor,
zIndex: 1,
strokeWidth: 2,
id
}
return polygon
@ -511,12 +769,30 @@ Page({
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.scaleBack()
global.bboxkey=0;
global.features={
key1:[],
key2:[],
key3:[],
};
let sIdx = year-yearSpan-min;
let eIdx = year-min;
this.setData(
{
indexStart:sIdx,
indexEnd:eIdx,
start:arryList[sIdx].value,
end:arryList[eIdx].value,
}
)
this.scaleBack();
},
/**

5
pages/look/look.json

@ -1,3 +1,6 @@
{
"usingComponents": {}
"usingComponents": {
"mp-half-screen-dialog": "weui-miniprogram/half-screen-dialog/half-screen-dialog",
"mp-dialog": "weui-miniprogram/dialog/dialog"
}
}

127
pages/look/look.wxml

@ -24,68 +24,93 @@
<text class="look-top-text">土地池</text>
</view>
</view>
<map class="map" enable-satellite="{{satellite==1?true:false}}" scale="{{scale}}" markers="{{markers}}"
latitude="{{latitude}}" longitude="{{longitude}}" bindmarkertap="markertap" polygons="{{polygons}}"
circles = "{{circles}}">
<cover-view class="map-tab">
<cover-view data-id="1" class="map-tab-item {{satellite==1?'active':''}}" bindtap="mapTabItem">卫星图</cover-view>
<cover-view data-id="2" class="map-tab-item {{satellite==2?'active':''}}" bindtap="mapTabItem">平面图</cover-view>
</cover-view>
<cover-image data-type="add" bindtap="scaleDown" class="map-scale map-scale-add"
src="../../assets/images/add.png"></cover-image>
<cover-image data-type="reduce" bindtap="scaleBack" class="map-scale map-scale-reduce"
src="../../assets/images/myback.png"></cover-image>
<cover-view class="tab-list">
<cover-view class="list-box">
<cover-view class="list-title">看地块</cover-view>
<cover-view class="list-info">
<cover-view class="list-item {{filter.setActive(actives,1)}}" data-id="{{1}}" bindtap="checkBtn">
<mp-dialog title="{{titleLand}} " show="{{dialogVisible}}" bindbuttontap="tapDialogButton" buttons="{{buttons}}">
<view class="list">
<view class="list-info">
<view class="list-info-item">总计容建筑面积:{{totalConsArea}}(㎡)</view>
<view class="list-info-item">楼面起始价:{{startingFloorPrice}}(万)</view>
<view class="list-info-item">起始总价:{{transferPrice}}(万)</view>
<view class="list-info-item">竞拍时间:{{auctionDate}}</view>
</view>
</view>
</mp-dialog>
<mp-half-screen-dialog
show="{{halfScreenDialogVisible}}"
closabled="{{true}}"
maskClosable="{{true}}"
bindclose="closeLayerSetting"
title="图层设置">
<view class="tab-list" slot="footer">
<view class="list-box">
<view class="list-title">看地块</view>
<view class="list-info">
<view class="list-item {{filter.setActive(actives,1)}}" data-id="{{1}}" bindtap="checkBtn">
已出让
</cover-view>
<cover-view class="timer">
{{start}}年 - {{end}}年
</cover-view>
<cover-view class="list-item cross {{filter.setActive(actives,2)}}" data-id="{{2}}" bindtap="checkBtn">
</view>
<view class="timer timer-start">
<picker range="{{years}}" header-text="开始年份" value="{{indexStart}}" range-key="label" bindchange="bindPickerChangeStart">
<text>{{start}}年</text>
</picker>
</view>
<text class="timer-link">-</text>
<view class="timer timer-end">
<picker range="{{years}}" header-text="结束年份" value="{{indexEnd}}" range-key="label" bindchange="bindPickerChangeEnd">
<text>{{end}}年</text>
</picker>
</view>
<view class="list-item cross {{filter.setActive(actives,2)}}" data-id="{{2}}" bindtap="checkBtn">
挂牌中
</cover-view>
<cover-view class="list-item cross {{filter.setActive(actives,3)}}" data-id="{{3}}" bindtap="checkBtn">
</view>
<view class="list-item cross {{filter.setActive(actives,3)}}" data-id="{{3}}" bindtap="checkBtn">
拟挂牌
</cover-view>
</cover-view>
</cover-view>
<cover-view class="list-box">
<cover-view class="list-title">看区位</cover-view>
<cover-view class="list-info">
<cover-view class="list-item {{filter.setActive(actives,4)}}" data-id="{{4}}" bindtap="checkBtn">
</view>
</view>
</view>
<view class="list-box">
<view class="list-title">看区位</view>
<view class="list-info">
<view class="list-item {{filter.setActive(actives,4)}}" data-id="{{4}}" bindtap="checkBtn">
行政区
</cover-view>
<cover-view class="list-item {{filter.setActive(actives,5)}}" data-id="{{5}}" bindtap="checkBtn">
</view>
<view class="list-item {{filter.setActive(actives,5)}}" data-id="{{5}}" bindtap="checkBtn">
大组团
</cover-view>
<cover-view class="list-item {{filter.setActive(actives,6)}}" data-id="{{6}}" bindtap="checkBtn">
</view>
<view class="list-item {{filter.setActive(actives,6)}}" data-id="{{6}}" bindtap="checkBtn">
小组团
</cover-view>
</cover-view>
</cover-view>
</view>
</view>
</view>
<cover-view class="list-box">
<cover-view class="list-title">看配套</cover-view>
<cover-view class="list-info">
<cover-view class="list-item {{filter.setActive(actives,7)}}" data-id="{{7}}" bindtap="checkBtn">
<view class="list-box">
<view class="list-title">看配套</view>
<view class="list-info">
<view class="list-item {{filter.setActive(actives,7)}}" data-id="{{7}}" bindtap="checkBtn">
配套
</cover-view>
<cover-view class="list-item {{filter.setActive(actives,8)}}" data-id="{{8}}" bindtap="checkBtn">
</view>
<view class="list-item {{filter.setActive(actives,8)}}" data-id="{{8}}" bindtap="checkBtn">
环线
</cover-view>
<cover-view class="list-item {{filter.setActive(actives,9)}}" data-id="{{9}}" bindtap="checkBtn">
</view>
<view class="list-item {{filter.setActive(actives,9)}}" data-id="{{9}}" bindtap="checkBtn">
3KM圈
</cover-view>
</cover-view>
</cover-view>
</view>
</view>
</view>
</view>
</mp-half-screen-dialog>
<map class="map" enable-satellite="{{satellite==1?true:false}}" scale="{{scale}}" markers="{{markers}}"
latitude="{{latitude}}" longitude="{{longitude}}" bindmarkertap="markertap" polygons="{{polygons}}"
circles = "{{circles}}" bindregionchange="regionchange" bindtap="onMapTaped">
<cover-view class="map-tab">
<cover-view data-id="1" class="map-tab-item {{satellite==1?'active':''}}" bindtap="mapTabItem">卫星图</cover-view>
<cover-view data-id="2" class="map-tab-item {{satellite==2?'active':''}}" bindtap="mapTabItem">平面图</cover-view>
</cover-view>
<!-- <cover-image data-type="add" bindtap="scaleDown" class="map-scale map-scale-add"
src="../../assets/images/add.png"></cover-image> -->
<cover-image data-type="reduce" bindtap="scaleBack" class="map-scale map-scale-reduce"
src="../../assets/images/myback.png"></cover-image>
<cover-image data-type="add" bindtap="showLayerSetting" class="map-scale map-scale-layer"
src="../../assets/images/add.png"></cover-image>
</map>
<!-- <view class="list-foot">
<view class="list-item {{item.state?'check-active':''}}" wx:for="{{tabs}}" wx:key="id" data-id="{{item.id}}"

50
pages/look/look.wxss

@ -4,8 +4,8 @@
}
.map {
width: 750rpx;
height: 1042rpx;
width:100%;
height:100vh;
}
.map-tab {
@ -19,7 +19,7 @@
justify-content: space-between;
align-items: center;
position: fixed;
right: 58rpx;
right: 32rpx;
top: 300rpx;
padding: 0 20rpx;
}
@ -28,8 +28,9 @@
font-size: 20rpx;
font-weight: 700;
color: #262936;
border-radius: 4rpx;
}
.map-tab .active {
color: #146ae7;
}
@ -38,17 +39,19 @@
width: 110rpx;
height: 110rpx;
position: fixed;
right: 55rpx;
right: 32rpx;
}
/* .map-scale-add {
top: 400rpx;
} */
.map-scale-add {
.map-scale-reduce {
top: 400rpx;
}
.map-scale-reduce {
.map-scale-layer {
top: 500rpx;
}
.map-back {
width: 100rpx;
height: 100rpx;
@ -93,7 +96,7 @@
.list-item {
width: 116rpx;
height: 50rpx;
border: 2rpx solid #565a6b;
border: 2rpx solid #1778d360;
border-radius: 4rpx;
line-height: 50rpx;
text-align: center;
@ -109,7 +112,7 @@
.check-active {
color: #ffffff;
background: #3a97ff;
border: 2rpx solid #3a97ff;
border: 2rpx solid #3a96ff54;
}
.timer {
@ -117,14 +120,30 @@
line-height: 50rpx;
padding-left: 18rpx;
padding-right: 18rpx;
background: rgba(187,188,200,.3);
border-top: 2rpx solid #3a96ff54;
border-bottom: 2rpx solid #3a96ff54;
background: #ffffff;
border-radius: 4rpx;
display: flex;
font-size: 28rpx;
color: rgba(38,41,54,.6);
color: rgba(38,41,54,.9);
}
.timer-start {
margin-left: 24rpx;
border-left: 2rpx solid #3a96ff54;
}
.timer-end {
border-right: 2rpx solid #3a96ff54;
}
.timer-link {
height: 50rpx;
line-height: 50rpx;
padding-left: 12rpx;
padding-right: 12rpx;
border-top: 2rpx solid #3a96ff54;
border-bottom: 2rpx solid #3a96ff54;
align-items: center;
}
.list-foot {
padding: 0 30rpx 30rpx 30rpx;
box-sizing: border-box;
@ -142,4 +161,9 @@
.text-pan {
padding: 0 10rpx;
}
.weui-half-screen-dialog {
max-height: 80% !important;
height: 652rpx;
}

9
project.config.json

@ -33,8 +33,13 @@
"enableEngineNative": false,
"useIsolateContext": true,
"userConfirmedBundleSwitch": false,
"packNpmManually": true,
"packNpmRelationList": [],
"packNpmManually": false,
"packNpmRelationList": [
{
"packageJsonPath": "./package.json",
"miniprogramNpmDistDir": "./miniprogram/"
}
],
"minifyWXSS": true,
"showES6CompileOption": false
},

3
utils/gisApi.js

@ -1,4 +1,4 @@
const baseURL = 'http://47.108.164.110:8080/'
const baseURL = 'https://yoursairdata.com/gis/'
const GET = 'GET';
const POST = 'POST';
const PUT = 'PUT';
@ -30,6 +30,7 @@ function request(method, url, data) {
const API = {
getLandListing: (data) => request(GET, `getLandListing`,data), //已出让
getLandList: (data) => request(GET, `getLandList`,data), //挂牌中
getRegionByLocation: (data) => request(GET, `getRegionByLocation`,data), //行政区
getLandToList: (data) => request(GET, `getLandToList`,data), //待挂牌
getFacilitiesByLocation: (data) => request(GET, `getFacilitiesByLocation`,data), //配套

Loading…
Cancel
Save