【问题标题】:OpenLayers 3: logo position and styleOpenLayers 3:标志位置和样式
【发布时间】:2014-11-21 07:38:47
【问题描述】:

如果我在地图上添加徽标

var map = new ol.Map({
  view: new ol.View({
    center: [0, 0],
    zoom: 1
  }),
  layers: [
    new ol.layer.Tile({
      source: new ol.source.MapQuest({layer: 'osm'})
    })
  ],
  target: 'map',
  logo: true
});

如何将徽标的位置更改为左上角并更改其大小?

【问题讨论】:

    标签: css openlayers openlayers-3


    【解决方案1】:

    我从未尝试过,但 according to the documentation 你可以传递 logo options 而不是布尔值。

    在徽标选项中,有一些属性,如偏移、样式、位置...应该有助于实现您的要求。

    选项是使用 JavaScript 对象创建的,因此以逗号分隔的键/值对 { style : ..., offset: ...}

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-12-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多