[OpenLayers-Dev] ArcGIS server 9.2 support for OL

Burgoon, David DBurgoon at gc.cuny.edu
Mon Dec 29 11:57:48 EST 2008


I was able to fix the problem by changing the way ArcGIS server
generates a cache. The problem we had was ArcGIS by default wasn't
always creating the next level of tiles at half the scale of the
previous tiles. For example it would create the tiles for a level at
100,00 then create tiles for scale 51,000. We manually set it to 50,000
and by half for each successive level and everything worked.

 

I haven't installed 9.3 or even looked at the REST api yet. We're
accessing all of our ArcGIS services as WMS.

 

 

From: matthewsnape (via Nabble)
[mailto:ml-user+149283-433700537 at n2.nabble.com] 
Sent: Friday, December 26, 2008 5:55 AM
To: Burgoon, David
Subject: Re: ArcGIS server 9.2 support for OL

 

Hi Dave,

 

I don't think the value of ymin really matters.  Just set it slightly
below the minimum y of your data extents. 

 

Have you tried any of the code that targets the 9.3 api?  I had a go
with the code in this sandbox.
http://trac.openlayers.org/browser/sandbox/august/openlayers/openlayers-
2.6?rev=7819  Annoyingly I was getting exactly the same issues with
maxextents.  

 

 

 

2008/12/26 Burgoon, David (via Nabble) <ml-user%2B121715-20876752 at ...
<http://n2.nabble.com/user/SendEmail.jtp?type=node&node=1877782&i=0> >

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. 

 

 

________________________________

This email is a reply to your post @
http://n2.nabble.com/ArcGIS-server-9.2-support-for-OL-tp1835765p1877782.
html
You can reply by email or by visting the link above.

 


-- 
View this message in context: http://n2.nabble.com/ArcGIS-server-9.2-support-for-OL-tp1835765p2089431.html
Sent from the OpenLayers Dev mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20081229/85a6c2db/attachment.html


More information about the Dev mailing list