[OpenLayers-Users] Accessing tile structure generated by ArcGIS 9.3

Simone Gadenz simone.gadenz at jrc.it
Tue Feb 17 03:45:07 EST 2009


Hi!

 

I am trying to access the tilestructure generated by the ArcGIS Server 9.3.

 

I found the AGS.js on the website, it is to manage the AGS layers but the
fact is that it works only for the first 4 levels of tiling. Deeper than the
fourth level, if more than one AGS layer is added to the map, those layers
do not overlap anymore. 

Also, they do not coincide with the basemap (in my case a TileCache layer)
that surely works.  You can check this behavior at
http://dma.jrc.it/testmap/

 

The layers definition is the following:

 

var AGSlayer = new
OpenLayers.Layer.AGS("AGS","http://139.191.1.149/arcgiscache/DMAEurope_merc/
Layers",{layername:'_alllayers', type: 'png', format:
'image/png',isBaseLayer: false,

             transitionEffect: 'resize', wrapDateLine: true, tileOrigin: new
OpenLayers.LonLat(-22041259.177067, 22041259.177067)});//-60112524.6784,
30056262.848000005)});

             var AGSlayer2 = new
OpenLayers.Layer.AGS("AGS2","http://139.191.1.149/arcgiscache/global_test_1/
Layers",{layername:'_alllayers', type: 'png', format:
'image/png',isBaseLayer: false,

             transitionEffect: 'resize', wrapDateLine: true, tileOrigin: new
OpenLayers.LonLat( -22041257.773878, 20855374.584800)});

 

I have checked the two tile image folder and the images with the same row
and column indexes are exactly the same. I think it is the OL that somehow
positions the images badly.

 

Anybody with a similar experience?

 

Many thanks 

 

S.

 

 

From: users-bounces at openlayers.org [mailto:users-bounces at openlayers.org] On
Behalf Of Raphael Saldanha
Sent: Tuesday, February 17, 2009 2:10 AM
To: users at openlayers.org
Subject: [OpenLayers-Users] WFS ProxyHost

 

Hi!

I'm having some troubles on trying to use WFS...

As suggested in the FAQ, and put the proxy.cgi on cgi-bin Apache folder, and
add the line "AddHandler python-cgi-script .cgi" on httpd.conf, as suggested
in http://gist.fas.harvard.edu/chgis/?p=14.

But loading the following page, I receive the error 1012, on Firebug.

Help please!!!

<html>
    <head>
        <title>IPTU</title>
        <link rel="stylesheet" type="text/css"
href="http://localhost:8080/geoserver/openlayers/theme/default/style.css"/>




        <!-- Import OpenLayers, reduced, wms read only version -->
        <script
src="http://localhost:8080/geoserver/openlayers/OpenLayers.js"
type="text/javascript"></script>
        <script defer="defer" type="text/javascript">
            var map;
            var quadra;
            var imagem;
            var wfs;
            
 
OpenLayers.ProxyHost="http://localhost:8080/cgi-bin/proxy.cgi/?url=";

            // pink tile avoidance
            OpenLayers.IMAGE_RELOAD_ATTEMPTS = 5;
            // make OL compute scale according to WMS spec
            OpenLayers.DOTS_PER_INCH = 25.4 / 0.28;

            function init(){
                format = 'image/png';

                var bounds = new OpenLayers.Bounds(
                    497839.91636617144, 7649918.889418672,
                    499243.91636617144, 7650565.389418672
                );
                
                var options = {
                    controls: [],
                    maxExtent: bounds,
                    maxResolution: 5.484375,
                    projection: "EPSG:32723",
                    units: 'm'

                };
                
                map = new OpenLayers.Map('map', options);

                // Layer QUADRA
                quadra = new OpenLayers.Layer.WMS(
                    "Quadras", "http://localhost:8080/geoserver/wms",
                    {
                        layers: 'topp:quadra',
                        transparent: "true",
                        format: "image/png",
                        srs: 'EPSG:32723',
                        height: '345',
                        width: '800',
                        styles: '',
                        tiled: 'true',
                        tilesOrigin : "497839.91636617144,7649918.889418672"
                    }
                );
                
                // Layer WFS
                wfs = new OpenLayers.Layer.WFS(
                "Quadras WFS",
                "http://localhost:8080/geoserver/wfs",
                {typename: 'topp:quadra'},
                {
                    typename: 'quadra',
                    featureNS: 'http://www.openplans.org/topp',
                    extractAttributes: false
                }
                );

                //Layer IMAGEM
                imagem = new OpenLayers.Layer.WMS(
                    "WorldView-1", "http://localhost:8080/geoserver/wms",
                    {
                        layers: 'topp:lavras',
                        srs: 'EPSG:32723',
                        height: '345',
                        width: '800',
                        styles: '',
                        format: format,
                        tiled: 'true',
                        tilesOrigin : "497839.91636617144,7649918.889418672"
                    }
                );
                

                map.addLayers([quadra,wfs,imagem]);

                // build up all controls
                map.addControl(new OpenLayers.Control.PanZoomBar({
                    position: new OpenLayers.Pixel(2, 15)
                }));
                map.addControl(new OpenLayers.Control.Navigation());
                map.addControl(new OpenLayers.Control.LayerSwitcher());
                map.zoomToExtent(bounds);
                



            }
            

        </script>
    </head>
    <body onload="init()">

        <div id="map">
        </div>

    </body>
</html>


-- 
Regards,

Raphael Saldanha
saldanha.plangeo at gmail.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090217/1baa708d/attachment.html


More information about the Users mailing list