Reworked attribution handling

This commit is contained in:
Tim Schaub
2017-10-08 14:40:40 -06:00
parent a5a0f5b98b
commit 2dd8fdb5b7
32 changed files with 346 additions and 391 deletions

View File

@@ -1,4 +1,3 @@
goog.require('ol.Attribution');
goog.require('ol.Map');
goog.require('ol.View');
goog.require('ol.control');
@@ -50,11 +49,9 @@ var ign_source = new ol.source.WMTS({
projection: 'EPSG:3857',
tileGrid: tileGrid,
style: 'normal',
attributions: [new ol.Attribution({
html: '<a href="http://www.geoportail.fr/" target="_blank">' +
attributions: '<a href="http://www.geoportail.fr/" target="_blank">' +
'<img src="https://api.ign.fr/geoportail/api/js/latest/' +
'theme/geoportal/img/logo_gp.gif"></a>'
})]
});
var ign = new ol.layer.Tile({

View File

@@ -1,14 +1,9 @@
goog.require('ol.Attribution');
goog.require('ol.Map');
goog.require('ol.View');
goog.require('ol.layer.Tile');
goog.require('ol.proj');
goog.require('ol.source.XYZ');
var attribution = new ol.Attribution({
html: 'Copyright:© 2013 ESRI, i-cubed, GeoEye'
});
var projection = ol.proj.get('EPSG:4326');
// The tile size supported by the ArcGIS tile service.
@@ -22,7 +17,7 @@ var map = new ol.Map({
layers: [
new ol.layer.Tile({
source: new ol.source.XYZ({
attributions: [attribution],
attributions: 'Copyright:© 2013 ESRI, i-cubed, GeoEye',
maxZoom: 16,
projection: projection,
tileSize: tileSize,

View File

@@ -1,4 +1,3 @@
goog.require('ol.Attribution');
goog.require('ol.Map');
goog.require('ol.View');
goog.require('ol.layer.Tile');
@@ -6,17 +5,13 @@ goog.require('ol.proj');
goog.require('ol.source.XYZ');
var attribution = new ol.Attribution({
html: 'Tiles © <a href="https://services.arcgisonline.com/ArcGIS/' +
'rest/services/World_Topo_Map/MapServer">ArcGIS</a>'
});
var map = new ol.Map({
target: 'map',
layers: [
new ol.layer.Tile({
source: new ol.source.XYZ({
attributions: [attribution],
attributions: 'Tiles © <a href="https://services.arcgisonline.com/ArcGIS/' +
'rest/services/World_Topo_Map/MapServer">ArcGIS</a>',
url: 'https://server.arcgisonline.com/ArcGIS/rest/services/' +
'World_Topo_Map/MapServer/tile/{z}/{y}/{x}'
})