Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I've called tilecache from OpenLayers in the same manner as the example below. Is it possible to do something similar with the ArcGIS WMS map layer?

var urlArray = ["http://tilecache.osgeo.org/wms-c/Basic.py",
    "http://tilecache.osgeo.org/wms-c/Basic.py"];
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", 
    urlArray,
    {layers: 'basic'} );
share|improve this question
    
Curious if you ever got tilecache layers to show in esri. The OL code above does not set singleTile: true, which is why it will work (tile size is 256 x 256). The ESRI WMS service does not seem to have a singleTile option, so wondering if you evergot your TileCache tiles to display in ESRI JSAPI (and how). –  ca0v Jul 26 '12 at 19:28
    
That's not quite what I was getting at with the original question, but here's how I use TileCache layers within the arcgis api. I use the custom layer example from the arcgis api reference, similar to the 'my.PortlandTiledMapServiceLayer' instance created in this example. Here's the key piece from my 'getTileUrl' code. --> return url + level + "/" + col + "/" + row + "." + img_fmt + "?type=google" –  Ryan Twilley Jul 27 '12 at 19:18
    
Thanks -- good to know TiledMapServiceLayer is the way to go. I requested a WMSLayer enhancement (forums.arcgis.com/threads/63308-Tiled-WMS-via-resourceInfo) but a tiling layer makes sense. It's of interest to note you can 'discover' resolution/extent using the json (tilecache.py?format=json&callback=cb). –  ca0v Jul 27 '12 at 20:24
add comment

2 Answers

You probably want to do it this way...

var streetTemplateLayer = new esri.dijit.esri.layers.ArcGISTiledMapServiceLayer({
                    url: "http://domain.com/ArcGIS/rest/services/Base/Base_Map/MapServer",
                    tileServers: [
                        "http://machine1.domain.com/ArcGIS/rest/services/Base/Base_Map/MapServer",
                        "http://machine2.domain.com/ArcGIS/rest/services/Base/Base_Map/MapServer",
                        "http://machine3.domain.com/ArcGIS/rest/services/Base/Base_Map/MapServer"]
                });

This will allow you to define your service, then a list of URLS that host your caches...

share|improve this answer
add comment

What are you trying to achieve there? Multiple tile servers serving the same layer, or several layers with different data stacked in the same layer? Both can be done in the arcgis jsapi (though you would need a wms wrapper).

share|improve this answer
    
No need for WMS to pull cache from more than one server/domain. I am doing that and it works very nicely. –  D.E.Wright Jun 17 '11 at 22:20
    
Multiple tile layers serving the same layer. I'm hoping to achieve more concurrent requests by duplicating the services across several servers. I'm not sure what you're trying to say D.E. but I'm going to experiment a little this morning –  Ryan Twilley Jun 20 '11 at 13:35
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.