[OpenLayers-Dev] ArcGIS server 9.2 support for OL

dburgoon dburgoon at gc.cuny.edu
Tue Jul 22 14:48:49 EDT 2008


I'm trying to access ArcGis server map cache from Openlayers. I've seen the
threads on mailing list about this topic, yet I'm still having the following
issue: the cached images are only aligned correctly for some of the map zoom
levels. So, my map has 10 zoom levels. The cached tiles align correctly for
levels 1-4, do not align correctly for levels 5-7, and align correctly for
levels 8-10. 
I tried to implement following posted fix for changing the extent at
different zoom levels, but I dont know where to get the value for this.ymin
variable. 
Also, it's been stated that the maxExtent should be perfect fit for tiles;
but is there a standard equation to use to calculate this perfect fit for
ArcGis map cache? Any help would be greatly appreciated. 
Dave



matthewsnape wrote:
> 
> I have been using a previous version of the code extensively and can
> confirm that it works.  We certainly had trouble with the extents issue. 
> I found that the extents had to be different for each zoom level.  I used
> the following code to calculate the correct extents, added to the start of
> the geturl and setmap functions:
> 
> var res = this.map.getResolution();
> var tile_height = res*512;
> var yorigin = this.maxExtent.top;
> var ydiff = yorigin-this.ymin;
> var tilecount = ydiff/tile_height;
> var tilecountr = Math.ceil(tilecount);
> var coverage = tilecountr*tile_height;
> var yminorigin = yorigin-coverage;
> this.maxExtent.bottom = yminorigin;
> 
> Because you need a fixed number of tiles to cover the map, the bottom tile
> will overlap the edge of the map extents.  At different resolutions the
> amount of overlap changes.  This code calculates the y co-ordinate of the
> bottom of the map extents, depending on your resolution.  It uses an
> addittional attribute "ymin" to store the minimum y value of the data
> extents, allowing maxExtent.bottom to change as appropriate.
> 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/ArcGIS-server-9.2-support-for-OL-tp9691195p18595695.html
Sent from the OpenLayers Dev mailing list archive at Nabble.com.




More information about the Dev mailing list