Enterprise - 针对追踪设置自定义要素图层(可选)

适用于 ArcGIS Indoors Maps 扩展模块。

ArcGIS Indoors 支持通过在与门户相关联的时空数据存储中托管的自定义要素图层来共享设备位置。 您可以使用此服务代替位置共享服务。

警告:

该服务仅支持收集设备轨迹(历史位置)。 此设置不支持使用搜索同事及其最近已知位置的功能。

如果您在门户上启用了“位置追踪”要素图层,即使您配置了自定义要素图层,Indoors 移动应用程序也会始终向“位置共享”要素图层报告位置。

设备追踪要素模式

下表描述了追踪要素类的字段和数据类型:

字段名字段别名数据类型描述示例值

活动

活动

esriFieldTypeInteger

设备报告的活动(静止、步行、驾驶等)

0, 1, 2, ...

altitude

高度角

esriFieldTypeDouble

由设备的 GPS 接收器报告的高度值

0.5, 1.0, 5.0

app_id

应用程序 ID

esriFieldTypeString

应用程序名称

ArcGIS Indoors(常量)

background_mode

背景模式

esriFieldTypeSmallInteger

应用程序在设备上运行时的状态(背景或前景)

0,1

battery_percentage

电量百分比

esriFieldTypeDouble

设备报告的电池电量

1–100

battery_state

电池状态

esriFieldTypeInteger

设备报告的电池状态(充电、放电)

1,2

course

路线趋向

esriFieldTypeDouble

相对于正北的航向

0-359

device_id

设备 ID

esriFieldTypeString

运行应用程序的设备的唯一标识符

GUID

device_type

设备类型

esriFieldTypeString

设备的生产商和型号

iPhone 7,Pixel 2

floor

楼层

esriFieldTypeInteger

由室内定位系统报告的垂直顺序

0, 1, 2

horizontal_accuracy

水平精度

esriFieldTypeDouble

经度和纬度值的不确定性半径(以米为单位)

0.5, 1.0, 2.5

latitude

纬度

esriFieldTypeDouble

由设备的 GPS 接收器报告的纬度值

-90 至 90

location_source

位置源

esriFieldTypeString

由 ELSS 报告的室内定位系统信号源

BLE、Wi-Fi、GPS

location_timestamp

位置时间戳

esriFieldTypeDate

位置信息发布时的日期和时间值

2/21/2019, 10:46 PM

longitude

经度

esriFieldTypeDouble

由设备的 GPS 接收器报告的经度值

-180 至 180

session_id

会话 ID

esriFieldTypeString

代表追踪会话的值

追踪单

signal_strength

信号强度

esriFieldTypeDouble

所接收的无线电信号 (RSSI) 的功率

-1, -90

speed

速度

esriFieldTypeDouble

由设备的传感器报告的移动速度

1.0(米/秒)

user_id

用户 ID

esriFieldTypeString

用于登录应用程序的用户名

user_Indoors

vertical_accuracy

垂直精度

esriFieldTypeDouble

高度值的垂直精度

0.0, 0.5, 1.0

创建设备追踪要素图层

必须在门户上设置要素图层,并且必须使用设备追踪模式来创建要素层以存储位置数据。 建议使用时空大数据存储,因为其可以扩展以管理大量追踪数据。

设置时空数据存储

要为您的门户设置时空数据存储,请完成以下步骤:

  1. 安装 ArcGIS Data Store
  2. 创建时空数据存储
    注:

    转至 https://<my big data store>/arcgis/datastore/ 以确认配置状态并确保列出安装过程中指定的 ArcGIS Enterprise 服务器。

创建要素图层

