【问题标题】:OpenLayers GeoJson reprojectionOpenLayers GeoJson 重投影
【发布时间】:2016-12-28 12:55:11
【问题描述】:

我用 GeoJson
的重投影热堆栈 我有 GeoJson 对象通过 ajax 从服务器加载
对象的 CRS 设置为 EPSG:2180
我想将它覆盖在具有 CRS EPSG:3857

OpenStreet Map
var buildingsFeatures = (new ol.format.GeoJSON()).readFeatures($buildings, {
        dataProjection: 'EPSG:2180',
        featureProjection: 'EPSG:3857'
    });

$buildingGeoJson FeatureCollection 对象,以上代码符合 OpenLayers 文档,但坐标未更改。

我碰壁了:(

【问题讨论】:

    标签: openlayers-3 geojson projection


    【解决方案1】:

    如何使它工作:

    proj4.defs([ [ 'EPSG:2180', '+proj=tmerc +lat_0=0 +lon_0=19 +k=0.9993 +x_0=500000 +y_0=-5300000 +ellps=GRS80 +units=m +no_defs' ] ]);

    仅此而已。

    【讨论】:

      猜你喜欢
      • 2012-08-03
      • 2021-06-29
      • 1970-01-01
      • 1970-01-01
      • 2019-06-09
      • 1970-01-01
      • 1970-01-01
      • 2015-12-26
      相关资源
      最近更新 更多