|
POST
|
I've not had an issue - here's my code for a collapsed at start bottom pane
<div dojotype="dojox.layout.ExpandoPane"
splitter="true"
duration="125"
region="bottom"
title=""
startexpanded="false"
id="footer"
maxwidth="275"
style="height: 150px;">
<div id='xxx' class='ref'></div>
</div>
... View more
02-27-2013
12:17 AM
|
0
|
0
|
2707
|
|
POST
|
Yes - we use it fine - after creating a brand new Enterprise 10.1 database - that was what was holding me back. Ensure that the account you use in the MXD. Service has the required rights and that they are being passed through OK. Set AGS logging to debug and take a look at everything that may be relevant (you may see failed attempts to edit or bad logins) - if you are using MS SQL switch on all the logging tools there to see if there are any failed write attempts. Sacrifice the relevant amount of small furry animals to the dark gods. Good luck ACM
... View more
02-20-2013
11:30 PM
|
0
|
0
|
2916
|
|
POST
|
Hi - old thread revival - I'm trying to get the Id task to get values from a DTM stored as a raster/grid. The ID task brings back data, but doesn't return layername or field names -
displayFieldName: ""
feature: Object
attributes: Object
Pixel Value: "98.396004"
Stretched value: "92"
__proto__: Object
geometry: Object
infoTemplate: undefined
symbol: null
__proto__: Object
geometryType: "esriGeometryPoint"
layerId: 43
layerName: ""
Any ideas how to work round this - have I missed something here? Cheers ACM
... View more
02-20-2013
12:11 AM
|
0
|
0
|
861
|
|
POST
|
To add to this. Esri tend to take a world view of things, alas. To many, such as us in the UK, we take a local view. ALL our data is in WKID 27700 - British National Grid - which is a simpla(ish) XY system, in METRES (note spelling) from a point in the Atlantic. The only co-ordinate system most of our users will ever come across will be this. They need to be able to give co-ordinates out in metres and be able to get them in. Using Long Lats, or any other world projection just confuses the issue and I have to do conversions (in ArcIMS days 100+ lines of code, in AGS days, about 5) So please can the Measurement Widget be set to use the co-ordinate system of the map and return in the units it uses. Cheers ACM
... View more
02-14-2013
10:19 PM
|
0
|
0
|
1533
|
|
POST
|
If you are stuck on IE7 (bad luck) and can install IE plugins then rather than the one above (which looks interesting) why no go the whole way and use Google Chrome Frame which will give you the Chrome experiance, but within an IE container - which will remain IE for the majority of sites. I'm about to deploy this internally until we can get of XP/IE8
... View more
02-11-2013
09:11 AM
|
0
|
0
|
1938
|
|
POST
|
Thanks for that - I realize I probably need the projecyt method - however what the post was really about was the mis-match between thing and the snippet the (it is under the esri.geometry.lngLatToXY but the snippet is for XYTolngLat. Cheers ACM
... View more
02-07-2013
11:22 PM
|
0
|
0
|
932
|
|
POST
|
OK - late in the day here but on http://help.arcgis.com/en/webapi/javascript/arcgis/jsapi/#namespace_geometry/esri.geometry.lngLatToXY For esri.geometry.lngLatToXY(long, lat, isLinear) the example is
var normalizedVal = esri.geometry.xyToLngLat(42215329, 1321748);
console.log(normalizedVal); //returns 19.226, 11.789
var value = esri.geometry.xyToLngLat(42215329, 1321748, true);
console.log(value); // returns 379.22, 11.78 But the part for esri.geometry.xyToLngLat(long, lat) has no examples Am I just confused? All I am trying to do is use these to go from UK WKID (27700) to google map friendly co-ordinates (I realise there may be a small error, but all I need is a good approximation) Cheers ACM
... View more
02-07-2013
06:59 AM
|
0
|
3
|
1497
|
|
POST
|
Diana - success! 😉
function deleteRecords() {
//build query filter
var query = new esri.tasks.Query();
query.returnGeometry = true;
query.outFields = ["*"];
query.outSpatialReference = { "wkid": 27700 };
query.where = "PROCESS = 'Report Dead Animal'";
// Query for the features with the given object ID
pointsOfInterestD.queryFeatures(query, function (featureSet) {
var graphics = featureSet.features;
pointsOfInterestD.applyEdits(null, null, graphics, function (deletes) {
console.debug(deletes.length)
},
function errCallback(err) {
alert(err);
})
});
} Deletes those features I need - as you suggested the feature layer is define and added outside this function (in the init function) I now need to plumb in the exact delete requirements (as all the dead animals are gone!) - sorry, but as I'm not the OP I can't mark as answered, but I am sure this will meet the OP's requirements as well. Many thanks for your help. ACM PS - FYI after getting working I removed the map.adlayers for my featurelayer and it still works.
... View more
01-29-2013
06:22 AM
|
0
|
0
|
3524
|
|
POST
|
Ah - that looks sound - I see now not needing the querytask is a good thing - I'll try tomorrow. Many thanks ACM
... View more
01-28-2013
11:14 AM
|
0
|
0
|
3524
|
|
POST
|
Seems fine to me using the only Win 7 IE10 [ATTACH=CONFIG]21137[/ATTACH] Are there any console error messages?
... View more
01-28-2013
09:43 AM
|
0
|
0
|
1583
|
|
POST
|
Nope - my code now looks like function deleteRecords() { var queryTask = new esri.tasks.QueryTask("http://xxx/gis2/arcgis/rest/services/LIVEinternal/DeleteLaganCase/FeatureServer/0");
//build query filter
var query = new esri.tasks.Query();
query.returnGeometry = true;
query.outFields = ["*"];
query.outSpatialReference = { "wkid": 27700 };
query.where = "PROCESS = 'Report Dead Animal'";
queryTask.execute(query, doDelete);
}
function doDelete(featureset) {
var pointsOfInterestD = new esri.layers.FeatureLayer("http://xxx/arcgis/rest/services/LIVEinternal/DeleteLaganCase/FeatureServer/0", {
mode: esri.layers.FeatureLayer.MODE_ONDEMAND,
outFields: ["*"]
});
map.addLayers([pointsOfInterestD]);
var graphics = featureset.features;
console.debug(graphics)
pointsOfInterestD.applyEdits(null, null, graphics, function onComplete(adds, updates, deletes) {
console.debug(deletes.length)
if (deletes.length > 0) {
alert("deletes : " + JSON.stringify(deletes));
}
},
function errCallback(err) {
alert(err);
});
} Still the console.debug(graphics) returns several objects (with geometry and attributes), but the console.debug(deletes.length) returns 0 very strange
... View more
01-28-2013
08:36 AM
|
0
|
0
|
3524
|
|
POST
|
Cheers - the feature layer I delete from I have set up just for this purpose - the layer the users add records has all the records filtered out (for now), as I don't want a complex edit template - once I have worked out how to delete records without using the editor widget I'll move on to adding them. (and I have tried adding this one to the map as well as per you earlier post 🙂 ) I'm at home now,so can't play with the geometry thing - any good samples you can point to - no problem if not, I'll have a good look later. Cheers ACM edit Doh! I see what you mean the false in the return geometry - maybe a quick look now.
... View more
01-28-2013
08:22 AM
|
0
|
0
|
3524
|
|
POST
|
Diana - thanks for the advice to the OP - My code is similar now after your last answer -
function deleteRecords()
{
var queryTask = new esri.tasks.QueryTask("http://xxx/arcgis/rest/services/LIVEinternal/DeleteLaganCase/FeatureServer/0");
//build query filter
var query = new esri.tasks.Query();
query.returnGeometry = false;
query.outFields = ["*"];
query.outSpatialReference = { "wkid": 27700 };
query.where = "PROCESS = 'Report Dead Animal'";
queryTask.execute(query,doDelete);
}
function doDelete(featureset) {
var pointsOfInterestD = new esri.layers.FeatureLayer("http://xxx/arcgis/rest/services/LIVEinternal/DeleteLaganCase/FeatureServer/0", {
mode: esri.layers.FeatureLayer.MODE_ONDEMAND,
outFields: ["*"]
});
var graphics = featureset.features;
console.debug(graphics)
pointsOfInterestD.applyEdits(null, null, graphics, function onComplete(adds, updates, deletes) {
console.debug(deletes.length)
if (deletes.length > 0) {
alert("deletes : " + JSON.stringify(deletes));
}
},
function errCallback(err) {
alert(err);
});
}
I've added the OP's oncomplete part - number of deletes = 0, no errors. However, using the same code, but making it an insert works fine. I'm guessing it is something to do with the OBJECTID, but can't see what - here's the result from the console when I ask it toreturn the graphic object [Object, Object]
0: Object
attributes: Object
CASEID: 101000243048
OBJECTID: 13608
PROCESS: "Report Dead Animal"
__proto__: Object
geometry: Object
infoTemplate: undefined
symbol: undefined
__proto__: Object
1: Object
length: 2
__proto__: Array[0]
Any ideas? Cheers ACM PS using http://xxx/arcgis/rest/services/LIVEinternal/DeleteLaganCase/FeatureServer/0/deleteFeatures Interface, I can delete the records with the OBJECTID returned - but it fails in the code - so I would say it is a valid OBJECTID and the service allows deletes.
... View more
01-28-2013
02:12 AM
|
0
|
0
|
3524
|
|
POST
|
I'm trying to do something similar - add a button that deletes all features that meet a entered requirement - not having much luck - I think it is something in the query- not got as far as actually sending the deletes but this is what I have function deleteRecords(){
var queryTask = new esri.tasks.QueryTask("http://<server stuff>/FeatureServer/0");
//build query filter
var query = new esri.tasks.Query();
query.returnGeometry = false;
query.outFields = ["PROCESS"];
query.outSpatialReference = { "wkid": 27700 };
query.where = "PROCESS = 'Report Dead Animal'";
queryTask.execute(query,doDelete);
}
function doDelete(featureset) {
console.debug(featureset.features)
var symbol = new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([255,255,255,0.35]), 1),new dojo.Color([125,125,125,0.35]));
//QueryTask returns a featureSet. Loop through features in the featureSet and add them to the map.
dojo.forEach(featureSet.features,function(feature){
alert("yay")
var graphic = feature;
graphic.setSymbol(symbol);
graphic.setInfoTemplate(infoTemplate);
map.graphics.add(graphic);
});
} The "console.debug(featureset.features)" shows 5 objects, which is correct, but then I get no alert("yay") - which I should. Ideas? ACM
... View more
01-25-2013
06:20 AM
|
0
|
0
|
3524
|
|
POST
|
So, is refresh() an undocumented method of ArcGISDynamicMapServiceLayer? it certainly seems to do what it says?
... View more
01-17-2013
04:03 AM
|
0
|
0
|
1773
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 08-28-2025 01:14 AM | |
| 1 | 12-01-2023 06:07 AM | |
| 2 | 11-29-2024 04:32 AM | |
| 1 | 05-28-2024 12:50 AM | |
| 1 | 03-16-2023 06:46 AM |
| Online Status |
Offline
|
| Date Last Visited |
yesterday
|