POST
|
Hi Terry, Have you tried calling "reposition()" / "resize(immediate?)" functions on Map object in map - load event. Thanks & Regards, Vara Prasad.
... View more
10-13-2014
10:56 PM
|
0
|
0
|
480
|
POST
|
Hi Vygintas, There is a property "textSymbolEditorHolder", which can be set in "options" list of parameters in the constructor of Edit Tool bar. 1. Include one div element in your html and set display as none for style, as below. <div id="txtSymbolEditorHolder" style="display: none;"></div> 2. Then, specify the id of this div element as value for the property "textSymbolEditorHolder", as below var options = { allowAddVertices: registry.byId("vtx_ca").checked, allowDeleteVertices: registry.byId("vtx_cd").checked, uniformScaling: registry.byId("uniform_scaling").checked, textSymbolEditorHolder: "txtSymbolEditorHolder" }; Then, the symbol editor will not be displayed. below is the updated code of the sampe you mentioned which does not display the symbol editor. ====================================================================================== <!DOCTYPE html> <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> Edit Tools </title> <link rel="stylesheet" href="http://js.arcgis.com/3.11/dijit/themes/nihilo/nihilo.css"> <link rel="stylesheet" href="http://js.arcgis.com/3.11/esri/css/esri.css"> <style> html, body, #mainWindow { font-family: sans-serif; height: 100%; width: 100%; } html, body { margin: 0; padding: 0; } #mainWindow { visibility: hidden; } </style> <script src="http://js.arcgis.com/3.11/"></script> <script> var map, editToolbar; require([ "esri/map", "esri/toolbars/edit", "esri/graphic", "esri/geometry/Point", "esri/geometry/Polyline", "esri/geometry/Polygon", "esri/symbols/SimpleLineSymbol", "esri/symbols/SimpleFillSymbol", "esri/symbols/TextSymbol", "dojo/_base/event", "dojo/parser", "dojo/dom", "dojo/dom-style", "dijit/registry", "dijit/Menu", "dijit/form/ToggleButton", "dijit/form/DropDownButton", "dijit/CheckedMenuItem", "dijit/layout/BorderContainer", "dijit/layout/ContentPane", "dojo/domReady!" ], function ( Map, Edit, Graphic, Point, Polyline, Polygon, SimpleLineSymbol, SimpleFillSymbol, TextSymbol, event, parser, dom, domStyle, registry, Menu ) { parser.parse(); domStyle.set(registry.byId("mainWindow").domNode, "visibility", "visible"); map = new Map("map", { basemap: "streets", center: [3.955, 59.338], zoom: 3 }); map.on("load", createToolbar); function createToolbar() { addGraphics(); editToolbar = new Edit(map); //Activate the toolbar when you click on a graphic map.graphics.on("click", function (evt) { event.stop(evt); activateToolbar(evt.graphic); }); //deactivate the toolbar when you click outside a graphic map.on("click", function (evt) { editToolbar.deactivate(); }); } function addGraphics() { //add pre-defined geometries to map var polygonSymbol = new SimpleFillSymbol(); var polylineSymbol = new SimpleLineSymbol(); var text = new TextSymbol("Editable Text"); text.font.setSize("20pt"); var polyline = new Polyline({ "paths": [ [ [-12484306, 7244028], [-7318386, 10061803], [-3013453, 10727111] ] ], "spatialReference": { "wkid": 102100 } }); var polygon = new Polygon({ "rings": [ [ [-4226661, 8496372], [-3835304, 8731187], [-2269873, 9005137], [-1213208, 8613780], [-1017529, 8065879], [-1213208, 7478843], [-2230738, 6891806], [-2935181, 6735263], [-3522218, 6891806], [-3952711, 7165757], [-4265797, 7283164], [-4304933, 7635386], [-4304933, 7674521], [-4226661, 8496372] ] ], "spatialReference": { "wkid": 102100 } }); var arrow = new Polygon({ "rings": [ [ [9862211, 6617856], [8922952, 5522055], [8922952, 5991684], [6105178, 5991684], [6105178, 7087485], [8922952, 7087485], [8922952, 7557114], [9862211, 6617856] ] ], "spatialReference": { "wkid": 102100 } }); var triangle = new Polygon({ "rings": [ [ [2426417, 8535508], [4304933, 12292541], [6183449, 8535508], [2426417, 8535508] ] ], "spatialReference": { "wkid": 102100 } }); var point = new Point(-40, 35); map.graphics.add(new Graphic(polyline, polylineSymbol)); map.graphics.add(new Graphic(polygon, polygonSymbol)); map.graphics.add(new Graphic(arrow, polygonSymbol)); map.graphics.add(new Graphic(triangle, polygonSymbol)); map.graphics.add(new Graphic(point, text)); } function activateToolbar(graphic) { var tool = 0; if (registry.byId("tool_move").checked) { tool = tool | Edit.MOVE; } if (registry.byId("tool_vertices").checked) { tool = tool | Edit.EDIT_VERTICES; } if (registry.byId("tool_scale").checked) { tool = tool | Edit.SCALE; } if (registry.byId("tool_rotate").checked) { tool = tool | Edit.ROTATE; } // enable text editing if a graphic uses a text symbol if (graphic.symbol.declaredClass === "esri.symbol.TextSymbol") { tool = tool | Edit.EDIT_TEXT; } //specify toolbar options var options = { allowAddVertices: registry.byId("vtx_ca").checked, allowDeleteVertices: registry.byId("vtx_cd").checked, uniformScaling: registry.byId("uniform_scaling").checked, textSymbolEditorHolder: "txtSymbolEditorHolder" }; editToolbar.activate(tool, graphic, options); } }); </script> </head> <body class="nihilo"> <div id="mainWindow" data-dojo-type="dijit/layout/BorderContainer" data-dojo-props="design:'headline', gutters:'false'"> <div id="header" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'top'" style="height:58px;text-align:left;font-weight:bold;font-size:14px;color:#400D12;"> <span>Specify options then click a graphic to edit the shape. Click outside the graphic to deactivate the toolbar.</span><br /> <div id="tool_move" data-dojo-type="dijit/form/ToggleButton" data-dojo-props="checked:'true', iconClass:'dijitCheckBoxIcon'">Move</div> <div id="tool_vertices" data-dojo-type="dijit/form/ToggleButton" data-dojo-props="checked:'true', iconClass:'dijitCheckBoxIcon'">Edit Vertices</div> <div id="tool_scale" data-dojo-type="dijit/form/ToggleButton" data-dojo-props="checked:'true', iconClass:'dijitCheckBoxIcon'">Scale</div> <div id="tool_rotate" data-dojo-type="dijit/form/ToggleButton" data-dojo-props="checked:'true', iconClass:'dijitCheckBoxIcon'">Rotate</div> <button data-dojo-type="dijit/form/DropDownButton" id="options" data-dojo-props="value:'options'"> <span>Options</span> <div data-dojo-type="dijit/Menu" id="optionsMenu"> <div id="vtx_ca" data-dojo-type="dijit/CheckedMenuItem" data-dojo-props="checked:'true'">Allow Add Vertices</div> <div id="vtx_cd" data-dojo-type="dijit/CheckedMenuItem" data-dojo-props="checked:'true'">Allow Delete Vertices</div> <div id="uniform_scaling" data-dojo-type="dijit/CheckedMenuItem" data-dojo-props="checked:'true'">Uniform Scaling when Resizing</div> </div> </button> </div> <div id="map" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'center'"> <div id="txtSymbolEditorHolder" style="display: none;"></div> </div> </div> </body> </html> ======================================================================================== Please let me know if it helped. Thanks & Regards, Vara Prasad.
... View more
10-13-2014
10:05 PM
|
0
|
0
|
670
|
POST
|
Hi Vygintas, Is it possible for you to provide any sample application? Thanks & Regards, Vara Prasad.
... View more
10-03-2014
10:18 PM
|
0
|
2
|
670
|
POST
|
Hi Michael, 1. Did you try calling "startUp" function of the tab container after creating it. 2. If it does not work, you may like to put the code to create tab container inside a "setTimeOut" function with time 0 ms also works sometimes. 3. Also, you can try keeping "dojo/domReady!" as a last item in the list of namespaces we write in "define" function and it does not need any alias name to be written. Thanks & Regards, Vara Prasad.
... View more
10-03-2014
10:11 PM
|
0
|
0
|
855
|
POST
|
Saurabh, Ok. I am testing with your code. I will get back to you ASAP.
... View more
10-01-2014
01:35 AM
|
0
|
2
|
675
|
POST
|
Hi Saurabh, I have done few tests in REST page of applyEdits operation (Apply Edits: jsontest.sde.CrossingFDCjason (ID: 0) ), by taking geometries available through service. I have created 3 geometries and got 401, 402, 403 as object id. Also tried deleting feature with object id 402. It got deleted successfully, also could update attributes of feature with objectid 401 Below are the values i have given for "adds", "updates" and "deletes" ================================================================================= For Adds: [ { "geometry": { "rings": [ [ [ 858258.6026999997, 2689861.4839999992 ], [ 858917.3973000003, 2690348.4316000007 ], [ 859243.65890000015, 2689514.8526000008 ], [ 858709.21710000001, 2689235.8118999992 ], [ 858258.6026999997, 2689861.4839999992 ] ] ] }, "attributes": { "crossingtype": "Road", "crossingname": "al ain dubai truck road", "completiondays": null, "alignmentsheetno": "", "partynamenoc1": "", "issuedatenoc1": null, "expirydatenoc1": null, "partynamenoc2": "", "issuedatenoc2": null, "expirydatenoc2": null, "chainagefrom": null, "chainageto": null, "consturctionmethod": null, "exacavationreportno": "", "exacavationdate": null, "exacavationlength": null, "hddreportno": "", "hdddate": null, "hddlength": null, "boringreportno": "", "boringdate": null, "boringlength": null, "casingpipepipeno": "", "casingpipeheatno": "", "insulationdate": null, "insulationstatus": null, "markertype": "", "markerdate": null, "completioncertifcateno": "", "completioncertifcatedate": null, "crossingstatus": "under construction", "isverified": "No", "easting": null, "northing": null } } ] ================================================================================= For Updates: [ { "attributes": { "objectid": 401, "crossingtype": "TestRoad", "crossingname": "al ain dubai truck road", "completiondays": null, "alignmentsheetno": "", "partynamenoc1": "", "issuedatenoc1": null, "expirydatenoc1": null, "partynamenoc2": "", "issuedatenoc2": null, "expirydatenoc2": null, "chainagefrom": null, "chainageto": null, "consturctionmethod": null, "exacavationreportno": "", "exacavationdate": null, "exacavationlength": null, "hddreportno": "", "hdddate": null, "hddlength": null, "boringreportno": "", "boringdate": null, "boringlength": null, "casingpipepipeno": "", "casingpipeheatno": "", "insulationdate": null, "insulationstatus": null, "markertype": "", "markerdate": null, "completioncertifcateno": "", "completioncertifcatedate": null, "crossingstatus": "under construction", "isverified": "No", "easting": null, "northing": null, "globalid": "{81FD3A20-6EC3-4FF4-8696-EFA71D4C8EB1}" } } ] ===================================================================================== For Deletes: (It requires just an array of objectids.) 402 Please let me know if i am not clear anywhere. Thanks & Regards, Vara Prasad.
... View more
10-01-2014
12:24 AM
|
0
|
4
|
675
|
POST
|
Hi Saurabh, I am sending a screen capture by highlighting the expanded results of the request ("applyEdits"). If you can please send me url, i will have a look at it. Thanks & Regards, Vara Prasad.
... View more
09-30-2014
10:29 PM
|
0
|
6
|
675
|
POST
|
Hi Stephen Lam, It might be possible, if we just keep adding the rings of other geometries to the Rings property of any one geometry. Also need to make sure that the units/spatialreference for the coordinates matches that of the map. Note: I have not tested this. It is just an idea. Please let me know if you get it working. Thanks & Regards, Vara Prasad.
... View more
09-30-2014
05:34 AM
|
0
|
1
|
1292
|
POST
|
No, we need not do anything on service side or server side. Did you update the objectids mentioned in arrays for Deletes for in both json objects for the two layers of feature service? Could you please expand the results for the request "applyEdits" and send me another screenshot. Thanks & Regards, Vara Prasad.
... View more
09-30-2014
04:55 AM
|
0
|
8
|
675
|
POST
|
Saurabh, Could you please try with below json array as input value and make sure to update the numbers (ObjectIds) mentioned for deletes to represent features of layers with ids 0 and 1. [ { "id" : 0, "adds" : [ ], "updates" : [ ], "deletes" : [ 19,23 ] }, { "id" : 1, "adds" : [ ], "updates" : [ ], "deletes" : [ 34,44 ] } ] Thanks & Regards, Vara Prasad.
... View more
09-30-2014
03:03 AM
|
0
|
10
|
887
|
POST
|
Hi Saurabh, I did not check your code earlier. Now I have verified it and found that the request string is not in correct syntax, expected by "applyEdits" of "Feature Service". Please go through the below url (ArcGIS Server REST API). http://resources.arcgis.com/en/help/rest/apiref/fsserviceedits.html In the above link, there is example/sample. After going through your old posts, i found that you are using the syntax which you have used for "UpdateFeatures" request. However, the syntax for "ApplyEdits" is completely different. Thanks & Regards, Vara Prasad.
... View more
09-30-2014
12:14 AM
|
0
|
12
|
887
|
POST
|
Hi Saurabh, Yes, definitely you can do this through a simple POST request approach. We can do both attribute updates, geometry updates, new feature creation, deletion by sending a POST request, just similar to calling "applyEdits" function. I have gone through your post in the mentioned link. It is required to use Proxy page for editing. Have you used any proxy page configured in your application. If not, please go through the below link https://developers.arcgis.com/javascript/jshelp/ags_proxy.html Please send me the error that you are facing, It helps me in identifying the issue. Thanks & Regards, Vara Prasad.
... View more
09-29-2014
11:59 PM
|
0
|
14
|
887
|
POST
|
Hi Justin Cornell, In JS API, below is the order of the type of layers added/rendered on map. 1. Graphic Layers (Top) 2. Dynamic Map Services 3. Tiled Map Services (Bottom) We can re order a Graphic Layer only among the graphic layers added to the map. Thanks & Regards, Vara Prasad.
... View more
09-29-2014
11:40 PM
|
1
|
1
|
474
|
POST
|
Hi Ediberto Alves & Saurabh Gupta, You can follow the below procedure. 1. Create objects for both the featurelayers of your Feature server service using "FeatureLayer" class as shown in below example. var landuseLineLayer = new FeatureLayer("http://sampleserver6.arcgisonline.com/arcgis/rest/services/Military/FeatureServer/8", { mode: FeatureLayer.MODE_SNAPSHOT, outFields: ["*"] }); 2. Now create Graphic objects to be inserted into the feature Layers, add call "applyEdits" by passing the array of the Graphic objects as first parameter. 3. To Update any features, pass the array objects of the features interms of objects of Graphics as second parameter to "applyEdits" function. 4. To Delete, pass the array of graphic objects as third parameter to "applyEdits" function. Example: <featureLayerObj>.applyEdits(addGraphicsArr, updateGraphicsArr , deleteGraphicsArr); Please let me know if you are looking for something else or you need any more details. Thanks & Regards, Vara Prasad.
... View more
09-29-2014
11:18 PM
|
0
|
16
|
887
|
POST
|
Thanks Brett! It solved my issue. (FYI for others who are facing the same issue, The "id" is case sensitive. We should provide in small letters.) With Regards, Vara Prasad.
... View more
08-01-2014
12:10 AM
|
0
|
0
|
1243
|
Title | Kudos | Posted |
---|---|---|
1 | 04-22-2024 03:53 AM | |
1 | 04-10-2023 09:21 PM | |
1 | 03-20-2023 10:37 PM | |
1 | 03-07-2023 08:33 AM | |
1 | 01-28-2021 06:50 AM |
Online Status |
Offline
|
Date Last Visited |
04-22-2024
12:10 PM
|