【问题标题】:OpenLayers: wrapDateLine not working, no error in JS consoleOpenLayers:wrapDateLine 不起作用,JS 控制台中没有错误
【发布时间】:2013-06-18 15:29:35
【问题描述】:

应该够简单,不知道我的代码有什么问题:

var layer1 = new OpenLayers.Layer.MapServer("CustomerAirports", "http://192.168.2.164/cgi-  
bin/mapserv.exe", {map: '/data2/html/customer_airport.map', layers: ['CustomerAirports']}, 
{singleTile: true}, {wrapDateLine: true});

根据我读到的内容,这应该可以工作,不是吗?就像我说的那样,控制台中没有错误。

感谢任何输入。

Edit1:刚刚切换了 singleTile 和 wrapDateLine 的顺序,似乎可以解决问题。

还可以将 singleTile 和 wrapDateLine 放在一对 { } 中,而不是单独的。

【问题讨论】:

    标签: javascript openlayers mapserver map-files


    【解决方案1】:

    不要对 singleTile 和 wrapDateLine 使用单独的 { },而是这样做

    {singleTile: true, wrapDateLine: true}
    

    但是,我不确定在使用 wrapDateLine 时 singleTile 是否最好:事情似乎变得非常缓慢。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-08-17
      • 2016-04-25
      • 1970-01-01
      • 2013-05-22
      • 1970-01-01
      • 1970-01-01
      • 2016-05-07
      • 1970-01-01
      相关资源
      最近更新 更多