ol3修改右下键的Attribution
如下图,想把logo和版权声明等修改成自己的
版权声明部分是在加载数据源时修改,直接上代码
layer = new ol.layer.Tile({ source: new ol.source.OSM({ attributions: [ new ol.Attribution({ html:"我的地图@Marost" })] }) });
增加logo的代码:
var mylogo = { src: "./images/map.png", href: "http://localhost" }; map = new ol.Map({ target: 'map', layers: [layer], interactions: interactions, controls: controls, overlays: [overlay], logo: mylogo, view: view });
最终效果图: