is it possible to combine multiple URLs for one ol.layer.tile in openLayers 3?

المشرف العام

Administrator
طاقم الإدارة
I have two Image services that I would like to combine into one layer; one has higher resolution imagery that draws only at a larger scale, and other has lower resolution imagery that draws at all scales. I'd like to combine them so that when you are zoomed in, the detailed imagery draws on top of the lower res imagery. I tried to load in the 2 urls like this:

var USGSimagery = new ol.layer.Tile({ myattribute:'USGSimagery', source: new ol.source.TileWMS(({ urls: ['http://raster.nationalmap.gov/arcgis/services/Orthoimagery/USGS_EROS_Ortho_SCALE/ImageServer/WMSServer','http://basemap.nationalmap.gov/arcgis/services/USGSImageryOnly/MapServer/WmsServer'], params: { 'LAYERS': 0 } }))});But when I load the layer in the map - it draws funny, like in alternating strips where it shows one service and then the other. So this obviously isn't the way to do it. Does anyone know if it's possible to combine two services into one layer with one drawing on top of the other?



أكثر...
 
أعلى