|
POST
|
Version 2.1 of the ArcGIS API for JavaScript was released this morning. Check out the server blog for more details: http://blogs.esri.com/Dev/blogs/arcgisserver/default.aspx
... View more
09-20-2010
09:21 AM
|
0
|
14
|
2462
|
|
POST
|
Your code was really close, you just need to remove the var from in front of the section where you create the layers (see below).
imageryPrime = new esri.layers.ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer", {id:"imageryPrime"});
map.addLayer(imageryPrime);
streetMap = initLayer("http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer", "streetMap");
shadedRelief = initLayer("http://server.arcgisonline.com/ArcGIS/rest/services/World_Shaded_Relief/MapServer", "shadedRelief");
ngsTopoUS = initLayer("http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer", "ngsTopoUS");
boundariesWorld = initLayer("http://server.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places/MapServer", "boundariesWorld");
... View more
09-16-2010
07:41 AM
|
0
|
0
|
392
|
|
POST
|
Here's the bug tracking number: NIM061060 This should be fixed in 2.1.
... View more
09-13-2010
08:23 AM
|
0
|
0
|
654
|
|
POST
|
This works for me: <div id="navToolbar" style="background-color:#9CAA9C;" dojoType="dijit.Toolbar">
... View more
09-10-2010
09:44 AM
|
0
|
0
|
374
|
|
POST
|
Looks like a bug in the time slider. I submitted a new bug for this issue. It does work if you set two thumbs, so if it works for your scenario that's one potential workaround: timeSlider.setThumbCount(2);
... View more
09-10-2010
09:16 AM
|
0
|
0
|
654
|
|
POST
|
Will, I've seen issues with the proxy on IIS7 if the ASP.NET 'Windows feature' is not enabled. Here's a link to a Microsoft Knowledge Base article that explains how to enable this: http://msdn.microsoft.com/en-us/library/aa964620.aspx
... View more
09-09-2010
04:24 PM
|
1
|
0
|
3219
|
|
POST
|
I ran a quick test and was able to buffer 200 features in approximately 3 seconds. It sounds like your scenario is different do you have a code snippet you can post that shows what you are doing. function bufferGeom(){
var geometryService = new esri.tasks.GeometryService("http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer");
var params = new esri.tasks.BufferParameters();
params.distances = [10];
params.unit = esri.tasks.GeometryService.UNIT_KILOMETER;
params.bufferSpatialReference = map.spatialReference;
params.outSpatialReference = map.spatialReference;
var query = new esri.tasks.Query();
query.where = "OBJECTID < 201";
featureLayer.selectFeatures(query,esri.layers.FeatureLayer.SELECTION_NEW,function(features){
console.log('selected');
var infeatures = dojo.map(features,function(feature){
return feature.geometry;
});
params.geometries = infeatures;
geometryService.buffer(params,showBuffer,function(error){
console.log("error");
});
});
}
... View more
09-08-2010
07:54 AM
|
0
|
0
|
390
|
|
POST
|
I think you are running into the bug described in the following discussion forum thread: http://forums.esri.com/Thread.asp?c=158&f=2396&t=301691&mc=5 The thread has a patch you can apply if you are using 1.6. The bug is fixed in version 2.0 and the 2.0 samples are located here: http://help.arcgis.com/EN/webapi/javascript/arcgis/help/jssamples_start.htm
... View more
08-31-2010
05:08 PM
|
0
|
0
|
367
|
|
POST
|
In your revised snippet you don't need to convert the point to web mercator if your featurelayer is in geographic. I ran a quick test using the code below and was able to add a point with no errors. Here's the code:
function addData(){
var x = dojo.byId('xval').value;
var y = dojo.byId('yval').value;
var point = new esri.geometry.Point(x,y,new esri.SpatialReference({wkid:4326}));
var graphic = new esri.Graphic(point,null,null);
featureLayer.applyEdits([graphic],null,null, function(addResults,updateResults,deleteResults) {
console.log("ObjectId = " + addResults[0].objectId);
},function(error){
console.log("error occurred");
});
}
... View more
08-25-2010
11:15 AM
|
0
|
0
|
777
|
|
POST
|
Perhaps there are some required attributes? If there are try setting them to see if it resolves the error. Here's an example that shows how to set attributes for the graphic.
var attributes = {};
attributes.SPEED = location.coords.speed;
attributes.ACCURACY = location.coords.accuracy;
attributes.DATETIME = now.getTime();
var pt = esri.geometry.geographicToWebMercator(new esri.geometry.Point(location.coords.longitude, location.coords.latitude));
var graphic = new esri.Graphic(new esri.geometry.Point(pt, map.spatialReference), null, attributes);
featureLayer.applyEdits([graphic], null, null, function(adds) {
... View more
08-25-2010
08:21 AM
|
0
|
0
|
777
|
|
POST
|
Yes you can build editing applications using the compact build. Some of the modules you need are not included but you can load them using dojo.require. For example to work with feature layers you would need to add the following: dojo.require("esri.layers.FeatureLayer");
... View more
08-25-2010
08:16 AM
|
0
|
0
|
386
|
|
POST
|
It's probably just a typo but thought I'd check just in case, in the code snippet below it looks like there's a space in Utility? esriDojo.require("MyModules.Utilities.MyTestUtilit y"); Hi, I can't get local modules to reload anymore with the namespace change. In the code below I can not get into init_2 (I get cross-domain loading errors), though the in-line dijit is created just fine. Hoping you can see where I have gone wrong without having to create your own test utility resource to try this one out. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>(esriDojo Testing)</title> <!-- styling --> <link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.0/js/dojo/dijit/themes/tundra/tundra.css"/> <!-- Set dojo configuration --> <script type="text/javascript"> djConfig = { isDebug: true, parseOnLoad: true, xdWaitSeconds: 10, scopeMap: [ ["dojo", "esriDojo"], ["dijit", "esriDijit"], ["dojox", "esriDojox"] ], baseUrl: "./", modulePaths: { "MyModules": "./MyModules" } }; </script> <!-- v2.0 uses Dojo v1.4.2 --> <script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.0"></script> <script type="text/javascript"> esriDojo.require("dijit.form.DropDownButton"); esriDojo.require("dijit.Menu"); esriDojo.addOnLoad(init_1); function init_1() { console.log("in init_1()"); esriDojo.require("MyModules.Utilities.MyTestUtility"); esriDojo.addOnLoad(init_2); } function init_2(){ console.log("in init_2()"); } </script> </head> <body class="tundra"> <button esriDojoType="dijit.form.DropDownButton"> <span>Test DDBtn</span> <div esriDojoType="dijit.Menu"> <div esriDojoType="dijit.MenuItem" label="Some menu item 1"> <script type="dojo/method" event="onClick" args="evt"> console.log("ok 1"); </script> </div> <div esriDojoType="dijit.MenuItem" label="Some menu item 2"> <script type="dojo/method" event="onClick" args="evt"> console.log("ok 2"); </script> </div> </div> </button> </body> </html> Loren
... View more
08-19-2010
08:39 AM
|
0
|
0
|
656
|
|
POST
|
Alex, Not sure if this is the issue but it's something to check out. In the showResults function the address candidates returned by the locater are converted from geographic to Web Mercator. However it looks like your map is using wkid 2264 not Web Mercator.
var geom = esri.geometry.geographicToWebMercator(candidate.location);
var graphic = new esri.Graphic(geom, symbol, attributes, infoTemplate);
... View more
08-17-2010
12:50 PM
|
0
|
0
|
378
|
|
POST
|
Loren, I ran a quick test and it works if you change the attribute dojoType to esriDojoType. Here's the revised code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>testing dojo Scope</title>
<!-- styling -->
<link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.0/js/dojo/dijit/themes/tundra/tundra.css"/>
<!-- Set dojo configuration -->
<script type="text/javascript">
djConfig = {
parseOnLoad: true,
scopeMap: [
["dojo", "esriDojo"],
["dijit", "esriDijit"],
["dojox", "esriDojox"]
]
};
</script>
<!-- v2.0 uses Dojo v1.4.2 -->
<script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.0"></script>
<script type="text/javascript">
esriDojo.require("dijit.form.DropDownButton");
esriDojo.require("dijit.Menu");
</script>
</head>
<body class="tundra">
<button esriDojoType="dijit.form.DropDownButton">
<span>Test DDBtn</span>
<div esriDojoType="dijit.Menu">
<div esriDojoType="dijit.MenuItem" label="Some menu item 1">
<script type="dojo/method" event="onClick" args="evt">
console.log("ok");
alert("ok");
</script>
</div>
<div esriDojoType="dijit.MenuItem" label="Some menu item 2">
<script type="dojo/method" event="onClick" args="evt">
console.log("ok");
alert("ok");
</script>
</div>
</div>
</button>
</body>
</html>
... View more
08-17-2010
12:25 PM
|
0
|
0
|
473
|
|
POST
|
Rob, It looks like the accordion pane you want to display the editor on is not visible when the application first loads. In cases like this you can create the editor widget the first time you show the editor panel, here's a snippet that shows this: var accordion = dijit.byId("myAccordionContainer");
dojo.connect(accordion, "selectChild", function(childPane) {
if(childPane.id === "paneEditor"){
if(!editorWidget){
var featureLayerInfos = dojo.map(results, function(result) {
return {'featureLayer':result.layer};
});
var layers = dojo.map(results,function(result) {
return result.layer;
});
var settings = {
map: map,
geometryService: new esri.tasks.GeometryService("http://sampleserver3.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer"),
layerInfos:featureLayerInfos
};
var params = {settings: settings};
editorWidget = new esri.dijit.editing.Editor(params,'editorDiv');
editorWidget.startup();
}
}
});
... View more
08-16-2010
09:43 AM
|
0
|
0
|
643
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 11-06-2025 03:23 PM | |
| 1 | 11-06-2025 03:21 PM | |
| 2 | 08-13-2025 09:41 AM | |
| 1 | 10-28-2025 09:58 AM | |
| 1 | 08-01-2025 10:08 AM |
| Online Status |
Offline
|
| Date Last Visited |
a week ago
|