javascript - 使用 Bing SDS 进行地理围栏

标签 javascript azure geocoding bing-maps geofencing

有人知道如何使用 Bing 空间数据服务创建地理围栏吗?

我正在尝试遵循此tutorial但该文档对于如何设置地理围栏的步骤并没有真正的帮助。

谢谢!

最佳答案

为了插入和设置地理围栏,您必须使用 Bing map 空间数据服务的数据源管理功能创建自己的数据源。

参见:https://msdn.microsoft.com/en-us/library/gg585132.aspx

通过代码执行:

将添加远程内容(存储在 Azure 上)的示例 uri 如下所示:

http://spatial.virtualearth.net/REST/v1/Dataflows/LoadDataSource?loadOperation=complete&dataLocation=http://myAzureAccount.blob.core.windows.net/myEntityData&input=xml&o=xml&key=masterKey&queryKey=queryKey

通过 Bing map 帐户中心执行此操作:

To upload the file that contains your data schema and entity data, follow these steps. Sign in to the Bing Maps Account Center with your Bing Maps Account. If you do not have a Bing Maps Account, see Creating a Bing Maps Account.

In the Bing Maps Account Center, select the Upload data to a data source under Data Sources.

Provide the following information

Data source name: The name of the data source where you want to publish the data. If a data source with this name does not exist, it will be created when you publish the data. For data source name requirements, see the preceding Data Source Name Requirements section.

Master key: Select the Bing Maps Key to use for the data source.

If you are creating a new data source, select the Bing Maps Key that you want to use to manage the data source.

If you are updating a data source with new data, you must use the master key that you specified when you created the data source. To view a list of master and query keys for data sources, click the View data source information link under Data Sources on the Bing Maps Account Center.

Query key [new data sources only]: If you are creating a new data source, you can select a Bing Maps Key to use to query the data source. The query key must be a different Bing Maps Key than the master key.

Data file type: Select the type of input file you want to upload.

Data file : Browse to the file that contains the data (schema and entity data) that you want to publish. You can format your data by using XML, CSV (comma-separated value), TAB (tab-delimited) or PIPE (pipe-delimited) formats. The file extensions expected for each file type are:

.xml :XML

.csv :comma-separated value

.txt :pipe-delimited

.txt :tab-delimited

Publish without geocoding: Select this option if you want to upload and publish your data to a data source in one step without geocoding the entity location data.

Set data source access to public or private: When you choose to publish without geocoding, you have the option to make the data source public or private. A public data source can be queried by anyone with a Bing Maps Key and the query URL. If you are updating an existing URL, make sure you choose the correct access setting because it overrides the existing setting.

After a data source is published, you can change the data source access at any time from the Manage my data sources page.

Click Submit to start the upload.

有关上传和发布您自己的数据源的可能性的更多信息可以在此处找到: https://msdn.microsoft.com/en-us/library/gg650600

关于javascript - 使用 Bing SDS 进行地理围栏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28205905/

相关文章:

javascript - TypeORM queryBuilder 中的可选参数

javascript - 在已编译的 GWT 代码中实例化对象

PHP - 如何在 MySql 中使用 GeoLite2 IP CSV 数据库?

ruby-on-rails - 使用地址城市和州的 Rails 地理编码

xml - 如何在经典 ASP 中使用地理编码 API v3

javascript - 为什么控制台消息显示多次?

javascript - 使用angularjs分页,所有页面显示相同的数据

python - 在 Azure 上运行 .exe

azure - 如何在 Terraform 中插入 COUNT?

Azure Web应用程序出站端口