Merge pull request #4667 from klokantech/mapquest-opaque-fix

Fix rendering of transparent MapQuest layer type
This commit is contained in:
Petr Sloup
2016-01-13 07:01:30 +01:00
+5 -2
View File
@@ -40,7 +40,7 @@ ol.source.MapQuest = function(opt_options) {
logo: 'https://developer.mapquest.com/content/osm/mq_logo.png', logo: 'https://developer.mapquest.com/content/osm/mq_logo.png',
maxZoom: layerConfig.maxZoom, maxZoom: layerConfig.maxZoom,
reprojectionErrorThreshold: options.reprojectionErrorThreshold, reprojectionErrorThreshold: options.reprojectionErrorThreshold,
opaque: true, opaque: layerConfig.opaque,
tileLoadFunction: options.tileLoadFunction, tileLoadFunction: options.tileLoadFunction,
url: url url: url
}); });
@@ -59,11 +59,12 @@ ol.source.MapQuest.TILE_ATTRIBUTION = new ol.Attribution({
/** /**
* @type {Object.<string, {maxZoom: number, attributions: (Array.<ol.Attribution>)}>} * @type {Object.<string, {maxZoom: number, opaque: boolean, attributions: (Array.<ol.Attribution>)}>}
*/ */
ol.source.MapQuestConfig = { ol.source.MapQuestConfig = {
'osm': { 'osm': {
maxZoom: 19, maxZoom: 19,
opaque: true,
attributions: [ attributions: [
ol.source.MapQuest.TILE_ATTRIBUTION, ol.source.MapQuest.TILE_ATTRIBUTION,
ol.source.OSM.ATTRIBUTION ol.source.OSM.ATTRIBUTION
@@ -71,6 +72,7 @@ ol.source.MapQuestConfig = {
}, },
'sat': { 'sat': {
maxZoom: 18, maxZoom: 18,
opaque: true,
attributions: [ attributions: [
ol.source.MapQuest.TILE_ATTRIBUTION, ol.source.MapQuest.TILE_ATTRIBUTION,
new ol.Attribution({ new ol.Attribution({
@@ -81,6 +83,7 @@ ol.source.MapQuestConfig = {
}, },
'hyb': { 'hyb': {
maxZoom: 18, maxZoom: 18,
opaque: false,
attributions: [ attributions: [
ol.source.MapQuest.TILE_ATTRIBUTION, ol.source.MapQuest.TILE_ATTRIBUTION,
ol.source.OSM.ATTRIBUTION ol.source.OSM.ATTRIBUTION