BasemapGallery with ArcGISTiledMapServiceLayer

2219
4
02-17-2016 01:42 AM
MicheleDe_Santis
New Contributor

Hi to all,

during implementation of basemapGallery for basemaps switching I came to the issue because basemaps are not loaded in tiled way.

I used this example:

Basemap Gallery - user-defined items | ArcGIS API for JavaScript

var waterTemplateLayer = new esri.dijit.BasemapLayer({
       url:"http://mydomain.com/arcgis/rest/services/BaseMaps/Service1/ImageServer"
 });

so I just replaced the url with my ArcGISTiledMapServiceLayer service (in EPSG 32633), but in my webapplication I have dynamic request to my service, as follow:

arcgis/rest/services/BaseMaps/Service1/ImageServer/exportImage?f=image&bbox=633067.2678012023%2C4555010.16002032%2C661430.6578613158%2C4569860.72305478&imageSR=32633&bboxSR=32633&size=1675%2C877

Something can help me? How can I configure my service for tiled requests?

Thanks

Michele

0 Kudos
4 Replies
RobertScheitlin__GISP
MVP Emeritus

Michele,

   I am kind of confused by your thread here. When you use an ImageServer service as your basemap url there is no tiled requests. You state:

so I just replaced the url with my ArcGISTiledMapServiceLayer service (in EPSG 32633)

But the url you are showing is still an ImageServer url : arcgis/rest/services/BaseMaps/Service1/ImageServer/.

If this was a ArcGISTiledMapServiceLayer url then it would look like arcgis/rest/services/BaseMaps/Service1/MapServer

0 Kudos
MicheleDe_Santis
New Contributor

Hi Robert,

I use always this sintax to add tiled service, and it works fine (with tiled request).

map = new esri.Map("map");
  var layer = new esri.layers.ArcGISTiledMapServiceLayer("http://mydomain.com/arcgis/rest/services/BaseMaps/Service1/ImageServer");
  map.addLayer(layer);

Michele

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Michele,

   As I mentioned http://mydomain.com/arcgis/rest/services/BaseMaps/Service1/ImageServer is not an standard url for a ArcGISTiledMapServiceLayer. When using a ArcGISTiledMapServiceLayer the url should be to a MapServer url and not a ImageServer. Using an ImageServer url does work as you know but is not what ArcGISTiledMapServiceLayer is designed for. The BasemapLayer is going to make it own decisions on what the proper request string is based on the service type and because you are feeding it a ImageServer url it will request the data like you posted above:

arcgis/rest/services/BaseMaps/Service1/ImageServer/exportImage?f=image&bbox=633067.2678012023%2C4555010.16002032%2C661430.6578613158%2C4569860.72305478&imageSR=32633&bboxSR=32633&size=1675%2C877

 

0 Kudos
BillDaigle
Occasional Contributor III

Michelle, the problem is not with the image service itself.  It is with the basemapGallery widget.  Here is a link to a thread with a potential workaround...

Cached Image Service behaving dynamically in basemap gallery

0 Kudos