访问不同的 Bing 地图图层
API 是否有一部分用于访问不同的地图图层数据,例如人口热图、县边界或邮政编码线?
我知道这主要是由像 ESRI/ArcServer 这样的人处理的,但我很好奇是否有某种方法可以在电话平台上获取类似的信息。
在这一点上,我看到它的唯一方法是拥有一个巨大的数据集,解析它,然后自己绘制多边形。这在电话上听起来非常耗时。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
可悲的是谷歌、必应地图等。除了预定义的道路、卫星样式等之外,不要公开对其数据集的访问。正如 tghamm 所建议的,在移动设备上获得高性能解决方案的最佳选择不是绘制动态多边形,而是预渲染您自己的多边形用于要显示数据的区域/缩放级别的栅格图块集,并将其显示为地图控件顶部的自定义图块图层。
创建此类图块集的一个很好的工具链是:
1.) 使用 SQL Server Express(或 PostGIS,如果您愿意)作为后端空间数据库 - http://www.microsoft.com/express/sql/ ($0)
2.) 以 shapefile 格式获取必要的数据 - http://www.diva-gis.org/Data ($0)
3.) 将 shapefile 数据加载到 SQL Server - http://www.sharpgis.net/page/shape2sql.aspx ($0)
4.) 编写一个查询以从 SQL Server 检索必要的信息(或检索它直接来自 shapefile)并使用 Mapnik 将其渲染为图块 - http://www.mapnik.org ($0)
总计成本,0 美元。
另外,请务必查看开放街道地图 - http://osm.org,它提供对整个数据库的访问您可以自己下载并渲染 - 在世界许多地区(尽管不是全部),它在数据的质量和完整性方面都击败了谷歌和微软。
Sadly Google, Bing Maps et al. don't expose access to their datasets in anything other than the pre-defined road, satellite styles etc. As tghamm suggests, your best bet for a performant solution on a mobile device is not to draw dynamic polygons, but pre-render your own raster tilesets for the area/zoom levels at which you want to display the data and display these as a custom tile layer ontop of the map control.
A good toolchain for creating such a tileset is:
1.) Use SQL Server Express (or PostGIS, if you prefer) as backend spatial DB - http://www.microsoft.com/express/sql/ ($0)
2.) Get necessary data in shapefile format - http://www.diva-gis.org/Data ($0)
3.) Load the shapefile data into SQL Server - http://www.sharpgis.net/page/shape2sql.aspx ($0)
4.) Write a query to retrieve the necessary information from SQL Server (or retrieve it directly from shapefile) and render it to tiles using Mapnik - http://www.mapnik.org ($0)
Total cost, $0.
Also, be sure to check out open street map - http://osm.org, which provide access to their entire database that you can download and render yourself - in many areas of the world (although not all) it beats both Google and Microsoft in quality and completeness of its data.
通常,这些数据是通过使用切片服务器来传递的,其中几何图形在服务器上渲染,然后切割成切片,以便客户端仅负责使用栅格数据。有很多地方可以获取优质图像:
http://www.census.gov/geo/www /老虎/
这是了解美国基本地缘政治形态的良好起点。
从那里,有一些第三方库能够帮助您直接使用这些 SHP 文件,例如 http://www. thinkgeo.com/。
或者,有些人选择将 shp 文件的内容上传到支持空间类型的数据库结构中。我使用过 Sql Server 2008,一些 .Net 库对它进行了补充,以促进形状处理和渲染操作。
最后,可能有大量开放式切片服务器具有有用的数据层,您只需要了解要使用的切片模式,例如 WMS。
Often this data is delivered through use of a tile server, where the geometries are rendered on a server and then cut into tiles so that the client is only responsible for consuming the raster data. There's plenty of places to get good imagery:
http://www.census.gov/geo/www/tiger/
This is a good starting point for your basic geo-political shapes in the US.
From there, there are third party libraries capable of assisting you with consumption of those SHP files directly, such as http://www.thinkgeo.com/.
Alternatively, some people choose to upload the contents of the shp file into a db structure that supports spatial types. I've used Sql Server 2008, which is complimented by some .Net libraries to facilitate shape handling and manipulation for rendering.
Finally, there are likely a good number of open tile servers out there with useful data layers that you need only understand the tiling pattern to consume, e.g. WMS.