丁烨烨 1 bulan lalu
melakukan
b0ab681030
4 mengubah file dengan 793 tambahan dan 0 penghapusan
  1. 553 0
      index.html
  2. 31 0
      js/data.js
  3. 203 0
      manifest.json
  4. 6 0
      package-lock.json

+ 553 - 0
index.html

@@ -0,0 +1,553 @@
+<!DOCTYPE html>
+<html>
+	<head>
+		<meta charset="utf-8">
+		<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
+		<title>地块地图</title>
+		<link rel="stylesheet" href="https://cdn.bootcdn.net/ajax/libs/leaflet/1.9.4/leaflet.css">
+		<link rel="stylesheet" href="https://unpkg.com/@geoman-io/leaflet-geoman-free@latest/dist/leaflet-geoman.css">
+		<script src="https://cdn.bootcdn.net/ajax/libs/leaflet/1.9.4/leaflet.js"></script>
+		<script src="https://unpkg.com/@geoman-io/leaflet-geoman-free@latest/dist/leaflet-geoman.min.js"></script>
+		<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
+		<script src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
+		<style>
+			html,
+			body,
+			#map,
+			.map_box {
+				width: 100%;
+				height: 100%;
+				margin: 0;
+				padding: 0;
+			}
+
+			.btn-group {
+				position: fixed;
+				top: 10px;
+				left: 10px;
+				z-index: 999999;
+				display: flex;
+				flex-direction: column;
+				gap: 6px;
+			}
+
+			.btn-group button {
+				padding: 8px 12px;
+				background: #007aff;
+				color: #fff;
+				border: none;
+				border-radius: 6px;
+				font-size: 14px;
+				white-space: nowrap;
+				cursor: pointer;
+			}
+
+			#clearDraw {
+				background: #ff3b30;
+			}
+
+			#uploadLand {
+				background: #28a745;
+				display: none;
+			}
+
+			#areaInfo {
+				background: #fff;
+				padding: 6px 10px;
+				border-radius: 6px;
+				font-size: 13px;
+				color: #333;
+				font-weight: bold;
+				box-shadow: 0 1px 3px #00000033;
+			}
+
+			.draw-area-label {
+				background: #007aff;
+				color: #fff;
+				font-weight: bold;
+				padding: 5px 10px;
+				border-radius: 6px;
+				font-size: 14px;
+				white-space: nowrap;
+				box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
+				pointer-events: none;
+			}
+
+			.land-label {
+				background: #ffffff;
+				padding: 4px 8px;
+				border-radius: 6px;
+				font-size: 12px;
+				color: #d32f2f;
+				text-align: center;
+				white-space: nowrap;
+				box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
+				pointer-events: none !important;
+				font-weight: bold;
+				border: 1px solid #eee;
+				line-height: 1.4;
+				display: inline-block;
+			}
+
+			/* 加载动画样式 */
+			.loading-overlay {
+				position: fixed;
+				top: 0;
+				left: 0;
+				width: 100%;
+				height: 100%;
+				background-color: rgba(255, 255, 255, 0.9);
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				z-index: 9999999;
+				flex-direction: column;
+				gap: 15px;
+			}
+
+			.loading-spinner {
+				width: 40px;
+				height: 40px;
+				border: 4px solid #e0e0e0;
+				border-top: 4px solid #007aff;
+				border-radius: 50%;
+				animation: spin 1s linear infinite;
+			}
+
+			.loading-text {
+				font-size: 15px;
+				color: #333;
+			}
+
+			@keyframes spin {
+				0% {
+					transform: rotate(0deg);
+				}
+
+				100% {
+					transform: rotate(360deg);
+				}
+			}
+		</style>
+	</head>
+	<body>
+		<!-- 加载动画 -->
+		<div class="loading-overlay" id="loadingOverlay">
+			<div class="loading-spinner"></div>
+			<div class="loading-text">正在加载地块数据...</div>
+		</div>
+
+		<div class="map_box">
+			<div id="map"></div>
+			<div class="btn-group">
+				<!-- <button id="sendToMini">选中地块并回传</button> -->
+				<button id="startDraw">开启打点绘图</button>
+				<button id="clearDraw">清除绘图</button>
+				<button id="uploadLand">✅ 上传当前绘制地块</button>
+				<div id="areaInfo">绘图面积:0 亩 / 0 ㎡</div>
+			</div>
+		</div>
+
+		<script>
+			window.onload = function() {
+				// 工具函数:获取URL参数
+				function getUrlParams() {
+					var params = {};
+					var url = window.location.href;
+					var queryStr = url.split('?')[1];
+					if (!queryStr) return params;
+					var queryArr = queryStr.split('&');
+					for (var i = 0; i < queryArr.length; i++) {
+						var item = queryArr[i];
+						if (!item) continue;
+						var eqIndex = item.indexOf('=');
+						var key = eqIndex > -1 ? item.substring(0, eqIndex) : item;
+						var val = eqIndex > -1 ? decodeURIComponent(item.substring(eqIndex + 1)) : '';
+						params[key] = val;
+					}
+					return params;
+				}
+
+				const params = getUrlParams();
+
+				// 🔥 接收参数
+				const cbfbm = params.data || '';
+				const pageType = params.type || '';
+				const dsType = params.displayType || '';
+
+				const TIANDITU_TK = '0f31ca9a7e9a0b80f5e5d53df0a02925';
+
+				// 初始化地图(先不设置中心点,加载数据后自动定位)
+				var map = L.map('map', {
+					zoomControl: true,
+					maxZoom: 28,
+					minZoom: 1,
+					zoomSnap: 0.5,
+					zoomDelta: 0.5
+				}).setView([30, 114], 5); // 初始小视野,加载后自动调整
+
+				// 天地图底图
+				L.tileLayer(
+					`https://t0.tianditu.gov.cn/img_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=img&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=${TIANDITU_TK}`, {
+						maxNativeZoom: 18,
+						maxZoom: 28,
+						minZoom: 1
+					}).addTo(map);
+				L.tileLayer(
+					`https://t0.tianditu.gov.cn/cia_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=cia&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=${TIANDITU_TK}`, {
+						maxNativeZoom: 18,
+						maxZoom: 28,
+						minZoom: 1
+					}).addTo(map);
+
+				// 初始化绘图工具
+				map.pm.setLang('zh');
+				// 类型为 farmer 时隐藏绘图功能
+				if (pageType === 'farmer') {
+					$('#startDraw').hide();
+					$('#clearDraw').hide();
+					$('#areaInfo').hide();
+				}
+				var landLayerGroup = L.layerGroup().addTo(map);
+				var currentSelectedPolygon = null;
+				const SHOW_LABEL_MIN_ZOOM = 18;
+				let allLandItems = [];
+
+				let drawnPolygon = null;
+				let areaLabelMarker = null;
+
+				// 点击边线添加顶点
+				function enableClickAddVertex(layer) {
+					layer.off('click');
+					layer.on('click', function(e) {
+						if (!layer.pm.enabled()) return;
+						const latlng = e.latlng;
+						const latlngs = layer.getLatLngs()[0];
+						let closestIndex = -1;
+						let minDist = Infinity;
+
+						for (let i = 0; i < latlngs.length - 1; i++) {
+							const p1 = latlngs[i];
+							const p2 = latlngs[i + 1];
+							const dist = L.LineUtil.pointToSegmentDistance(
+								map.latLngToContainerPoint(latlng),
+								map.latLngToContainerPoint(p1),
+								map.latLngToContainerPoint(p2)
+							);
+							if (dist < minDist) {
+								minDist = dist;
+								closestIndex = i + 1;
+							}
+						}
+
+						if (closestIndex !== -1) {
+							latlngs.splice(closestIndex, 0, latlng);
+							layer.setLatLngs(latlngs);
+							layer.fire('pm:edit');
+						}
+					});
+				}
+
+				// 计算面积(亩 + 平方米)
+				function calcAreaMu(latLngs) {
+					if (!latLngs || latLngs.length < 3) return { mu: 0, m2: 0 };
+					let m2 = 0;
+					if (L.PM && L.PM.Utils && L.PM.Utils.calculatePolygonArea) {
+						m2 = L.PM.Utils.calculatePolygonArea(latLngs);
+					} else {
+						const R = 6378137;
+						const rad = Math.PI / 180;
+						for (let i = 0; i < latLngs.length; i++) {
+							const p1 = latLngs[i];
+							const p2 = latLngs[(i + 1) % latLngs.length];
+							m2 += (p2.lng - p1.lng) * rad * (2 + Math.sin(p1.lat * rad) + Math.sin(p2.lat * rad));
+						}
+						m2 = Math.abs(m2 * R * R / 2);
+					}
+					const mu = (m2 / 666.67).toFixed(2);
+					return {
+						mu: mu,
+						m2: m2.toFixed(2)
+					};
+				}
+
+				// 打印地块信息
+				function printPolygonInfo(layer) {
+					if (!layer) return;
+					const latlngs = layer.getLatLngs()[0];
+					const { mu, m2 } = calcAreaMu(latlngs);
+					console.log('====================================');
+					console.log('✅ 地块点位:');
+					latlngs.forEach((p, i) => console.log(`第${i+1}点:${p.lat.toFixed(8)}, ${p.lng.toFixed(8)}`));
+					console.log(`✅ 面积:${mu} 亩 / ${m2} 平方米`);
+					console.log('====================================');
+				}
+
+				// 更新面积标签
+				function updateAreaLabel() {
+					if (!drawnPolygon) return;
+					let latLngs = drawnPolygon.getLatLngs()[0];
+					const { mu, m2 } = calcAreaMu(latLngs);
+					$('#areaInfo').text(`绘图面积:${mu} 亩 / ${m2} ㎡`);
+					let center = drawnPolygon.getCenter();
+					if (areaLabelMarker) map.removeLayer(areaLabelMarker);
+					areaLabelMarker = L.marker(center, {
+						icon: L.divIcon({
+							className: 'draw-area-label',
+							html: `${mu} 亩 / ${m2} ㎡`,
+							iconSize: null,
+							iconAnchor: [50, 50]
+						})
+					}).addTo(map);
+				}
+
+				// 上传绘制地块
+				function uploadDrawLand() {
+					if (!drawnPolygon) {
+						alert("请先绘制地块!");
+						return;
+					}
+
+					const latlngs = drawnPolygon.getLatLngs()[0];
+					const { mu, m2 } = calcAreaMu(latlngs);
+					const points = latlngs.map(p => [p.lng, p.lat]);
+
+					const confirmUpload = confirm(`确认上传当前地块?\n\n面积:${mu} 亩 / ${m2} ㎡\n\n确认后将自动返回小程序`);
+					if (!confirmUpload) {
+						console.log("用户取消上传");
+						return;
+					}
+
+					const postData = {
+						type: "drawLandFinished",
+						points: points,
+						areaMu: mu,
+						areaM2: m2
+					};
+
+					console.log("H5 发送给小程序:", postData);
+					wx.miniProgram.postMessage({
+						data: postData
+					});
+					wx.miniProgram.navigateBack();
+				}
+
+				// 按钮事件:开启/关闭绘图
+				$('#startDraw').click(function() {
+					if (map.pm.Draw.Polygon._enabled) {
+						map.pm.Draw.Polygon.disable();
+						$(this).text('开启打点绘图').css('background', '#007aff');
+						return;
+					}
+					$(this).text('关闭打点绘图').css('background', '#ff3b30');
+					$('#uploadLand').hide();
+					map.pm.Draw.Polygon.enable({
+						allowSelfIntersection: false,
+						markerStyle: {
+							radius: 5
+						}
+					});
+				});
+
+				// 清除绘图
+				$('#clearDraw').click(function() {
+					if (drawnPolygon) {
+						map.removeLayer(drawnPolygon);
+						drawnPolygon = null;
+					}
+					if (areaLabelMarker) {
+						map.removeLayer(areaLabelMarker);
+						areaLabelMarker = null;
+					}
+					$('#areaInfo').text('绘图面积:0 亩 / 0 ㎡');
+					$('#startDraw').text('开启打点绘图').css('background', '#007aff');
+					$('#uploadLand').hide();
+				});
+
+				$('#uploadLand').click(uploadDrawLand);
+
+				// 绘图完成事件
+				map.on('pm:create', function(e) {
+					let layer = e.layer;
+					if (drawnPolygon) map.removeLayer(drawnPolygon);
+					drawnPolygon = layer;
+
+					layer.pm.enable({
+						allowAddVertex: true,
+						allowDeleteVertex: true,
+						markerEditable: true,
+						hideMiddleMarkers: false
+					});
+
+					enableClickAddVertex(layer);
+					map.pm.Draw.Polygon.disable();
+					$('#startDraw').text('开启打点绘图').css('background', '#007aff');
+					$('#uploadLand').show();
+
+					updateAreaLabel();
+					printPolygonInfo(layer);
+
+					layer.on('pm:edit pm:vertexadded pm:vertexremoved', function() {
+						updateAreaLabel();
+						printPolygonInfo(layer);
+					});
+				});
+
+				// 获取多边形中心点
+				function getPolygonCenter(points) {
+					let latSum = 0,
+						lngSum = 0,
+						len = points.length;
+					points.forEach(p => {
+						latSum += p[1];
+						lngSum += p[0];
+					});
+					return [latSum / len, lngSum / len];
+				}
+
+				// 自适应缩放到所有地块
+				function fitMapToAllLands(allLandPoints) {
+					if (!allLandPoints.length) return;
+					let bounds = [];
+					allLandPoints.forEach(points => {
+						points.forEach(p => bounds.push([p[1], p[0]]));
+					});
+					map.fitBounds(L.latLngBounds(bounds), {
+						padding: [30, 30]
+					});
+				}
+
+				// 更新标签显示
+				function updateVisibleLabels() {
+					const currentZoom = map.getZoom();
+					const bounds = map.getBounds();
+					allLandItems.forEach(item => {
+						const {
+							label,
+							center
+						} = item;
+						if (currentZoom < SHOW_LABEL_MIN_ZOOM || !bounds.contains(center)) {
+							if (landLayerGroup.hasLayer(label)) landLayerGroup.removeLayer(label);
+						} else {
+							if (!landLayerGroup.hasLayer(label)) landLayerGroup.addLayer(label);
+						}
+					});
+				}
+
+				// 加载地块数据
+				function loadLandData() {
+					console.log(123,dsType)
+					let ctData = {}
+					if(dsType === 'all'){
+						ctData = {
+							cbfbms: cbfbm,
+						}
+					}else if(dsType === 'single'){
+						ctData = {
+							dkbms: cbfbm,
+						}
+					}
+					$.ajax({
+						url: "http://192.168.110.235:1860/miniProgram/dk/arcgisGeojson",
+						type: "GET",
+						data: ctData, // 
+						dataType: "json",
+						success: function(res) {
+							// 加载完成 → 隐藏加载动画
+							$('#loadingOverlay').hide();
+
+							landLayerGroup.clearLayers();
+							allLandItems = [];
+							let allLandPoints = [];
+
+							if (res.code === 200 && res.data?.features?.length) {
+								res.data.features.forEach(feature => {
+									let rings = feature.geometry?.rings?.[0];
+									if (!rings) return;
+
+									let points = rings.map(p => [p[1], p[0]]);
+									allLandPoints.push(rings);
+									let center = getPolygonCenter(rings);
+									let attr = feature.attributes;
+
+									let polygon = L.polygon(points, {
+										color: '#ffaa00',
+										weight: 2,
+										fillColor: '#ffaa00',
+										fillOpacity: 0.3,
+										attributes: attr
+									}).addTo(landLayerGroup);
+
+									let text =
+										`${attr.cbfmc||'地块'} | ${(attr.scmjm||0).toFixed(2)}亩 | ${attr.scmj||0}㎡`;
+									let label = L.marker(center, {
+										icon: L.divIcon({
+											className: 'land-label',
+											html: text,
+											iconSize: null,
+											iconAnchor: [50, 50]
+										})
+									});
+
+									allLandItems.push({
+										label,
+										center,
+										polygon
+									});
+
+									// 点击选中地块
+									polygon.on('click', e => {
+										landLayerGroup.eachLayer(l => {
+											if (l.options?.attributes) l.setStyle({
+												color: '#ffaa00',
+												weight: 2,
+												fillOpacity: 0.3
+											});
+										});
+										e.target.setStyle({
+											color: '#ffff00',
+											weight: 4,
+											fillOpacity: 0.5
+										});
+										currentSelectedPolygon = e.target;
+									});
+								});
+
+								// 自动定位到所有地块中心
+								fitMapToAllLands(allLandPoints);
+								updateVisibleLabels();
+							}
+						},
+						error: () => {
+							$('#loadingOverlay').hide();
+							alert("获取地块失败");
+						}
+					});
+				}
+
+				// 地图缩放/移动时更新标签
+				map.on('zoomend moveend', updateVisibleLabels);
+
+				// 选中地块回传给小程序
+				$("#sendToMini").click(function() {
+					if (!currentSelectedPolygon) return alert("请先选中地块");
+					let data = {
+						points: currentSelectedPolygon.getLatLngs()[0].map(i => [i.lat, i.lng]),
+						attr: currentSelectedPolygon.options.attributes
+					};
+					console.log("提交数据:", data);
+					wx.miniProgram.postMessage({
+						data: {
+							type: "landSelected",
+							data: data
+						}
+					});
+					alert("已回传给小程序");
+				});
+
+				// 开始加载数据
+				loadLandData();
+			};
+		</script>
+	</body>
+</html>

