[Tilecache] Using OpenLayers to hit a type=ArcXML tilecache

Christopher Schmidt crschmidt at metacarta.com
Fri May 23 11:05:09 EDT 2008


On Fri, May 23, 2008 at 09:38:36AM -0400, David Siegel wrote:
> 
> I've got a question on how to set up OpenLayers to hit a tilecache  
> that's pointing to an ArcXML request. I can seed a tilecache just fine  
> with my configuration and then use it with OL. However, I can not  
> figure out how to use OL to hit the service through my tilecache  
> config. Specifically, I use layer = new OpenLayers.Layer.TileCache()  
> to point to the tilecache but what's the syntax to point to an ArcXML?  
> I don't see anything like OpenLayers.Layer.ArcXML() for example. I've  
> made some headway with WMS but I expect there's a direct way to hit  
> type=ArcXML.

Unless you're pre-generating all the tiles for your TileCache layer, you
should *always* use Layer.WMS in OpenLayers when talking to a TileCache
server. See the index.html included with TileCache for an example of
setting that up.

Also:
> bbox=-20037507,-20037507,20037507,20037507

This won't work on top of Google Maps in OpenLayers. You really do need
to include the full +/-20037508.34

-- Chris

> My tilecache config;
> 
> [worldmap2]
> type=ArcXML
> url=http://dixon.hul.harvard.edu:8080/servlet/com.esri.esrimap.Esrimap?ServiceName=simone1&ClientVersion=9.2
> layers=0
> bbox=-20037507,-20037507,20037507,20037507
> size=256,256
> projection=PROJCS["GoogleSphere",GEOGCS["GoogleSphereCS",DATUM["<custom>",SPHEROID["<custom>",6378137.0,0.0]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",0.0],PARAMETER["standard_parallel_1",0.0],UNIT["Meter",1.0]]
> 
> And my OL pointing to the tilecache:
>        function init(){
>            map = new OpenLayers.Map( $('map'));
>            layer = new OpenLayers.Layer.TileCache("TileCache Layer",
>                    "http://dixon.hul.harvard.edu/output/tilecache/",  
> "worldmap2",
>                    {
>                    'format': 'image/png',
>                    maxResolution: 256/256 // same as the TileCache config
>                    }
>            );
>            map.addLayer(layer);
>            map.addControl(new OpenLayers.Control.Permalink());
>            if (!map.getCenter()) map.zoomToMaxExtent();
>        }
> 
> Thanks
> 
> Dave
> 
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
> 
> _______________________________________________
> Tilecache mailing list
> Tilecache at openlayers.org
> http://openlayers.org/mailman/listinfo/tilecache

-- 
Christopher Schmidt
MetaCarta



More information about the Tilecache mailing list