|
POST
|
Awesome, thanks so much for posting that! I noticed that fading in a feature layer is less successful, as it's more dependent on the server's performance, but for fading out it's perfect. Thanks again, Steve
... View more
05-12-2011
07:51 PM
|
0
|
0
|
1612
|
|
POST
|
Hi Derek, In this case, it's a feature layer. A good example is the sample script at http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples_start.htm#jssamples/fl_ondemand.html Rather than simply switching the Hydrography layer on/off when the button is pressed, is it possible to fade it off/on smoothly? Cheers, Steve
... View more
05-12-2011
03:35 PM
|
0
|
0
|
1612
|
|
POST
|
Is it possible to fade a layer on/off smoothly, rather than simply showing/hiding? Thanks, Steve
... View more
05-11-2011
09:58 PM
|
0
|
6
|
2968
|
|
POST
|
have several points that i query a database for and display on the map, with associated info window on click Hi Julie, You'd probably want to use graphic objects to replicate this. See the sample at http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples_start.htm#jssamples/graphics_multiple_layers.html to get started. Good luck, Steve
... View more
05-10-2011
09:03 PM
|
0
|
0
|
995
|
|
POST
|
The queryTask method executeForCount returns the number of features which satisfy the query. This can take a long time to run when many features are returned (even when the returnGeometry option is set to false). Could we have a new "break" option, so that the query stops when a minimum number of features has been found? For example, say I want to know if there are more than 100 features returned by the query. If the query returns 10,000 features I need to wait until it has finished before I can evaluate the result. I'd like the option for the executeForCount method to break as soon as it finds 100 features. Thanks, Steve PS I also added this on the Ideas page at http://ideas.arcgis.com/ideaView?id=08730000000bmf3 so please vote for this if you like the idea
... View more
05-09-2011
03:44 PM
|
0
|
0
|
944
|
|
POST
|
Hi Nimesh, I mean like in the Silverlight API example at http://resources.esri.com/help/9.3/arcgisserver/apis/silverlight/samples/start.htm#SimpleClusterer When zooming out, don't try to display all of the features, but instead show an aggregation of them. Is this possible in the iOS API? Cheers, Steve
... View more
05-06-2011
03:27 PM
|
0
|
0
|
843
|
|
POST
|
Now Google use version 3.x. May I know ArcGIS Extension is going to upgrate or not? I don't know of any official response from ESRI, but at the Developer Summit in Palm Springs, one of the JS team members from ESRI said that they don't plan to update the ArcGIS Google Maps JS API. Good luck, Steve
... View more
05-05-2011
08:50 PM
|
0
|
0
|
532
|
|
POST
|
I'm trying to build some logic which will switch layers on/off based on feature count (rather than scale thresholds). After each map extent change, I'm running queryTask.executeForCount to see how many features are present in the new view extent. This works correctly, but causes a problem when the user changes extent many times in quick succession. See the sample below for an example. Open FireBug and pan/zoom the map, and note that the number of features in the current map extent is listed in the Console tab. Now hit the zoom-in button about 10 times in rapid succession. I'm seeing time-out error messages. Is this a limitation of the queryTask, which presumably batches all of the jobs to run asynchronously? Any ideas on how to resolve the problem? Thanks, Steve
<!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"/>
<!--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 with count</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 query;
var queryTask;
function init() {
var extent = new esri.geometry.Extent({"xmin":-96.6063,"ymin":38.3106,"xmax":-96.4764,
"ymax":38.3689,"spatialReference":{"wkid":4269}});
var map = new esri.Map("map", { extent: esri.geometry.geographicToWebMercator(extent)});
veTileLayer = new esri.virtualearth.VETiledLayer({
bingMapsKey: 'AmtpLvkTJh3qNOm_vTV4DIXQ0ucCWYI0hrcO4wARRegSC79rstkDrYghY70pjoxY',
mapStyle: esri.virtualearth.VETiledLayer.MAP_STYLE_ROAD
});
map.addLayer(veTileLayer);
var content = "<b>Type</b>: ${ftype}" + "<br /><b>Code</b>: ${fcode}";
var infoTemplate = new esri.InfoTemplate("Rivers", content);
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);
dojo.connect(map, "onExtentChange", afterExtentChange);
query = new esri.tasks.Query();
}
function afterExtentChange(extent){
//Count the SLAs
query.geometry = extent;
query.maxAllowableOffset = 100000;
queryTask = new esri.tasks.QueryTask("http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Hydrography/Watershed173811/FeatureServer/1");
queryTask.executeForCount(query,function(count){
console.log(count);
},function(error){
console.log(error);
});
}
dojo.addOnLoad(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>
</div>
</body>
</html>
... View more
05-04-2011
10:44 PM
|
0
|
3
|
3481
|
|
POST
|
Hi Mark, I guess it depends on what is meant by the "new" map style. I'm hoping that we'll gain the ability to show the style of map shown on Bing at http://binged.it/jC6Anr This is very different from the style currently shown in the ESRI Bing maps implementation. My concern around satellite imagery is that the official Bing Maps URL doesn't seem to have the option to show imagery (unless I'm missing it?). Cheers, Steve
... View more
05-03-2011
03:09 PM
|
0
|
0
|
2088
|
|
POST
|
I have the same question. The page at http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi_start.htm says: "Select Window -> Show Aptana View -> References. Select the Global References tab in the References view and enable the ArcGIS JSAPI plugin." These settings don't exist in Aptana 3. Any clues? Thanks, Steve
... View more
05-02-2011
10:36 PM
|
0
|
0
|
3051
|
|
POST
|
Is it possible to implement point layer clustering in the iOS API? Thanks, Steve
... View more
05-02-2011
10:09 PM
|
0
|
4
|
3261
|
|
POST
|
"beginning on May 1, 2011, the new map style will become the default and only road style delivered across all Bing mapping services." And does this mean we lose the ability to show Map/Satellite views, as in the sample at http://help.arcgis.com/en/webapi/javascript/arcgis/demos/ve/ve_layer.html ? Thanks, Steve
... View more
05-02-2011
07:40 PM
|
0
|
0
|
2088
|
|
POST
|
Esri has a horrid history of deprecating software after its users have invested heavily in deployment and customization (ArcView 3.x, ArcInfo Workstation, ArcIMS, Web ADF) I'm not sure that's a fair criticism of ESRI - there has to be a point at which you stop supporting legacy technology at the expense of newer and better technology, and it would stifle innovation to keep spending money on these older programs. As far as I know, there's nothing to stop you from still using workstation ArcInfo or ArcView 3 if you've got it working the way you want. Anyway, I'd agree with your points on the benefits of the JS API. We used this to create http://atlas.nsw.gov.au and didn't find any areas where we wished we'd had Flex or Silverlight. The API allowed us to show time-aware layers, huge raster layers, and very complicated polygon layers in a fast application. Being able to read the code wasn't any issue for us, but it could be a valid reason to use a different API. Cheers, Steve
... View more
05-02-2011
07:30 PM
|
0
|
0
|
724
|
|
POST
|
For anyone who's interested in further technical information, the presentation I gave at the Esri Developer Summit is now available at http://bit.ly/fb94rE Cheers, Steve
... View more
03-21-2011
05:21 PM
|
0
|
0
|
2646
|
|
POST
|
Hi James, I still haven't gotten this sample code to work 100%, but it looks promising. I found I needed to make a change in the code, which was hard-coded to expect certain spatial references (despite the mention in the text of supporting multiple spatial references). In my case I made this change to work with my known spatial reference of 102113: //this function may not be needed exactly as is below. somehow, the attributes need to be mapped to the points.
setFeatures: function(features) {
this._features = [];
var wkid = features[0].geometry.spatialReference.wkid;
if (wkid != 102113) {
Let us all know how you go with the clustering - I'd love to see a real-world example in action. I hope to deploy it soon on my own site. Steve
... View more
03-21-2011
05:13 PM
|
0
|
0
|
1542
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 11-17-2014 08:45 PM | |
| 1 | 03-15-2011 04:23 PM | |
| 1 | 10-18-2019 12:50 AM | |
| 3 | 01-22-2019 02:33 PM | |
| 1 | 09-26-2011 10:36 PM |
| Online Status |
Offline
|
| Date Last Visited |
10-20-2022
12:19 AM
|