【问题标题】:Openlayer with OpenStreetMap(OSM) as a base Layer以 OpenStreetMap(OSM) 作为基础层的 Openlayer
【发布时间】:2012-06-28 22:20:14
【问题描述】:

将来自我的 Minesotta 地图服务器的 OpenLayer 作为基础层放在 OSM 层 上时遇到问题。

当我使用谷歌地图作为基础层时,它工作得很好!.

所以有可能作为基础层的osm和作为覆盖层的OpenLayer工作。或者这种组合是可能的或不是

【问题讨论】:

  • OpenLayers 是用于可视化地图数据的 JavaScript 库。它不能来自 MapServer。

标签: openlayers openstreetmap mapserver


【解决方案1】:

如果我很好理解您的问题...您需要设置 allOverlays: true link1, link2

var options = {
    projection: mercator, //EPSG:3785/900913
    displayProjection: geographic, //EPSG:4326
    theme: null,
    maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34, 20037508.34, 20037508.34),
    maxResolution: 156543.0339,
    units: 'm',
    controls: [],
    numZoomLevels: MAX_ZOOM_LEVEL,
    allOverlays: true
};
OpenLayers.Util.DEFAULT_PRECISION = 18;

mp = new OpenLayers.Map('map', options);

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-06-06
    • 2020-12-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-06-02
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多