+ 31 - 0
js/data.js

@@ -0,0 +1,31 @@
+window.onload = function() {
+  // 万能URL参数解析函数(复制即用)
+  function getUrlParams() {
+    var params = {};
+    var url = window.location.href;
+    // 先截取?后面的部分
+    var queryStr = url.split('?')[1];
+    if (!queryStr) return params; // 无参数直接返回空
+    
+    // 拆分多个参数
+    var queryArr = queryStr.split('&');
+    for (var i = 0; i < queryArr.length; i++) {
+      var item = queryArr[i];
+      if (!item) continue; // 跳过空参数
+      // 拆分参数名和值(兼容参数值含=的情况)
+      var eqIndex = item.indexOf('=');
+      var key = eqIndex > -1 ? item.substring(0, eqIndex) : item;
+      var val = eqIndex > -1 ? decodeURIComponent(item.substring(eqIndex + 1)) : '';
+      params[key] = val;
+    }
+    return params;
+  }
+
+  // 解析并打印参数
+  const params = getUrlParams();
+  console.log('H5解析到的参数:', params);
+  // 单独打印每个参数,确认是否存在
+  console.log('经度:', params.longitude);
+  console.log('纬度:', params.latitude);
+  console.log('Token:', params.token);
+};

+ 203 - 0
manifest.json

