|
POST
|
usePost is in options parameter, not in request: (see http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/namespace_esri.htm)
esri.request({
url: soeURL,
content: content,
callbackParamName: "callback",
load: function(response) {
listFeatureDetails(response);
},
error: function(error) {
console.log(error);
}
}, {usePost: true});
From soe you can serialize polygon (arcobjects) and send to client deserialized (json):
JsonObject jsonPolygon;
if (!operationInput.TryGetJsonObject("myNameParameter", out jsonPolygon))
throw new ArgumentNullException("myNameParameter");
//deserialize
IPolygon pg= Conversion.ToGeometry(jsonPoint, esriGeometryType.esriGeometryPolygon) as IPolygon;
....
//serialize polygon (for example)
JsonObject jsonObjectGeometry = Conversion.ToJsonObject(myPolygon);
JsonObject resultJsonObject = new JsonObject();
resultJsonObject.AddJsonObject("geometry", jsonObjectGeometry);
...
// Get byte array of json and return results
byte[] result = Encoding.UTF8.GetBytes(resultJsonObject.ToJson());
return result;
from client send polygon in esri.request
var polygon = dojo.toJson(mygeometry.toJson())
from client deserialize polygon
var polygon = new esri.geometry.Polygon(polygonJson);
... View more
03-29-2012
12:29 AM
|
0
|
0
|
1198
|
|
POST
|
I don't know these projection but:Is features an array of geometry with spatial reference set?
gsvc.project([ point ], outSR, function(projectedPoints) {
pt = projectedPoints[0];
});
if you must do transformation of datum you can use 10.1 with (for now) esri.request:
var g = { geometryType:"esriGeometryPoint", geometries:[wgsPt.toJson()] };
var params = { f:"json", geometries:dojo.toJson(g), inSR:4326,
outSR:map.spatialReference.wkid, transformation:1660, transformForward:false
};
var requestHandle = esri.request({
url:"http://servicesbeta4.esri.com/arcgis/rest/services/Geometry/GeometryServer/Project",
content:params,
callbackParamName:"callback",
load:dojo.hitch(dojo.mixins(this, {lat:lat, lon:lon}), "OnSuccessProject")
}, {useProxy:false});
... View more
03-27-2012
11:43 PM
|
0
|
0
|
1527
|
|
POST
|
here you see samples of routing: http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples/routetask_find_route.html http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples/routetask_multiple_stops.html
... View more
03-27-2012
11:26 PM
|
0
|
0
|
405
|
|
POST
|
Have you tried esri.symbol.fromJson() ? var duplicate = esri.symbol.fromJson(simpleMarkerSymbol.toJson());
... View more
03-27-2012
11:23 PM
|
0
|
0
|
912
|
|
POST
|
when you, for example, write a property esri.symbol.SimpleLineSymbol.style (enumerator) ( underlying you are writing in this sample a string) for be understood from code must have access at this definition.
var cls = new esri.symbol.CartographicLineSymbol(esri.symbol.CartographicLineSymbol.STYLE_SOLID,
new dojo.Color([255,0,0]), 10, esri.symbol.CartographicLineSymbol.CAP_ROUND,
esri.symbol.CartographicLineSymbol.JOIN_MITER, 5);
console.debug(cls.toJson());
here you can see the result (example style) style: "esriSLSSolid" esriSLSSolid is the constant string in enumerator arcobject for style esriSimpleLineStyle http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/001w/001w0000003m000000.htm
... View more
03-27-2012
10:00 AM
|
0
|
0
|
912
|
|
POST
|
for error when you call 'more than 50' do you use in esri.request option: usePost?
var requestHandle = esri.request({
url: url.path,
content: url.query,
..
}, {usePost:true});
for intersect: can you post part of code for soe or give me futher details what do you do in soe?
... View more
03-27-2012
08:46 AM
|
0
|
0
|
1198
|
|
POST
|
I have exposed this functionality via rest ( http://resources.arcgis.com/gallery/file/arcobjects-net-api/details?entryID=46F00F42-1422-2418-7F40-F039E02AA2F7 ) so you can use code like: http://rexdotnet.blogspot.it/2009/11/using-arcgis-server-rest-api-in-net.html for call rest via application (add-in ArcGIS explorer)
... View more
03-27-2012
07:14 AM
|
0
|
0
|
599
|
|
POST
|
I have used IJSONWriter and IJSONSerializer and seems ESRI uses these (seeing the methods of interface). http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#//004200000108000000 http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/0042/004200000105000000.htm
... View more
03-26-2012
10:46 PM
|
0
|
0
|
632
|
|
POST
|
A solution is creating a gp that it creates two output a service area (you draw on client) and zip file with shapefile. Then you call from client gp.
... View more
03-26-2012
10:40 PM
|
0
|
0
|
1198
|
|
POST
|
you try see http://odoe.net/blog/?p=187 http://esritogeo.herokuapp.com/ an alternative you can create a soe/gp and using data interoperability server extension that I remember convert in geojson 1.0.
... View more
03-21-2012
12:48 AM
|
0
|
0
|
971
|
|
POST
|
your services pass to proxy ( esri.config.defaults.io.alwaysUseProxy = true; it is need if you have service protect) but in proxy you decide what do you want to do (if service isn't protect you don't need ask a token).
... View more
03-21-2012
12:40 AM
|
0
|
0
|
359
|
|
POST
|
you can read your json with: -esri.request (see sample http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples/data_requestJson.html) -build the point with esri.geometry.Point(json)
var point = new esri.geometry.Point( {"x": -122.65, "y": 45.53," spatialReference": {" wkid": 4326 } });
-build graphic var simpleMarkerSymbol = new esri.symbol.SimpleMarkerSymbol(); var graphic = new esri.Graphic(point, simpleMarkerSymbol); -add in map map.graphics.add(graphic);
... View more
03-21-2012
12:30 AM
|
0
|
0
|
761
|
|
POST
|
if you do the request direct to rest have you same problem (see in firebug net or fiddler the request)?
... View more
03-21-2012
12:22 AM
|
0
|
0
|
391
|
|
POST
|
However if you want call a method in a given scope use dojo.hitch http://dojotoolkit.org/reference-guide/1.7/dojo/hitch.html (see sample < 1.7) also here there is an example: http://www.ibm.com/developerworks/web/library/wa-aj-dojo/
... View more
03-21-2012
12:18 AM
|
0
|
0
|
872
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 06-20-2024 11:20 AM | |
| 1 | 05-25-2017 10:11 AM | |
| 1 | 06-20-2023 12:09 AM | |
| 1 | 10-14-2022 05:14 AM | |
| 1 | 06-14-2023 02:00 AM |
| Online Status |
Offline
|
| Date Last Visited |
Wednesday
|