用于提供静态地图图像(即 png、jpg 等)的官方 ESRI 解决方案是什么?

发布于 2024-10-30 22:10:52 字数 671 浏览 6 评论 0原文

我需要编写一个返回单个静态地图图像(png、jpg 等)的地图服务。在过去(即在 Google 地图兴起之前),这是 ArcIMS 等服务器软件的默认工作方式。现在,这些包默认提供平铺地图服务,这在大多数情况下通常是合适的解决方案。然而,在本例中,我的要求是返回可以通过 URL 访问的单个图像。

我知道 Google 地图解决方案是他们的静态地图 API。如果您正在创建一个简单的地图,那么这很好用,但我的地图将具有多边形和点叠加,并且可能会在 1024 字符 URL 的范围内添加标记和编码多边形。

我可以访问 ArcGIS Server,并且可以创建包含上述数据的地图服务,但我无法确定让服务返回单个图像的最佳方法是什么。我在 ESRI 在线帮助中发现的唯一内容是能够向地图服务添加 OGC Web 地图服务 (WMS) 功能。您可以以图像形式请求地图,但这对我来说似乎有点像黑客。

有谁知道是否有更好/更官方的方法?

I need to write a map service that returns a single, static map image (png, jpg, etc). In the old days (i.e. before Google Maps took off) this was the default way that server software like ArcIMS worked. Now, those packages default serving tiled map services, which usually are the appropriate solution in most cases. However, in this case, my requirements are to return a single image that can be accessed by a URL.

I know that the Google Maps solution is their static map API. This works fine if you are creating a simple map, but my map will have polygon and point overlays, and probably to add as markers and encoded polygons w/in the confines of a 1024 char URL.

I have access to ArcGIS Server, and can create a map service that includes the above data, but I can't tell what is the best way to get the service to return a single image. The only thing I found in the ESRI online help was the ability to add OGC Web Map Service (WMS) capabilities to a map service. You can the request the map as an image, but this seems like a bit of a hack to me.

Does anyone know if there is a better/more official way?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

椵侞 2024-11-06 22:10:52

如果我正确理解您想要执行的操作,您可以利用 ArcGIS Server RESI API 来执行此操作。使用 REST API,您可以从 ArcGIS Server 地图服务请求单个图像,并指定边界框、图像大小、图像文件类型和许多其他参数 - 然后您将获得该图像的单个图像大小、类型等。

地图服务可能是您在 ArcGIS Server(9.3 或更高版本)上发布的服务。该服务可以是缓存的或动态的。您还可以利用 ArcGIS Online 服务,甚至只是为了感受一下。例如,转到以下 URL:

http://server.arcgisonline.com /ArcGIS/rest/services/World_Street_Map/MapServer

在页面底部的“支持的操作”下,转到导出地图。在“图像大小”文本框中输入大小(例如:1200,1200)以及任何其他参数,然后单击“导出图像”。

您可以通过查看请求的结果 URL 来了解实际的 URL 参数。您可以在此处获取有关参数的信息(例如,导出操作):
http://help.arcgis.com/en/arcgisserver/10.0 /apis/rest/export.html

现在您提到创建一个 Web 服务,因此要以编程方式执行此操作,您可以直接使用 REST API。或者您可能希望创建自己的服务作为这些 REST API 调用的包装器。

希望这有帮助,并且我正确理解了你的问题。

If I understand what you want to do correctly, you can leverage the ArcGIS Server RESI API to do this. Using the REST API you can request a single image from an ArcGIS Server map service, and specify the bounding box, image size, image file type and numerous other parameters - and you get back a single image of that size, type etc.

The map service could be one that you have published on your ArcGIS Server (9.3 or higher). The service can be cached or dynamic. You can also utilize ArcGIS Online services, even to just to get a feel for this. So for example, go to the following URL:

http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer

And under "Supported Operations" at the bottom of the page, go to Export Map. Enter a size in the "Image Size" text box (for example: 1200,1200) along with any other parameters and click "Export Image".

You can get a feel for the acutal URL arguments by looking at the resulting URL for your request. You can get information about the parameters here (for example, for Export operation):
http://help.arcgis.com/en/arcgisserver/10.0/apis/rest/export.html

Now you mentioned creating a web service, so to do this programmatically you may be able to just hit the REST API directly. Or perhaps you'll want to create your own service as a wrapper around these REST API calls.

Hope this helps and I understood your question correctly.

不语却知心 2024-11-06 22:10:52

我刚刚创建了:

  1. 一个自定义类来让您执行此操作,您可以在这里查看:
    https://github.com/esri-es/Static-Maps-API-ArcGIS
  2. 一个 NodeJS 脚本,其工作方式类似于 Google Static Maps API:
    https://github.com/esri-es/Static-Map-Service-ArcGIS干杯


劳尔

I have just created:

  1. A custom class to let you do that, you can take a look here:
    https://github.com/esri-es/Static-Maps-API-ArcGIS
  2. A NodeJS script that works like Google Static Maps API:
    https://github.com/esri-es/Static-Map-Service-ArcGIS

Cheers,
Raúl

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文