|
POST
|
Thanks for the link. I see some applications there that are doing what i need to do as well. Thanks!
... View more
12-05-2018
11:53 AM
|
0
|
0
|
2046
|
|
POST
|
Would this be used like the upload shapefile, where it could upload the GeoTiff on the fly? For example, a person wants to upload the GeoTiff to see where their work area is, upload the GeoTiff, and zoom to it. Then they may want to upload a different one, one and on, etc.
... View more
12-05-2018
11:46 AM
|
0
|
2
|
2046
|
|
POST
|
Is there any way to upload a GeoTiff using the ArcGIS Portal API like this example for shapefiles? ArcGIS API for JavaScript Sandbox The client wants to be able to upload the GeoTiff and see it in the webmap. ArcGIS API for JavaScript ArcGIS API for JavaScript
... View more
12-05-2018
09:27 AM
|
0
|
5
|
2332
|
|
POST
|
Yes, a colleague of mine helped out. here is the .js require([ "esri/map", "esri/toolbars/edit", "esri/graphic", "esri/dijit/Measurement", "esri/units", "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", "esri/config", "dijit/form/ToggleButton", "dijit/form/DropDownButton", "dijit/CheckedMenuItem", "dijit/layout/BorderContainer", "dijit/layout/ContentPane", "dojo/domReady!" ], function( Map, Edit, Graphic, Measurement, Units, Point, Polyline, Polygon, SimpleLineSymbol, SimpleFillSymbol, TextSymbol, event, parser, dom, domStyle, registry, Menu, esriConfig ) { var editToolbar, map, measureToolbar parser.parse(); domStyle.set(registry.byId("mainWindow").domNode, "visibility", "visible"); esriConfig.defaults.geometryService = new esri.tasks.GeometryService("https://sampleserver6.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer"); map = new Map("map", { basemap: "streets", center: [3.955, 59.338], zoom: 3 }); map.on("load", function() { addTestingGraphics() createMeasurementTool() createEditingToolbar() }) function activateToolbar(graphic) { var tool = Edit.MOVE|Edit.EDIT_VERTICES|Edit.SCALE|Edit.ROTATE editToolbar.activate(tool, graphic); } function createMeasurementTool() { measureToolbar = new Measurement({ map: map, defaultAreaUnit: Units.SQUARE_MILES, defaultLengthUnit: Units.KILOMETERS }, dom.byId("measurementDiv") ) measureToolbar.startup() measureToolbar.on("measure-start",function(){ console.log("measuring has started") measureToolbar._isActive = true }) measureToolbar.on("measure-end",function(){ console.log("measuring has ended") measureToolbar._isActive = false }) measureToolbar.on("tool-change",function(){ console.log("measuring tool has changed, tool is reset") measureToolbar._isActive = false }) } function createEditingToolbar() { editToolbar = new Edit(map) map.graphics.on("click", function(evt) { if (!measureToolbar._isActive) { event.stop(evt) activateToolbar(evt.graphic) } }) map.on("click", function(evt){ editToolbar.deactivate() }) } function addTestingGraphics() { var polygonSymbol = new SimpleFillSymbol(); var text = new TextSymbol("Editable Text"); text.font.setSize("20pt"); 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} }) map.graphics.add(new Graphic(polygon, polygonSymbol)); map.graphics.add(new Graphic(arrow, polygonSymbol)); } })
... View more
10-18-2018
01:33 PM
|
0
|
0
|
855
|
|
POST
|
Edit Toolbar and Measure tool bar not working together. When one is activated it messes up the other. Any suggestions? <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"> <title>Edit Tools</title> <link rel="stylesheet" href="https://js.arcgis.com/3.26/dijit/themes/nihilo/nihilo.css"> <link rel="stylesheet" href="https://js.arcgis.com/3.26/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 ></script> <script> var map, editToolbar; require([ "esri/map", "esri/toolbars/edit", "esri/graphic", "esri/dijit/Measurement", "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,Measurement, 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); var measurement = new Measurement({ map: map }, dom.byId("measurementDiv")); measurement.startup(); 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(); }); } measurement.on("measure-end", function (evt) { this.setTool(evt.area, false); }); 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 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 } }); map.graphics.add(new Graphic(polygon, polygonSymbol)); map.graphics.add(new Graphic(arrow, polygonSymbol)); } 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 }; 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:150px;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 id="measureToolsContainer" data-dojo-type="dijit/layout/ContentPane" title="Measure">Measure Tools <br> <div id="measurementDiv"></div> </div> </div> <div id="map" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'center'"> </div> </div> </body> </html>
... View more
10-18-2018
09:54 AM
|
0
|
2
|
961
|
|
POST
|
Ken, Can i use this function to set the opacity of a single sub layer? I am using this to hide layers: tocEORI.findTOCNode(eoriLayers, 12).hide(); can i use something like that to set the opacity of that one layer?
... View more
08-11-2017
09:35 AM
|
0
|
2
|
1776
|
|
POST
|
Would be nice but most of the data is old and collected using standard GPS.
... View more
07-20-2017
12:18 PM
|
0
|
0
|
1592
|
|
POST
|
Thanks so much! This has saved me a lot of time. I am using Oil and Gas data (points) for horizontal wells. The data comes from the Wyoming Oil and Gas Commission. There is a top hole location and bottom hole location. The bottom hole locations are not always correct. So we have to pick the bottom bases on Electric Logs of the subsurface and determine what formation the well was completed in. So, the bottom hole location changes, maybe deeper or shallower. So the point moves. This way is a lot quicker to take the 2 points create a line and recalculate the length based on the new data. Thanks again!
... View more
07-20-2017
06:07 AM
|
1
|
2
|
1592
|
|
POST
|
What i mean to say is there is one start vertice and one end vertice
... View more
07-19-2017
11:19 AM
|
0
|
0
|
542
|
|
POST
|
Just the end of a single non-multipart line needs to be extended or retracted a distance
... View more
07-19-2017
11:18 AM
|
0
|
0
|
542
|
|
POST
|
How would i deal with negative values? i guess some of the lengths need to be shorter. I hadn't taken that into consideration.
... View more
07-19-2017
08:17 AM
|
0
|
15
|
3628
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 08-16-2022 11:47 AM | |
| 1 | 06-28-2017 06:36 AM | |
| 1 | 06-23-2016 06:54 AM | |
| 1 | 03-19-2015 01:21 PM | |
| 1 | 07-20-2017 06:07 AM |
| Online Status |
Offline
|
| Date Last Visited |
08-12-2025
07:31 AM
|