|
POST
|
Check out the where clause and the results here: http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Petroleum/KSWells/MapServer/0/query?&where=SECTION+%3E+0+and+SECTION+%3C%3D+2&returnGeometry=false&outFields=section&f=html The where clause being used is: SECTION > 0 and SECTION <= 2
... View more
05-19-2011
04:45 PM
|
0
|
0
|
821
|
|
POST
|
I find the best place to test these things out is at your REST endpoint. You can play around with different syntax to see what actually works and then drop that in your app. One thing about the where clause you posted: query.where = "3_bedrooms > " + 0 + "AND 3_bedrooms <= " + rent; I think you need another space before your AND: query.where = "3_bedrooms > " + 0 + " AND 3_bedrooms <= " + rent; Edit: just to confirm, the datatype of the 3_bedrooms field is not a string, right?
... View more
05-19-2011
03:21 PM
|
0
|
0
|
821
|
|
POST
|
Thanks for bringing this up. Things have been kind of quiet on this topic lately...the last mention of it I remember seeing was here: http://globoserve.posterous.com/clusteriffic How about other implementations? I imagine they all trace back to a sample published a couple of years ago as part of a dev summit session...
... View more
05-18-2011
07:06 PM
|
0
|
0
|
389
|
|
POST
|
No, you shouldn't need a proxy if you're only using a point to query. A proxy is necessary if you're sending long URLs (>2000 characters in most browsers). When you query with a large geometry (think polyline or polygon with 10s or 100s of vertices) you generate a long url since the geometry is passed to the server as text. Using a point to query a service *should* generate a URL under the limit.
... View more
05-17-2011
08:30 AM
|
0
|
0
|
1106
|
|
POST
|
Hi Pavan, Are you using the JS API or ArcObjects? If it's ArcObjects, better to post in the AO forum: http://forums.arcgis.com/forums/20-ArcObjects-All-Development-Languages
... View more
05-17-2011
08:26 AM
|
0
|
0
|
1365
|
|
POST
|
Hi Kevin, Probably better to post your question here: http://forums.arcgis.com/forums/18-ArcGIS-API-for-Flex If you ever dive into the JS API, please come back and we'll be glad to help :).
... View more
05-17-2011
08:24 AM
|
0
|
0
|
801
|
|
POST
|
Thanks, Rich. Definitely something that should be corrected in the documentation...
... View more
05-13-2011
07:50 AM
|
0
|
0
|
1083
|
|
POST
|
Glad I could help! I figured it was possible since you can do essentially the same thing with a slider. Performance should be dependent on the client browser/machine since this is all done client side. The server shouldn't be an issue. There aren't any requests sent to the server by clicking a button to toggle a layer.
... View more
05-12-2011
08:17 PM
|
0
|
0
|
1613
|
|
POST
|
I tweaked the sample you linked to so that layers are faded in/out when you click a button: http://jsfiddle.net/swingley/ew8VY/ The code is available there but here it is again for convenience:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<!--The viewport meta tag is used to improve the presentation and behavior of the samples
on iOS devices-->
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/>
<title>FeatureLayer On Demand</title>
<link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.2/js/dojo/dijit/themes/claro/claro.css">
<style>
html, body { height: 100%; width: 100%; margin: 0; padding: 0; }
</style>
<script type="text/javascript">djConfig = { parseOnLoad:true };</script>
<script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.2"></script>
<script type="text/javascript">
dojo.require("esri.map");
dojo.require("esri.layers.FeatureLayer");
dojo.require("dijit.form.Button");
dojo.require("dijit.Dialog");
var mapLayers = []; //array of layers in client map
var map;
function init() {
var extent = new esri.geometry.Extent({"xmin":-96.6063,"ymin":38.3106,"xmax":-96.4764,
"ymax":38.3689,"spatialReference":{"wkid":4269}});
map = new esri.Map("map", { extent: esri.geometry.geographicToWebMercator(extent)});
dojo.connect(map, "onLoad", initOperationalLayer);
var imagery = new esri.layers.ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer");
map.addLayer(imagery);
mapLayers.push(imagery);
}
function initOperationalLayer(map) {
var content = "<b>Type</b>: ${ftype}" +
"<br /><b>Code</b>: ${fcode}";
var infoTemplate = new esri.InfoTemplate("Rivers", content);
var featureLayer = new esri.layers.FeatureLayer("http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Hydrography/Watershed173811/FeatureServer/1",{
mode: esri.layers.FeatureLayer.MODE_ONDEMAND,
outFields: ["*"],
infoTemplate: infoTemplate
});
map.addLayer(featureLayer);
map.infoWindow.resize(150,105);
mapLayers.push(featureLayer); //this client side map layer is the maps graphics layer
}
function layerVisibility(layer) {
console.log('clicked button ', layer.opacity);
if (layer.visible) {
fader(layer, 0.9, 'out');
} else {
fader(layer, 0, 'in');
}
}
function fader(layer, op, dir) {
if (dir == 'out') {
if (op > 0) { // fading out
layer.setOpacity(op.toFixed(1));
op-=0.1;
setTimeout(function() {
fader(layer, op, dir);
}, 50);
} else { // fade out finished
layer.hide();
}
} else if (dir == 'in') {
if ( ! layer.visible ) {
layer.show();
}
if (op < 1) { // fading in
layer.setOpacity(op.toFixed(1));
op+=0.1;
setTimeout(function() {
fader(layer, op, dir);
}, 50);
}
}
}
dojo.ready(init);
</script>
</head>
<body class="claro">
<div style="position:relative;width:100%;height:100%;">
<div id="map" style="border:1px solid #000;width:100%;height:100%;">
<div style="position:absolute; left:100px; top:10px; z-Index:999;">
<button dojoType="dijit.form.Button" onClick="layerVisibility(mapLayers[0]);">Imagery Cached Base Map</button>
<button dojoType="dijit.form.Button" onClick="layerVisibility(mapLayers[1]);">Hydrography Operational Graphics Layer</button>
</div>
</div>
</div>
</body>
</html>
The relevant stuff is the layerVisibility function as well as the fader function which is called recursively to get the desired effect. This seems like more of a novelty than anything and I doubt it works in IE...I only tested in Chrome.
... View more
05-12-2011
07:44 PM
|
0
|
0
|
1613
|
|
POST
|
I would guess that adding the djConfig stuff addressed the _297 is null error but you were still loading a cached version of the page. Regarding the 400 on trying to apply edits, I would start by making sure your proxy is configured correctly.
... View more
05-12-2011
09:22 AM
|
0
|
0
|
1971
|
|
POST
|
Not sure...which part of your app is breaking? Is the your tiled map service loading?
... View more
05-12-2011
08:42 AM
|
0
|
0
|
1971
|
|
POST
|
Try adding this before your script tag for the JS API: <script type="text/javascript">var djConfig = {parseOnLoad: true};</script>
... View more
05-12-2011
07:50 AM
|
0
|
0
|
1971
|
|
POST
|
Which type of layer? Graphics/Feature layer? Dynamic? Tiled?
... View more
05-12-2011
07:20 AM
|
0
|
0
|
1613
|
|
POST
|
I'm honestly not sure...what are you seeing when you test it?
... View more
05-12-2011
07:19 AM
|
0
|
0
|
950
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 01-23-2012 07:54 AM | |
| 1 | 05-28-2010 08:31 AM | |
| 1 | 11-12-2012 08:12 AM | |
| 3 | 02-23-2012 10:57 AM | |
| 1 | 06-27-2011 08:51 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|