IDEA
|
If esri can build or change the javascript library into Dart that be even better. The reason I say this is because Dart compiles into JavaScript. If the sdk or library is created in Dart there is no need to create plugins and it be way faster to build on flutter.
... View more
09-12-2019
01:54 PM
|
0
|
0
|
442
|
IDEA
|
If esri can build or change the javascript library into Dart that be even better. The reason I say this is because Dart compiles into JavaScript. If the sdk or library is created in Dart there is no need to create plugins and it be way faster to build on flutter.
... View more
09-12-2019
01:54 PM
|
0
|
0
|
65
|
IDEA
|
It would be nice to georeference on the web. In my organization uses it a lot. If the option for the JavaScript to incorporate into the API would be awesome.##
... View more
04-10-2019
06:47 AM
|
1
|
0
|
167
|
IDEA
|
It would be nice to georeference on the web. In my organization uses it a lot. If the option for the JavaScript to incorporate into the API would be awesome.##
... View more
04-10-2019
06:47 AM
|
1
|
0
|
182
|
POST
|
I am adding a updated version of the code using AMD for anyone that is interested using. The one I provided was Legacy Dojo using dojo.connects. I just wrote this five minutes ago. With this one you don't have to worry were the listener goes inside the function. This is a working exmaple. The way it works once you click on the map to add a point then before apply edits executes and in there you tell javascript to edit a particular field automatic. It auto populates that field. Look for the listener that say before-apply-edits and I apply it to a particular attribute. My Contact information: email: hchapa@lrgvdc911.org phone: 956-682-3481 ext. 143 <!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 rivers and waterbodies</title> <link rel="stylesheet" href=" https://js.arcgis.com/3.16/dijit/themes/claro/claro.css "> <link rel="stylesheet" href=" https://js.arcgis.com/3.16/esri/css/esri.css "> <style> html,body{height:100%;width:100%;margin:0;overflow:hidden;} #map{ padding:0; } #header{ font-size: 1.1em; font-family: sans-serif; padding-left: 1em; padding-top:4px; color:#660000; } .templatePicker { border: none; } .dj_ie .infowindow .window .top .right .user .content { position: relative; } .dj_ie .simpleInfoWindow .content { position: relative; } </style> <script src=" https://js.arcgis.com/3.16/ "></script> <script> var map; require([ "esri/map", "esri/tasks/GeometryService", "esri/layers/ArcGISTiledMapServiceLayer", "esri/layers/FeatureLayer", "esri/Color", "esri/symbols/SimpleMarkerSymbol", "esri/symbols/SimpleLineSymbol", "esri/dijit/editing/Editor", "esri/dijit/editing/TemplatePicker", "esri/config", "dojo/i18n!esri/nls/jsapi", "dojo/_base/array", "dojo/parser", "dojo/keys", "dijit/layout/BorderContainer", "dijit/layout/ContentPane", "dojo/domReady!" ], function( Map, GeometryService, ArcGISTiledMapServiceLayer, FeatureLayer, Color, SimpleMarkerSymbol, SimpleLineSymbol, Editor, TemplatePicker, esriConfig, jsapiBundle, arrayUtils, parser, keys ) { parser.parse(); // snapping is enabled for this sample - change the tooltip to reflect this jsapiBundle.toolbars.draw.start = jsapiBundle.toolbars.draw.start + "<br>Press <b>ALT</b> to enable snapping"; // refer to "Using the Proxy Page" for more information: https://developers.arcgis.com/javascript/3/jshelp/ags_proxy.html esriConfig.defaults.io.proxyUrl = "/proxy/"; //This service is for development and testing purposes only. We recommend that you create your own geometry service for use within your applications. esriConfig.defaults.geometryService = new GeometryService(" https://utility.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer "); map = new Map("map", { basemap: "satellite", center: [-96.541, 38.351], zoom: 14, slider: false }); map.on("layers-add-result", initEditor); //add boundaries and place names var labels = new ArcGISTiledMapServiceLayer(" https://server.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places/MapServer "); map.addLayer(labels); var responsePoints = new FeatureLayer(" https://sampleserver6.arcgisonline.com/arcgis/rest/services/Wildfire/FeatureServer/0 ", { mode: FeatureLayer.MODE_ONDEMAND, outFields: ['*'] }); var responsePolys = new FeatureLayer(" https://sampleserver6.arcgisonline.com/arcgis/rest/services/Wildfire/FeatureServer/2 ", { mode: FeatureLayer.MODE_ONDEMAND, outFields: ['*'] }); map.addLayers([responsePolys, responsePoints]); responsePoints.on("before-apply-edits", function(evt){ console.log(evt); if(evt.adds[0]) { //Here you choose which attribute to update... evt.adds[0].attributes.description = "Testing this one out works fine"; } }); function initEditor(evt) { var templateLayers = arrayUtils.map(evt.layers, function(result){ return result.layer; }); var templatePicker = new TemplatePicker({ featureLayers: templateLayers, grouping: true, rows: "auto", columns: 3 }, "templateDiv"); templatePicker.startup(); var layers = arrayUtils.map(evt.layers, function(result) { return { featureLayer: result.layer }; }); var settings = { map: map, templatePicker: templatePicker, layerInfos: layers, toolbarVisible: true, createOptions: { polylineDrawTools:[ Editor.CREATE_TOOL_FREEHAND_POLYLINE ], polygonDrawTools: [ Editor.CREATE_TOOL_FREEHAND_POLYGON, Editor.CREATE_TOOL_CIRCLE, Editor.CREATE_TOOL_TRIANGLE, Editor.CREATE_TOOL_RECTANGLE ] }, toolbarOptions: { reshapeVisible: true } }; var params = { settings: settings }; var myEditor = new Editor(params, 'editorDiv'); //define snapping options var symbol = new SimpleMarkerSymbol( SimpleMarkerSymbol.STYLE_CROSS, 15, new SimpleLineSymbol( SimpleLineSymbol.STYLE_SOLID, new Color([255, 0, 0, 0.5]), 5 ), null ); map.enableSnapping({ snapPointSymbol: symbol, tolerance: 20, snapKey: keys.ALT }); myEditor.startup(); } }); </script> </head> <body class="claro"> <div id="main" data-dojo-type="dijit/layout/BorderContainer" data-dojo-props="design:'headline'" style="height:width:100%;height:100%;"> <div data-dojo-type="dijit/layout/ContentPane" id="header" data-dojo-props="region:'top'"> Edit Hydrography </div> <div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'left'" style="width: 300px;overflow:hidden;"> <div id="templateDiv"></div> <div id="editorDiv"></div> </div> <div data-dojo-type="dijit/layout/ContentPane" id="map" data-dojo-props="region:'center'"></div> </div> </body> </html>
... View more
05-17-2016
06:10 AM
|
0
|
0
|
20
|
POST
|
I believe that maptips are design with the hover view and they close automatically when the use loses focus.. I went to the api reference to check on the methods they have maptipsdelay this methods controls the timer from display to close you can play with that if that helps at all. then the other method that could do the trick is refreshmaptips then again am only second guessing of your end goal. I would like to see your code that you have fully implemented..
... View more
08-24-2015
02:05 PM
|
0
|
0
|
0
|
POST
|
How to get the object id back need help. I see is a two dimensional array. layer.applyEdits(new Graphic[]{}, new Graphic[]{}, update, new CallbackListener<FeatureEditResult[][]>(){ @Override public void onCallback(FeatureEditResult[][] result){ result[0][0].getObjectId()); put this doesnt work at all.. } });
... View more
08-24-2015
02:39 AM
|
0
|
1
|
2482
|
POST
|
Sorry I will like to add that the answer I gave before does work but it sounds to me is reduandant when the ArcGIS FeatureLayer extends that class of a graphicsLayer so the FeatureLayer has access to the same methods of graphicsLayer. To work this new just get the id that you hit on the featureLayer and pass that information where you are moving the cursor the layer it self has a method to updateGraphic that will allow you to do the same.
... View more
08-23-2015
10:53 PM
|
0
|
0
|
10
|
POST
|
Thank you for trying to help me out I figure it out. What I did I added a hit task listener to the ArcgisFeatureLayer and I also added a graphics Layer and the only thing that the graphicsLayer contains is the only graphic you are going to move. I make a copy of the graphics layer I click the feature layer and gets its symbol, attributes, and geometry so I added to the graphics Layer the only graphic. I have a mouse listener for that map where ever I move the mouse I know the gps coordinates then I added a if statement that if I want to move that copy graphicsLayer to updateThe Graphics position so when you move the cursor the graphic starts to move around and to stop it I have a keystroke with keyevent so when i press ctrl + m that if statement returns false and as well updates the ArgisFeatureLayer by apply the new edits I just get the attributes that I pass to that graphicsLayer return back the attributes and send them to the ArcgisFeatureLayer and use the method apply edits the new graphic moves to the new position. I know i didn't posted code but this a way that you can recreate the tool for moving vertices and move the graphics around. If anyone wants me to post the code I will be glad to post.
... View more
08-23-2015
10:10 PM
|
0
|
0
|
10
|
POST
|
The reason I ask was because since I come from the JavaScript API the feature layer is a graphics layer over there in that API. The reason I want to move the location of the feature because the user needs to move its geometry if is on the wrong place. I saw the tutorials in how to move a feature layer but you have to use the edit tools preferably I don't want to use that tool. So, I was wondering if you guys have a tool similar to JavaScript which I am accustom to. I did figure that the feature layer class inherits the methods of a graphics layer. So basically I have a generalize approach on how to do this. But the reason I made the question was hoping there was already a class for it that was simpler to use.
... View more
08-20-2015
03:28 PM
|
0
|
0
|
10
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|