@@ -0,0 +1,203 @@
+{
+    "@platforms": ["android", "iPhone", "iPad"],
+    "id" : "H511F1BF7",/*应用的标识*/
+    "name" : "map",/*应用名称,程序桌面图标名称*/
+    "version": {
+        "name": "1.0",/*应用版本名称*/
+        "code": "100"
+    },
+    "description": "",/*应用描述信息*/
+    "icons": {
+        "72": "icon.png"
+    },
+    "launch_path": "index.html",/*应用的入口页面,默认为根目录下的index.html;支持网络地址,必须以http://或https://开头*/
+    "developer": {
+        "name": "",/*开发者名称*/
+        "email": "",/*开发者邮箱地址*/
+        "url": ""/*开发者个人主页地址*/
+    },
+    "permissions": {
+        "Accelerometer": {
+            "description": "访问加速度感应器"
+        },
+        "Audio": {
+            "description": "访问麦克风"
+        },
+        "Messaging":{
+        	"description": "短彩邮件插件"
+        },
+        "Cache": {
+            "description": "管理应用缓存"
+        },
+        "Camera": {
+            "description": "访问摄像头"
+        },
+        "Console": {
+            "description": "跟踪调试输出日志"
+        },
+        "Contacts": {
+            "description": "访问系统联系人信息"
+        },
+        "Device": {
+            "description": "访问设备信息"
+        },
+        "Downloader": {
+            "description": "文件下载管理"
+        },
+        "Events": {
+            "description": "应用扩展事件"
+        },
+        "File": {
+            "description": "访问本地文件系统"
+        },
+        "Gallery": {
+            "description": "访问系统相册"
+        },
+        "Geolocation": {
+            "description": "访问位置信息"
+        },
+        "Invocation": {
+            "description": "使用Native.js能力"
+        },
+        "Orientation": {
+            "description": "访问方向感应器"
+        },
+        "Proximity": {
+            "description": "访问距离感应器"
+        },
+        "Storage": {
+            "description": "管理应用本地数据"
+        },
+        
+        "Uploader": {
+            "description": "管理文件上传任务"
+        },
+        "Runtime": {
+            "description": "访问运行期环境"
+        },
+        "XMLHttpRequest": {
+            "description": "跨域网络访问"
+        },
+        "Zip": {
+            "description": "文件压缩与解压缩"
+        },
+        "Barcode": {
+            "description": "管理二维码扫描插件"
+        },
+        "Maps": {
+            "description": "管理地图插件"
+        },
+        "Speech": {
+            "description": "管理语音识别插件"
+        },
+        "Webview":{
+        	"description": "窗口管理"
+        },
+        "NativeUI":{
+        	"description": "原生UI控件"
+        },
+        "Navigator":{
+        	"description": "浏览器信息"
+        },
+        "NativeObj":{
+        	"description": "原生对象"
+        }
+    },
+    "plus": {
+        "splashscreen": {
+            "autoclose": true,/*是否自动关闭程序启动界面,true表示应用加载应用入口页面后自动关闭;false则需调plus.navigator.closeSplashscreen()关闭*/
+            "waiting": true/*是否在程序启动界面显示等待雪花,true表示显示,false表示不显示。*/
+        },
+        "popGesture": "close",/*设置应用默认侧滑返回关闭Webview窗口,"none"为无侧滑返回功能,"hide"为侧滑隐藏Webview窗口。参考http://ask.dcloud.net.cn/article/102*/
+        "runmode": "normal",/*应用的首次启动运行模式,可取liberate或normal,liberate模式在第一次启动时将解压应用资源(Android平台File API才可正常访问_www目录)*/
+        "signature": "Sk9JTiBVUyBtYWlsdG86aHIyMDEzQGRjbG91ZC5pbw==",/*可选,保留给应用签名,暂不使用*/
+        "distribute": {
+            "apple": {
+                "appid": "",/*iOS应用标识,苹果开发网站申请的appid,如io.dcloud.HelloH5*/
+                "mobileprovision": "",/*iOS应用打包配置文件*/
+                "password": "",/*iOS应用打包个人证书导入密码*/
+                "p12": "",/*iOS应用打包个人证书,打包配置文件关联的个人证书*/
+                "devices": "universal",/*iOS应用支持的设备类型,可取值iphone/ipad/universal*/
+                "frameworks":[
+                ]/*调用Native.js调用原生Objective-c API需要引用的FrameWork,如需调用GameCenter,则添加"GameKit.framework"*/
+            },
+            "google": {
+                "packagename": "",/*Android应用包名,如io.dcloud.HelloH5*/
+                "keystore": "",/*Android应用打包使用的密钥库文件*/
+                "password": "",/*Android应用打包使用密钥库中证书的密码*/
+                "aliasname": "",/*Android应用打包使用密钥库中证书的别名*/
+               "permissions": ["<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>","<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>","<uses-permission android:name=\"android.permission.VIBRATE\"/>","<uses-permission android:name=\"android.permission.READ_LOGS\"/>","<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>","<uses-feature android:name=\"android.hardware.camera.autofocus\"/>","<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>","<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.CAMERA\"/>","<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>","<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>","<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>","<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>","<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>","<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>","<uses-permission android:name=\"android.permission.CALL_PHONE\"/>","<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>","<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>","<uses-feature android:name=\"android.hardware.camera\"/>","<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>","<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"]
+				/*使用Native.js调用原生安卓API需要使用到的系统权限*/
+            },
+            "orientation": [
+                "portrait-primary"
+            ],/*应用支持的方向,portrait-primary:竖屏正方向;portrait-secondary:竖屏反方向;landscape-primary:横屏正方向;landscape-secondary:横屏反方向*/
+            "icons": {
+                "ios": {
+                    "prerendered": true, /*应用图标是否已经高亮处理,在iOS6及以下设备上有效*/
+                    "auto": "", /*应用图标,分辨率:512x512,用于自动生成各种尺寸程序图标*/
+                    "iphone": {
+                        "normal": "", /*iPhone3/3GS程序图标,分辨率:57x57*/
+                        "retina": "", /*iPhone4程序图标,分辨率:114x114*/
+                        "retina7": "", /*iPhone4S/5/6程序图标,分辨率:120x120*/
+			"retina8": "", /*iPhone6 Plus程序图标,分辨率:180x180*/
+                        "spotlight-normal": "", /*iPhone3/3GS Spotlight搜索程序图标,分辨率:29x29*/
+                        "spotlight-retina": "", /*iPhone4 Spotlight搜索程序图标,分辨率:58x58*/
+                        "spotlight-retina7": "", /*iPhone4S/5/6 Spotlight搜索程序图标,分辨率:80x80*/
+                        "settings-normal": "", /*iPhone4设置页面程序图标,分辨率:29x29*/
+                        "settings-retina": "", /*iPhone4S/5/6设置页面程序图标,分辨率:58x58*/
+			"settings-retina8": "" /*iPhone6Plus设置页面程序图标,分辨率:87x87*/
+                    },
+                    "ipad": {
+                        "normal": "", /*iPad普通屏幕程序图标,分辨率:72x72*/
+                        "retina": "", /*iPad高分屏程序图标,分辨率:144x144*/
+                        "normal7": "", /*iPad iOS7程序图标,分辨率:76x76*/
+                        "retina7": "", /*iPad iOS7高分屏程序图标,分辨率:152x152*/
+                        "spotlight-normal": "", /*iPad Spotlight搜索程序图标,分辨率:50x50*/
+                        "spotlight-retina": "", /*iPad高分屏Spotlight搜索程序图标,分辨率:100x100*/
+                        "spotlight-normal7": "",/*iPad iOS7 Spotlight搜索程序图标,分辨率:40x40*/
+                        "spotlight-retina7": "",/*iPad iOS7高分屏Spotlight搜索程序图标,分辨率:80x80*/
+                        "settings-normal": "",/*iPad设置页面程序图标,分辨率:29x29*/
+                        "settings-retina": "" /*iPad高分屏设置页面程序图标,分辨率:58x58*/
+                    }
+                },
+                "android": {
+                    "mdpi": "", /*普通屏程序图标,分辨率:48x48*/
+                    "ldpi": "", /*大屏程序图标,分辨率:48x48*/
+                    "hdpi": "", /*高分屏程序图标,分辨率:72x72*/
+                    "xhdpi": "",/*720P高分屏程序图标,分辨率:96x96*/
+                    "xxhdpi": ""/*1080P 高分屏程序图标,分辨率:144x144*/
+                }
+            },
+            "splashscreen": {
+                "ios": {
+                    "iphone": {
+                        "default": "", /*iPhone3启动图片选,分辨率:320x480*/
+                        "retina35": "",/*3.5英寸设备(iPhone4)启动图片,分辨率:640x960*/
+                        "retina40": "",/*4.0 英寸设备(iPhone5/iPhone5s)启动图片,分辨率:640x1136*/
+                        "retina47": "",/*4.7 英寸设备(iPhone6)启动图片,分辨率:750x1334*/
+                        "retina55": "",/*5.5 英寸设备(iPhone6 Plus)启动图片,分辨率:1242x2208*/
+                        "retina55l": ""/*5.5 英寸设备(iPhone6 Plus)横屏启动图片,分辨率:2208x1242*/
+                    },
+                    "ipad": {
+                        "portrait": "", /*iPad竖屏启动图片,分辨率:768x1004*/
+                        "portrait-retina": "",/*iPad高分屏竖屏图片,分辨率:1536x2008*/
+                        "landscape": "", /*iPad横屏启动图片,分辨率:1024x748*/
+                        "landscape-retina": "", /*iPad高分屏横屏启动图片,分辨率:2048x1496*/
+                        "portrait7": "", /*iPad iOS7竖屏启动图片,分辨率:768x1024*/
+                        "portrait-retina7": "",/*iPad iOS7高分屏竖屏图片,分辨率:1536x2048*/
+                        "landscape7": "", /*iPad iOS7横屏启动图片,分辨率:1024x768*/
+                        "landscape-retina7": ""/*iPad iOS7高分屏横屏启动图片,分辨率:2048x1536*/
+                    }
+                },
+                "android": {
+                    "mdpi": "", /*普通屏启动图片,分辨率:240x282*/
+                    "ldpi": "", /*大屏启动图片,分辨率:320x442*/
+                    "hdpi": "", /*高分屏启动图片,分辨率:480x762*/
+                    "xhdpi": "", /*720P高分屏启动图片,分辨率:720x1242*/
+                    "xxhdpi": ""/*1080P高分屏启动图片,分辨率:1080x1882*/
+                }
+            }
+        }
+    }
+}

+ 6 - 0
package-lock.json

@@ -0,0 +1,6 @@
+{
+  "name": "map",
+  "lockfileVersion": 2,
+  "requires": true,
+  "packages": {}
+}