Hi guys,
Is there a way to reorder ArcGISImageServiceLayer (ArcGISImageServiceLayer | API Reference | ArcGIS API for JavaScript ) using the Map reorderLayer method (Map | API Reference | ArcGIS API for JavaScript ) ?
I notice that it will be created as
<div> under <div> with class="esriMapLayers"
instead of
<g> under <svg>
where all the feature layers are loaded into
I think this maybe the reason why reorderLayer does not work for ArcGISImageServiceLayer.
I'm ok with any method as long as I can do reordering of ArcGISImageServiceLayer with FeatureLayer.
Alternatively, is there any way I can display a raster image that support reordering?
Thanks!
Hmm I'm quite juiced out of ideas, if I start from scratch again, does anyone know any ideas on how to reorder raster and feature layers?
Can you provide us with some sample code to see why it is not working?
The code is pretty simple:
var map = new Map("mapDiv"); var basemap = new ArcGISTiledMapServiceLayer("http://10.229.85.29/arcgis/rest/services/demoBasemap/MapServer"); var featureLayer = new FeatureLayer("http://10.229.85.29/arcgis/rest/services/demoFeature/MapServer/0"); var rasterLayer = new ArcGISImageVectorServiceLayer("http://10.229.85.29/arcgis/rest/services/demoRaster/ImageServer"); // 1 band raster layer map.addLayer(basemap); // showing map.addLayer(featureLayer); // showing map.addLayer(rasterLayer); // not showing
I think the key concern is in http://10.229.85.29/arcgis/rest/services/demoRaster/ImageServer
Our image is like the layout of a train station that we scan into the computer and import it as a raster layer.
Don't think it has the directional or magnitude values as per the provided online sample
The API reference (ArcGISImageServiceVectorLayer | API Reference | ArcGIS API for JavaScript ) states that the ArcGISImageVectorServiceLayer must have 2 bands: "To do this, the image service layer must be a two-band raster in which one band holds magnitude values and one band holds direction values."
Will normal ArcGISImageServiceLayer not be sufficient?
The current situation is like:
ArcGISImageServiceLayer can only display the layer but cannot reorder the layer between feature layer
ArcGISImageServiceVectorLayer cannot display the layer but can reorder the layer between feature layer
Hmm, imagine I got the train station layout raster and a feature layer that show where the exit point are
Our requirement is to be able to reorder the map such that if I reorder train station layout on top of exit point
The train station layout will cover the exit point
If I reorder exit point on top of train station layout
The exit point will overlay on top of train station layout
Currently, the choke point is the "cover the exit point" part because station layout will always render behind the exit point