|
POST
|
Hi Egge, Yes you are right i have already posted the same question twice but no answer received from anyone. I want to change the color and size because its the demand of my project. I am not using any editor widget, instead i am creating my own symbol of polygon like below: function createSymbol(color, style, width, outlineColor) { return { type: "simple-fill", style: style, color: color, outline: { color: outlineColor, width: width, style: "dash" } }; }//End createSymbol
... View more
03-17-2020
09:16 PM
|
0
|
1
|
1648
|
|
POST
|
Hi ken, this time i summed it up but due to this bolded code to calculate area, my whole map stops working. No error in console even. No area consoled even. function calculateArea(){ var rings_for_area=[]; var k=0; graphicsLayer.graphics.map(function(grap){ var updatedGeometry = webMercatorUtils.webMercatorToGeographic(grap.geometry); var rings_area = updatedGeometry.rings; rings_for_area = []; rings_area.forEach(function(ring, i) { rings_for_area =ring; k++; }); }); console.log(rings_for_area); var area = geometryEngine.geodesicArea(rings_for_area, "hectares"); console.log(area); }//End calculateArea
... View more
03-17-2020
09:05 PM
|
0
|
0
|
3982
|
|
POST
|
Then how can i work with multiple editable polygons or graphics. Is their any other editing option in arcgis 4.14 for polygons , i just want to make everthing editable everytime
... View more
03-17-2020
06:19 AM
|
0
|
1
|
543
|
|
POST
|
Is their any other way to make all polygons appear editable everytime, even when i automatically appear on map on click first time
... View more
03-17-2020
06:10 AM
|
0
|
3
|
2283
|
|
POST
|
Hi Noah , I m trying to get geometry of all polygons from a map with below code, but doen't get rings area in console. function calculateArea(){ graphicsLayer.graphics.map(function(grap){ var updatedGeometry = webMercatorUtils.webMercatorToGeographic(grap.geometry); var rings_for_area = updatedGeometry.rings; console.log(rings_for_area);//return all rings }); var area = geometryEngine.geodesicArea(rings_for_area, "hectares"); console.log(area);//doesn't return area }
... View more
03-16-2020
11:09 PM
|
0
|
12
|
3982
|
|
POST
|
Hi want to change color and size of vertex of polygon
... View more
03-16-2020
09:03 PM
|
0
|
5
|
1725
|
|
POST
|
Hi Rob, Can you please tell me how to make it editable when it first appear, IT IS THE LAST TASK OF POLYGONS, JUST TO MAKE THEM EDITABLE WHEN THEY APPEAR AUTOMATICALLY.
... View more
03-16-2020
08:59 PM
|
0
|
6
|
2283
|
|
POST
|
Hi i want to calculate area of polygons drawn on map geometry, any arcgis sample will be helpful
... View more
03-16-2020
06:11 AM
|
0
|
16
|
5688
|
|
POST
|
Do anyone know how to change vertex style like its color and size, i couldn't find any link on it
... View more
03-16-2020
03:37 AM
|
0
|
0
|
578
|
|
POST
|
Hi rob finally i able to save and display all rings but they do not appear editable when they first appear, i have to click them to make them editable.
... View more
03-16-2020
02:46 AM
|
0
|
0
|
2283
|
|
POST
|
==>I couldn't find the path of rings in the object returned in console like i have been getting in object reshape event below. =======> //listen to reshape-stop event get updated geometry pylgon vertics and pass through ajax /*const eventInfo = event.toolEventInfo; if (eventInfo && eventInfo.type.includes("reshape")) { if(eventInfo.type=='reshape-stop'){ var updatedGeometry= webMercatorUtils.webMercatorToGeographic(event.graphics[0].geometry); rings = updatedGeometry.__accessor__.store._values.rings; } }*/ When i go to accessor->store->values-> . It have more geometry attributes and have no ring coordinates. Whereever i find the ring parameter in console, it contains different value. ==>Whenever a new polygon appeared on click or when i click on screen it after clear all do not return any object and before click on clearall return objects which do not have any rings value Kindly help me to get latest rings(either reshape or updated) of all polygons that appear on screen. Also how to make them editable. I have been trying to console rings here: ======> function onGraphicUpdate(event) { // get the graphic as it is being updated const graphic = event.graphics[0]; //Do i need to perform loop over // check if the update event's the toolEventInfo.type is move then stop move event if (event.toolEventInfo && event.toolEventInfo.type.includes("move")){ sketchViewModel.cancel(); } // If toolEventInfo.type is reshape-stop then it means user finished moving or reshaping the graphic, call complete method. This will change update event state to complete and we will check the validity of the graphic location. if ( event.toolEventInfo && (event.toolEventInfo.type === "move-stop" || event.toolEventInfo.type === "reshape-stop") ) { sketchViewModel.complete(); } else if (event.state === "cancel" || event.state === "complete") { //check if the graphics are done being reshaped, printout updated graphic's geometry and reshape stage. // graphic reshaping has been completed or cancelled sketchViewModel.update([graphic], { tool: "reshape" }); }else { graphic.symbol = validSymbol; } graphicsLayer.graphics.map(function(gra){ //do something with the gra (graphic) console.log("====>"); console.log(gra); }); }
... View more
03-13-2020
01:07 AM
|
0
|
10
|
2283
|
|
POST
|
Ok Rob, it worked but i am using a single graphics layer which is used everywhere and added it to webmap, then how can u say it is added to different graphics layer. same webmap added to view. same graphics layer used in sketch view model. on graohicslayer newDevelopmentGraphic is also added // graphicsLayer = new GraphicsLayer(); webmap.add(graphicsLayer); // Create a new instance of sketchViewModel sketchViewModel = new SketchViewModel({ view: view, layer: graphicsLayer, // graphicsLayer.addMany([newDevelopmentGraphic]);
... View more
03-12-2020
10:14 PM
|
0
|
1
|
12446
|
|
POST
|
Currently, I am showing dynamic polygon on click of map by getting its lat long but i also want to show them editable. Query: do reshape stop method get geometry of all polygons appeared dynamically or is their any other way to store ring coordinates of all dynamically appeared polygons.
... View more
03-12-2020
06:08 AM
|
0
|
12
|
2985
|
|
POST
|
No error is in console. As you can see in code it is being added to graphics layer
... View more
03-12-2020
05:47 AM
|
0
|
6
|
12446
|
|
POST
|
Hi, i get the following link How to remove all graphics from view to remove graphics from layer. I also want to remove all polygons from graphics layer but its not working in my case as below: //Clear all graphics jQuery('#main').on('click', '.clear_all', function(){ view.graphics.removeAll(); });
... View more
03-11-2020
11:57 PM
|
0
|
8
|
12857
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 12-28-2020 10:30 PM | |
| 1 | 12-27-2020 09:03 PM | |
| 1 | 05-17-2020 10:15 PM | |
| 2 | 04-21-2020 10:39 PM | |
| 3 | 09-09-2020 08:44 PM |
| Online Status |
Offline
|
| Date Last Visited |
04-30-2024
05:15 AM
|