I tried the ArcIMS layer and ArcXML provided by Ticket#213 sucessfully. But when I setQuery to a layer, it seems no effect to the result.
the code is listed below. /********************************************************/ <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Local ArcIMS Example</title> <link rel="stylesheet" href="./OpenLayers/theme/default/style.css" type="text/css" /> <link rel="stylesheet" href="style.css" type="text/css" /> <script src="OpenLayers/lib/OpenLayers.js"></script> <!--<script src="OpenLayers/lib/Proj4js/proj4js.js"></script> --> <script type="text/javascript"> var lon = (-122.496415 - 122.384637) / 2; var lat = (37.728692 + 37.794956) / 2; // var lon = (3254044.6244156 + 301366.203915361) / 2; // var lat = (752146.553775182 + 3835871.2) / 2; var zoom = 10; var map, layer; function init(){ //OpenLayers.ProxyHost = "proxy.ashx?url="; //only necessary for cross-domain request map = new OpenLayers.Map( 'map' ); var options = { serviceName: "SF", async: true, displayOutsideMaxExtent: true, layers: [ // layers to manipulate { id: 'stores',visible: true, query: { where: '1==2 ', subfields:'#ALL#', spatialfilter:true } } ] }; layer = new OpenLayers.Layer.ArcIMS( "local Map", "http://localhost:8080/servlet/com.esri.esrimap.Esrimap", options); //layer.setLayerQuery('stores', "NAME LIKE '%1'"); map.addLayer(layer); map.setCenter(new OpenLayers.LonLat(lon, lat), zoom); map.addControl( new OpenLayers.Control.LayerSwitcher() ); } </script> </head> <body onload="init()"> <h1 id="title">ArcIMS Example</h1> <div id="tags"> </div> <p id="shortdesc"> Shows the basic use of openlayers using an ArcIMS layer </p> <div id="map" class="smallmap"></div> <div id="docs"> This is an example of how to add an ArcIMS layer to the OpenLayers window. </div> </body> </html> /********************************************************/ Could somebody help me? Thanks very much. ----- Regards, Carl SHE -- View this message in context: http://n2.nabble.com/setQuery-to-ArcIMS-layer-is-not-available--tp2325774p2325774.html Sent from the OpenLayers Users mailing list archive at Nabble.com. _______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
