add ol.source.MapQuestHybrid and add all MapQuest types to the example
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
goog.provide('ol.source.MapQuestHybrid');
|
||||
goog.provide('ol.source.MapQuestOSM');
|
||||
goog.provide('ol.source.MapQuestOpenAerial');
|
||||
|
||||
@@ -73,3 +74,36 @@ ol.source.MapQuestOpenAerial = function(opt_options) {
|
||||
|
||||
};
|
||||
goog.inherits(ol.source.MapQuestOpenAerial, ol.source.XYZ);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {ol.source.XYZ}
|
||||
* @param {olx.source.MapQuestOptions=} opt_options MapQuest options.
|
||||
* @todo stability experimental
|
||||
*/
|
||||
ol.source.MapQuestHybrid = function(opt_options) {
|
||||
|
||||
var options = goog.isDef(opt_options) ? opt_options : {};
|
||||
|
||||
var attributions = [
|
||||
new ol.Attribution({
|
||||
html: 'Tiles Courtesy of ' +
|
||||
'<a href="http://www.mapquest.com/" target="_blank">MapQuest</a>'
|
||||
}),
|
||||
ol.source.OSM.DATA_ATTRIBUTION
|
||||
];
|
||||
|
||||
goog.base(this, {
|
||||
attributions: attributions,
|
||||
crossOrigin: 'anonymous',
|
||||
logo: 'http://developer.mapquest.com/content/osm/mq_logo.png',
|
||||
maxZoom: 18,
|
||||
opaque: true,
|
||||
tileLoadFunction: options.tileLoadFunction,
|
||||
url: 'http://oatile{1-4}.mqcdn.com/tiles/1.0.0/hyb/{z}/{x}/{y}.jpg'
|
||||
});
|
||||
|
||||
};
|
||||
goog.inherits(ol.source.MapQuestHybrid, ol.source.XYZ);
|
||||
|
||||
Reference in New Issue
Block a user