要创建用于设备追踪的要素图层,请完成以下步骤:

  1. 转至 https://<my indoors portal>/portal/sharing/rest/login 并使用主管理员的帐户进行登录。
  2. 访问 https://<my indoors portal>/sharing/rest/content/users/<admin>/createService
  3. 创建参数文本框中提供 JSON 模板,然后单击创建服务
    
    {
      "name" : "DeviceTracking_BDS",
      "editorTrackingInfo": {
        "enableEditorTracking": true,
        "enableOwnershipAccessControl": true,
        "allowOthersToUpdate": false,
        "allowOthersToDelete": false,
        "allowOthersToQuery": false
       },
      "capabilities" : "Create,Delete,Query,Update,Editing",
    options: {"dataSourceType":"spatiotemporal"}
    }
    注:

    创建服务后,请记下服务 URL,并确保其存在。

创建要素图层

要创建用于设备追踪的要素图层,请完成以下步骤:

  1. 访问 https://<my indoors portal>/server/rest/admin/services/Hosted/<name>/FeatureServer/addToDefinition
  2. 输入文本框中提供 JSON 模板,然后单击 addToDefinition
    {
                    "layers": [{
                                    "currentVersion": 10.7,
                                    "cimVersion": "2.3.0",
                                    "id": 0,
                                    "name": "DeviceTracking_BDS",
                                    "type": "Feature Layer",
                                    "parentLayer": null,
                                    "defaultVisibility": true,
                                    "minScale": 0,
                                    "maxScale": 0,
                                    "geometryType": "esriGeometryPoint",
                                    "description": "",
                                    "copyrightText": "",
                                    "editFieldsInfo": {
                                                    "creationDateField": "created_date",
                                                    "creatorField": "created_user",
                                                    "editDateField": "last_edited_date",
                                                    "editorField": "last_edited_user"
                                    },
                                    "syncCanReturnChanges": true,
                                    "relationships": [],
                                    "isDataVersioned": false,
                                    "isDataArchived": false,
                                    "isDataBranchVersioned": false,
                                    "isCoGoEnabled": false,
                                    "supportsRollbackOnFailureParameter": true,
                                    "supportsStatistics": true,
                                    "supportsAdvancedQueries": true,
                                    "supportsValidateSQL": true,
                                    "supportsCoordinatesQuantization": true,
                                    "supportsCalculate": true,
                                    "advancedQueryCapabilities": {
                                                    "supportsReturningQueryExtent": true,
                                                    "supportsStatistics": true,
                                                    "supportsDistinct": true,
                                                    "supportsPagination": true,
                                                    "supportsOrderBy": true,
                                                    "supportsQueryWithDistance": true,
                                                    "supportsLod": false,
                                                    "supportsPaginationOnAggregatedQueries": true,
                                                    "supportsQueryWithResultType": true,
                                                    "supportsCountDistinct": true,
                                                    "supportsReturningGeometryCentroid": false,
                                                    "supportsHavingClause": true,
                                                    "supportsTopFeaturesQuery": false,
                                                    "supportsOrderByOnlyOnLayerFields": true
                                    },
                                    "extent": {
                                                    "xmin": "NaN",
                                                    "ymin": "NaN",
                                                    "xmax": "NaN",
                                                    "ymax": "NaN",
                                                    "spatialReference": {
                                                                    "wkid": 102100,
                                                                    "latestWkid": 3857,
                                                                    "xyTolerance": 0.001,
                                                                    "zTolerance": 0.001,
                                                                    "mTolerance": 0.001,
                                                                    "falseX": -2.204125862706707E7,
                                                                    "falseY": -3.3265068604224768E7,
                                                                    "xyUnits": 1.3538524994349548E8,
                                                                    "falseZ": -100000,
                                                                    "zUnits": 10000,
                                                                    "falseM": -100000,
                                                                    "mUnits": 10000
                                                    }
                                    },
                                    "sourceSpatialReference": {
                                                    "wkid": 102100,
                                                    "latestWkid": 3857,
                                                    "xyTolerance": 0.001,
                                                    "zTolerance": 0.001,
                                                    "mTolerance": 0.001,
                                                    "falseX": -2.20412586270671E7,
                                                    "falseY": -3.32650686042248E7,
                                                    "xyUnits": 1.35385249943495E8,
                                                    "falseZ": -100000,
                                                    "zUnits": 10000,
                                                    "falseM": 0,
                                                    "mUnits": 1
                                    },
                                    "drawingInfo": {
                                                    "renderer": {
                                                                    "type": "simple",
                                                                    "symbol": {
                                                                                    "type": "esriSMS",
                                                                                    "style": "esriSMSCircle",
                                                                                    "color": [
                                                                                                    28,
                                                                                                    130,
                                                                                                    0,
                                                                                                    255
                                                                                    ],
                                                                                    "size": 4,
                                                                                    "angle": 0,
                                                                                    "xoffset": 0,
                                                                                    "yoffset": 0,
                                                                                    "outline": {
                                                                                                    "color": [
                                                                                                                    0,
                                                                                                                    0,
                                                                                                                    0,
                                                                                                                    255
                                                                                                    ],
                                                                                                    "width": 1
                                                                                    }
                                                                    }
                                                    },
                                                    "scaleSymbols": true,
                                                    "transparency": 0,
                                                    "labelingInfo": null
                                    },
                                    "hasM": false,
                                    "hasZ": true,
                                    "supportsVCSProjection": true,
                                    "allowTrueCurvesUpdates": false,
                                    "onlyAllowTrueCurveUpdatesByTrueCurveClients": true,
                                    "hasAttachments": false,
                                    "supportsApplyEditsWithGlobalIds": true,
                                    "htmlPopupType": "esriServerHTMLPopupTypeAsHTMLText",
                                    "objectIdField": "objectid",
                                    "globalIdField": "globalid",
                                    "displayField": "app_id",
                                    "typeIdField": "",
                                    "fields": [{
                                                                    "name": "objectid",
                                                                    "type": "esriFieldTypeOID",
                                                                    "alias": "OBJECTID",
                                                                    "domain": null,
                                                                    "nullable": false,
                                                                    "editable": false,
                                                                    "sqlType": "sqlTypeInteger"
                                                    },
                                                    {
                                                                    "name": "activity",
                                                                    "type": "esriFieldTypeInteger",
                                                                    "alias": "Activity",
                                                                    "domain": null,
                                                                    "editable": true,
                                                                    "nullable": false,
                                                                    "length": 10,
                                                                    "sqlType": "sqlTypeInteger"
                                                    },
                                                    {
                                                                    "name": "altitude",
                                                                    "type": "esriFieldTypeDouble",
                                                                    "alias": "Altitude",
                                                                    "domain": null,
                                                                    "editable": true,
                                                                    "nullable": false,
                                                                    "length": 38,
                                                                    "sqlType": "sqlTypeNumeric"
                                                    },
                                                    {
                                                                    "name": "app_id",
                                                                    "type": "esriFieldTypeString",
                                                                    "alias": "App ID",
                                                                    "domain": null,
                                                                    "editable": true,
                                                                    "nullable": false,
                                                                    "length": 255,
                                                                    "sqlType": "sqlTypeVarchar"
                                                    },
                                                    {
                                                                    "name": "background_mode",
                                                                    "type": "esriFieldTypeSmallInteger",
                                                                    "alias": "Background Mode",
                                                                    "domain": null,
                                                                    "editable": true,
                                                                    "nullable": false,
                                                                    "length": 5,
                                                                    "sqlType": "sqlTypeSmallInt"
                                                    },
                                                    {
                                                                    "name": "battery_percentage",
                                                                    "type": "esriFieldTypeDouble",
                                                                    "alias": "Battery Percentage",
                                                                    "domain": null,
                                                                    "editable": true,
                                                                    "nullable": false,
                                                                    "length": 38,
                                                                    "sqlType": "sqlTypeNumeric"
                                                    },
                                                    {
                                                                    "name": "battery_state",
                                                                    "type": "esriFieldTypeInteger",
                                                                    "alias": "Battery State",
                                                                    "domain": null,
                                                                    "editable": true,
                                                                    "nullable": false,
                                                                    "length": 10,
                                                                    "sqlType": "sqlTypeInteger"
                                                    },
                                                    {
                                                                    "name": "course",
                                                                    "type": "esriFieldTypeDouble",
                                                                    "alias": "Course",
                                                                    "domain": null,
                                                                    "editable": true,
                                                                    "nullable": false,
                                                                    "length": 38,
                                                                    "sqlType": "sqlTypeNumeric"
                                                    },
                                                    {
                                                                    "name": "device_id",
                                                                    "type": "esriFieldTypeString",
                                                                    "alias": "Device ID",
                                                                    "domain": null,
                                                                    "editable": true,
                                                                    "nullable": false,
                                                                    "length": 256,
                                                                    "sqlType": "sqlTypeVarchar"
                                                    },
                                                    {
                                                                    "name": "device_type",
                                                                    "type": "esriFieldTypeString",
                                                                    "alias": "Device Type",
                                                                    "domain": null,
                                                                    "editable": true,
                                                                    "nullable": false,
                                                                    "length": 255,
                                                                    "sqlType": "sqlTypeVarchar"
                                                    },
                                                    {
                                                                    "name": "floor",
                                                                    "type": "esriFieldTypeInteger",
                                                                    "alias": "Floor",
                                                                    "domain": null,
                                                                    "editable": true,
                                                                    "nullable": false,
                                                                    "length": 10,
                                                                    "sqlType": "sqlTypeInteger"
                                                    },
                                                    {
                                                                    "name": "horizontal_accuracy",
                                                                    "type": "esriFieldTypeDouble",
                                                                    "alias": "Horizontal Accuracy",
                                                                    "domain": null,
                                                                    "editable": true,
                                                                    "nullable": false,
                                                                    "length": 38,
                                                                    "sqlType": "sqlTypeNumeric"
                                                    },
                                                    {
                                                                    "name": "latitude",
                                                                    "type": "esriFieldTypeDouble",
                                                                    "alias": "Latitude",
                                                                    "domain": null,
                                                                    "editable": true,
                                                                    "nullable": false,
                                                                    "length": 38,
                                                                    "sqlType": "sqlTypeNumeric"
                                                    },
                                                    {
                                                                    "name": "location_source",
                                                                    "type": "esriFieldTypeString",
                                                                    "alias": "Location Source",
                                                                    "domain": null,
                                                                    "editable": true,
                                                                    "nullable": false,
                                                                    "length": 256,
                                                                    "sqlType": "sqlTypeVarchar"
                                                    },
                                                    {
                                                                    "name": "location_timestamp",
                                                                    "type": "esriFieldTypeDate",
                                                                    "alias": "Location Timestamp",
                                                                    "domain": null,
                                                                    "editable": true,
                                                                    "nullable": false,
                                                                    "length": 29,
                                                                    "sqlType": "sqlTypeTimestamp"
                                                    },
                                                    {
                                                                    "name": "longitude",
                                                                    "type": "esriFieldTypeDouble",
                                                                    "alias": "Longitude",
                                                                    "domain": null,
                                                                    "editable": true,
                                                                    "nullable": false,
                                                                    "length": 38,
                                                                    "sqlType": "sqlTypeNumeric"
                                                    },
                                                    {
                                                                    "name": "signal_strength",
                                                                    "type": "esriFieldTypeDouble",
                                                                    "alias": "Signal Strength",
                                                                    "domain": null,
                                                                    "editable": true,
                                                                    "nullable": false,
                                                                    "length": 38,
                                                                    "sqlType": "sqlTypeNumeric"
                                                    },
                                                    {
                                                                    "name": "session_id",
                                                                    "type": "esriFieldTypeString",
                                                                    "alias": "Session ID",
                                                                    "domain": null,
                                                                    "editable": true,
                                                                    "nullable": false,
                                                                    "length": 256,
                                                                    "sqlType": "sqlTypeVarchar"
                                                    },
                                                    {
                                                                    "name": "speed",
                                                                    "type": "esriFieldTypeDouble",
                                                                    "alias": "Speed",
                                                                    "domain": null,
                                                                    "editable": true,
                                                                    "nullable": false,
                                                                    "length": 38,
                                                                    "sqlType": "sqlTypeNumeric"
                                                    },
                                                    {
                                                                    "name": "user_id",
                                                                    "type": "esriFieldTypeString",
                                                                    "alias": "User ID",
                                                                    "domain": null,
                                                                    "editable": true,
                                                                    "nullable": false,
                                                                    "length": 256,
                                                                    "sqlType": "sqlTypeVarchar"
                                                    },
                                                    {
                                                                    "name": "vertical_accuracy",
                                                                    "type": "esriFieldTypeDouble",
                                                                    "alias": "Vertical Accuracy",
                                                                    "domain": null,
                                                                    "editable": true,
                                                                    "nullable": false,
                                                                    "length": 38,
                                                                    "sqlType": "sqlTypeNumeric"
                                                    },
                                                    {
                                                                    "name": "globalid",
                                                                    "type": "esriFieldTypeGlobalID",
                                                                    "alias": "GlobalID",
                                                                    "domain": null,
                                                                    "editable": false,
                                                                    "nullable": false,
                                                                    "length": 38,
                                                                    "sqlType": "sqlTypeVarchar"
                                                    },
                                                    {
                                                                    "alias": "created_user",
                                                                    "name": "created_user",
                                                                    "length": 255,
                                                                    "domain": null,
                                                                    "nullable": true,
                                                                    "type": "esriFieldTypeString",
                                                                    "editable": false,
                                                                    "sqlType": "sqlTypeVarchar"
                                                    },
                                                    {
                                                                    "alias": "created_date",
                                                                    "name": "created_date",
                                                                    "length": 29,
                                                                    "domain": null,
                                                                    "nullable": true,
                                                                    "type": "esriFieldTypeDate",
                                                                    "editable": false,
                                                                    "sqlType": "sqlTypeTimestamp"
                                                    },
                                                    {
                                                                    "alias": "last_edited_user",
                                                                    "name": "last_edited_user",
                                                                    "length": 255,
                                                                    "domain": null,
                                                                    "nullable": true,
                                                                    "type": "esriFieldTypeString",
                                                                    "editable": false,
                                                                    "sqlType": "sqlTypeVarchar"
                                                    },
                                                    {
                                                                    "alias": "last_edited_date",
                                                                    "name": "last_edited_date",
                                                                    "length": 29,
                                                                    "domain": null,
                                                                    "nullable": true,
                                                                    "type": "esriFieldTypeDate",
                                                                    "editable": false,
                                                                    "sqlType": "sqlTypeTimestamp"
                                                    }
                                    ],
                                    "geometryField": {
                                                    "name": "shape",
                                                    "type": "esriFieldTypeGeometry",
                                                    "alias": "Shape",
                                                    "domain": null,
                                                    "editable": true,
                                                    "nullable": true,
                                                    "defaultValue": null,
                                                    "modelName": "Shape"
                                    },
                                    "indexes": [{
                                                                    "name": "r59_sde_rowid_uk",
                                                                    "fields": "OBJECTID",
                                                                    "isAscending": true,
                                                                    "isUnique": true,
                                                                    "description": ""
                                                    },
                                                    {
                                                                    "name": "uuid_59",
                                                                    "fields": "GlobalID",
                                                                    "isAscending": true,
                                                                    "isUnique": true,
                                                                    "description": ""
                                                    },
                                                    {
                                                                    "name": "a32_ix1",
                                                                    "fields": "Shape",
                                                                    "isAscending": true,
                                                                    "isUnique": true,
                                                                    "description": ""
                                                    }
                                    ],
                                    "dateFieldsTimeReference": {
                                                    "timeZone": "UTC",
                                                    "respectsDaylightSaving": false
                                    },
                                    "types": [],
                                    "templates": [{
                                                    "name": "DeviceTracking",
                                                    "description": "",
                                                    "prototype": {
                                                                    "attributes": {
                                                                                    "vertical_accuracy": 0,
                                                                                    "user_id": " ",
                                                                                    "activity": 0,
                                                                                    "altitude": 0,
                                                                                    "app_id": " ",
                                                                                    "background_mode": 0,
                                                                                    "battery_percentage": 0,
                                                                                    "battery_state": 0,
                                                                                    "course": 0,
                                                                                    "device_id": " ",
                                                                                    "device_type": " ",
                                                                                    "floor": 0,
                                                                                    "horizontal_accuracy": 0,
                                                                                    "latitude": 0,
                                                                                    "location_source": " ",
                                                                                    "location_timestamp": -2209161600000,
                                                                                    "longitude": 0,
                                                                                    "signal_strength": 0,
                                                                                    "session_id": " ",
                                                                                    "speed": 0
                                                                    }
                                                    },
                                                    "drawingTool": "esriFeatureEditToolPoint"
                                    }],
                                    "useStandardizedQueries": true,
                                    "standardMaxRecordCount": 32000,
                                    "tileMaxRecordCount": 8000,
                                    "maxRecordCountFactor": 1,
                                    "supportedQueryFormats": "JSON, geoJSON",
                                    "maxRecordCount": 2000,
                                    "allowGeometryUpdates": true,
                                    "hasMetadata": true,
                                    "supportsAttachmentsByUploadId": true,
                                    "hasStaticData": false,
                                    "supportsAsyncDelete": true
                    }]
    }
  3. 该过程成功完成后,请转至 https://<my indoors portal>/portal/home/content 并确保此项目存在。

