Add ol.source.ImageArcGISRest (#3880)
* Add ol.source.ImageArcGISRest ol.source.ImageArcGISRest is added so a single image can be retrieved which is required when labelling is applied to the underlying map service. it's based on the approach used in ol.source.ImageWMS * updating to remove as many good references as possible changing so js passes lint checks * fixing up so build and tests run * putting back what was lost in the merge * adding in an example tidying up
This commit is contained in:
committed by
Andreas Hocevar
parent
0e4692e69e
commit
18a29ea6d3
29
examples/arcgis-image.js
Normal file
29
examples/arcgis-image.js
Normal file
@@ -0,0 +1,29 @@
|
||||
goog.require('ol.Map');
|
||||
goog.require('ol.View');
|
||||
goog.require('ol.layer.Tile');
|
||||
goog.require('ol.layer.Image');
|
||||
goog.require('ol.source.MapQuest');
|
||||
goog.require('ol.source.ImageArcGISRest');
|
||||
|
||||
var url = 'http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/' +
|
||||
'Specialty/ESRI_StateCityHighway_USA/MapServer';
|
||||
|
||||
var layers = [
|
||||
new ol.layer.Tile({
|
||||
source: new ol.source.MapQuest({layer: 'sat'})
|
||||
}),
|
||||
new ol.layer.Image({
|
||||
source: new ol.source.ImageArcGISRest({
|
||||
params: {},
|
||||
url: url
|
||||
})
|
||||
})
|
||||
];
|
||||
var map = new ol.Map({
|
||||
layers: layers,
|
||||
target: 'map',
|
||||
view: new ol.View({
|
||||
center: [-10997148, 4569099],
|
||||
zoom: 4
|
||||
})
|
||||
});
|
||||
Reference in New Issue
Block a user