- xml - AJAX/Jquery XML 解析
- 具有多重继承的 XML 模式
- .net - 枚举序列化 Json 与 XML
- XML 简单类型、简单内容、复杂类型、复杂内容
我正在尝试在 Leaflet map 中显示 GeoJSON MultiPolygon 对象。我从 PostgreSQL 数据库中以 JSON 格式获取它,然后将其转换为 GeoJSON。
我已经在 GeoJSONLint 中验证了 de MultiPolygon 对象没关系:
但我无法在我的应用程序中完成此操作 =(
这是我的代码:
$http.get(URI_SERVICE+"buscar-clase/"+JSON.stringify(params))
.success(function (data) {
console.log(L.multiPolygon(data.coordinates).toGeoJSON());
adaLayer.clearLayers();
adaLayer = L.geoJson(L.multiPolygon(data.coordinates).toGeoJSON(), {
style: function () {
return {weight: 1, color: "#000000"}
}
});
adaLayer.addTo(map);
}).error(function (err) {
console.log(err);
});
郑重声明,map var 工作正常,我打印了 GeoJSON 的其他层。
最佳答案
为 L.geoJSON
提供整个有效载荷,而不仅仅是坐标数组。喜欢
adaLayer = L.geoJson(data, {
style: function () {
return {weight: 1, color: "#000000"}
}
});
关于javascript - 如何在 Leaflet map 上打印/显示/绘制 MultiPolygon GeoJSON,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30309762/
我有 2 个相交的 OGR 多边形,因此我想将它们级联并联。我尝试了这个,但它返回给我空并且不合并它。似乎这仅适用于多边形,不适用于多重多边形。最好的方法是什么? >>geom = ogr.Geome
从包含相当多(大约 20000)个可能部分重叠的多边形的 shapefile 开始,我需要提取所有通过与不同“边界”相交而产生的子多边形。 在实践中,从一些模型数据开始: library(tibble
我尝试在我的 postgre 数据库中添加 MultiPolygon 几何图形,因此我使用了以下 SQL 语句: 'INSERT INTO potentiel_foncier_ccry (nature
我正在尝试将我的 polygon 列类型更改为 multipolygon 列类型。 我的代码很简单。 change_column :messages, :area_shape, :multipolyg
我正在读取一组包含大量 multypoligons 的数据。我正在使用 Geotools,我想将此列表存储在 mysql 数据库表中。 我不知道如何以有效的方式存储形状并能够重新创建多多边形对象。 如
OpenLayers 3.10.1 中的默认标签标记 MultiPolygon 的每个部分。我想知道是否可以只标记 MultiPolygon 中的第一个多边形。 最佳答案 您可以为带有 geometr
我正在使用geotools库来提取位置信息。这样我就得到了一个类型的对象 class com.vividsolutions.jts.geom.MultiPolygon 我现在想通过 jdbc 连接将此
我正在使用geotools库来提取位置信息。这样我就得到了一个类型的对象 class com.vividsolutions.jts.geom.MultiPolygon 我现在想通过 jdbc 连接将此
我将 leaflet.js 与 postgis (postgres) 一起使用。我想将多面体转换为几何图形以存储在数据库中。但是我收到了这个错误: An error occurred when exe
我有一个表 Town,其列 TownBoundary 包含相关城镇的多边形(geography 数据类型)。 对于每个城镇,我都会获得生成 KML(XML) 文件所需的多边形数据,例如: sqlg =
我有一个世界国家数据集,想在本初子午线上拆分它,并将数据重新集中在太平洋上。 我正在尝试使用简单功能 (sf) 来执行此操作,但遇到了一个我无法解决的对象类型问题。 为了拆分数据,我尝试了以下操作:
我有一个由大约 100 个条目(多多边形几何图形)组成的 cartoDB 数据集,我使用 cartodb.js API 检索该数据集。单击区域时更改给定条目(倍数)的不透明度的最佳方法(性能方面)是什
所以这是我第一次做一个涉及 map 和图层的项目, map 上有很多点和很多多边形。 我倾向于为点和多边形创建单独的表,然后在它们与图层表之间创建多对多关系。如果这样做,我最终会得到 5 个表:poi
我有以下MultiPolygon: MULTIPOLYGON ( ( (10.8849956 49.8901705, 10.8849507 49.8902499, 10.884969 49.89025
我需要将PostgreSQL的几何(MultiPolygon)类型变量存储到java变量中这是因为我尝试将几何列添加到非空间表以使用 map 服务器查询 map 我试图将它存储在一个字符串中,这导致了
我正在从 Trimble 导入一些 OSM 数据到 PostGIS 数据库中,将其作为 Django 应用程序的一部分进行处理。这适用于点和线,但我正在努力处理多边形。 导入似乎工作正常: shp2p
有没有人用PHP解析过MySql中的Polygon/Multipolygon几何数据?我是 MySQL 空间函数的新手。请帮我从 MySQL 中的多面体中获取经纬度点。 我有一个表格,其中有一个类型为
我有两个 GeoDataFrame。一个是爱荷华州,另一个是北美 future 72 小时内预料到的降雨。我想创建一个覆盖爱荷华州的降雨预报的 GeoDataFrame。但是我得到一个错误。 stat
我正在从不同来源收集位置信息并将所有内容存储在 MongoDb 集合中。除了具有单一纬度/经度坐标的点位置外,我还存储区域。 现在,一个数据给我的位置信息为 GeometryCollection,但所
如何在 NodeJs sequelize 中创建具有多多边形数据类型的表字段? myfield: { type: ?????, allowNull: true } MySQL表结构是-
我是一名优秀的程序员,十分优秀!