配置安全性设置

根据组织的安全性需求在设备追踪要素图层上配置安全性设置。

要配置安全性设置,请完成以下步骤:

  1. 在您的门户中,单击设置选项卡。
  2. 要素图层部分的编辑子部分中,选中启用编辑复选框。
  3. 或者,也可选中追踪创建和更新的要素复选框。
  4. 根据您组织的存储策略和安全性需求,在允许的编辑类型部分中选择以下选项之一:
    • 添加并更新要素
    • 添加、更新和删除要素
    注:

    不支持添加要素选项。

  5. 如果选中了追踪创建和更新的要素复选框,请为编辑者可以查看的要素编辑者可以编辑的要素部分选择选项:
    • 编辑者可查看所有要素
    • 编辑者只能查看自己的要素
    • 编辑者看不到任何要素,即使是他们添加的要素

    建议对这些部分保留编辑者只能查看自己的要素编辑者只能编辑自己的要素的默认选择。

    了解有关管理编辑器设置编辑者追踪的更多信息。

  6. 单击保存

配置共享设置

要通过共享要素图层添加位置信息,请完成以下步骤:

  1. 单击概览选项卡,然后单击共享

    随即显示共享对话框。

  2. 与组织门户成员或群组共享。
    提示:

    概览页面的 URL 设置Config Value为 Indoors 配置表中的 DEVICE_MONITOR_ENDPOINT_FEATURESERVICE 字段。您可以在 Web 地图中查看设备追踪点。

准备地图以进行设备追踪

您的组织使用的移动地图包必须更新以激活移动应用程序的设备追踪要素。

了解有关创建追踪区域以进行设备追踪配置设备位置共享设置的详细信息。

查看设备追踪数据

要创建 web 地图以查看追踪数据并与组织成员共享,请完成以下步骤:

  1. 在您的门户中,单击内容,然后单击我的内容选项卡。
  2. 单击创建 > 地图
  3. 选择新创建的地图,然后单击在 Map Viewer 中打开
  4. 单击添加,然后添加设备追踪要素图层。
  5. 放大到您的站点,然后单击保存
  6. 单击共享,然后选择您要与之共享地图的成员。
  7. 单击完成

创建仪表盘

仪表盘是设备位置共享数据的视图,可用于监控事件或活动。 仪表盘可配合单个屏幕显示多个可视化内容。 仪表盘可以提供全面的数据视图,进而提供数据管理所需的洞察力。 您可以创建仪表盘来帮助监控设备位置共享数据。

相关主题