From 186221e627e08b36a10119ce7fb0c11616999354 Mon Sep 17 00:00:00 2001 From: VK <370725567@qq.com> Date: Tue, 1 Aug 2023 20:37:23 +0800 Subject: [PATCH] update opendb-poi --- collection/opendb-poi/collection.json | 50 ++++++++++++++++++++------- 1 file changed, 38 insertions(+), 12 deletions(-) diff --git a/collection/opendb-poi/collection.json b/collection/opendb-poi/collection.json index 5c6ebdc..83b588e 100644 --- a/collection/opendb-poi/collection.json +++ b/collection/opendb-poi/collection.json @@ -1,7 +1,7 @@ { "schema": { "bsonType": "object", - "required": [], + "required": ["location", "title", "address"], "permission": { "read": "doc.visible == true", "create": false, @@ -13,12 +13,38 @@ "description": "ID,系统自动生成" }, "visible": { + "title": "是否显示", "bsonType": "bool", "description": "为true代表前端clientDB可直接查询 false则clientDB不可以查询" }, + "category": { + "bsonType": "string", + "title": "分类", + "description": "用于区分显示在不同的场景地图下" + }, + "type": { + "bsonType": "string", + "title": "类型", + "description": "POI类型,可根据type自动匹配对应的icon,支持直接输入中文" + }, + "icon": { + "bsonType": "string", + "title": "图标", + "description": "支持https网络路径或本地绝对路径,如果传了icon则不再根据type去匹配icon" + }, + "rotate": { + "bsonType": "number", + "title": "图标角度", + "description": "POI图标的角度,需保证0°的图片方向应朝左(西) 故可得90° 朝上(北) 180° 朝右(东) 270° 朝下(南)" + }, + "level": { + "bsonType": "number", + "title": "图标显示的层级", + "description": "POI图标显示的层级,越高越现在在上面" + }, "location": { - "bsonType": "object", "title": "地理位置", + "bsonType": "object", "description": "地理位置(包含经纬度)" }, "title": { @@ -26,21 +52,16 @@ "title": "名称", "description": "名称" }, - "tel": { - "bsonType": "string", - "title": "电话", - "description": "电话" - }, - "icon": { - "bsonType": "string", - "title": "图标", - "description": "图标" - }, "address": { "bsonType": "string", "title": "地址", "description": "地址" }, + "tel": { + "bsonType": "string", + "title": "电话", + "description": "电话" + }, "province": { "bsonType": "string", "title": "省", @@ -57,6 +78,7 @@ "description": "区/县" }, "create_date": { + "title": "创建时间", "bsonType": "timestamp", "description": "创建时间", "forceDefaultValue": { @@ -81,6 +103,10 @@ { "IndexName": "create_date", "MgoKeySchema": {"MgoIndexKeys": [{"Name": "create_date","Direction": "1"}],"MgoIsUnique": false} + }, + { + "IndexName": "category", + "MgoKeySchema": {"MgoIndexKeys": [{"Name": "category","Direction": "1"}],"MgoIsUnique": false} } ] }