POST
|
You can use modelBuilder to create all the logic. the model can directly be used within ArcGIS Desktop. Publish the geoprocessing task to the server and use that over the web.
... View more
09-01-2016
08:36 AM
|
1
|
0
|
425
|
POST
|
Yes, it is possible. Are you doing this to be used over the web or on the desktop?
... View more
09-01-2016
07:50 AM
|
0
|
0
|
425
|
POST
|
Drawings will be available with 4.1 release which is coming up the 4th quarter of 2016 I believe. You may consider using 3.x instead for now.
... View more
08-07-2016
11:08 AM
|
1
|
1
|
581
|
POST
|
I also tried to parse the value to string but not success!
... View more
08-04-2016
06:24 AM
|
0
|
0
|
516
|
POST
|
I think you're right Ken, I tried most values starting with 1E and I get the non-finite error. how do I work around this?
... View more
08-04-2016
06:22 AM
|
0
|
1
|
516
|
POST
|
Just came accross this error and I am quite confused. All I am doing is using the FindTask to find features. This works fine with some values but don't with some other values even though those values exist. instead, it throws me the above error. here is the code: var initAssetSearch = function () {
query(".txt-asset-finder").connect("onkeydown", function (evt) {
switch (evt.keyCode) {
case dojo.keys.ENTER:
var searchKey = $(".txt-asset-finder").val().trim();
console.log("is value infinite: ", isFinite(searchKey));
if (searchKey.length > 3) {
// [0] Perform the search
$(".asset-search-loader").show();
var assetLayer = new appLayers();
var findAssetParams = {
dynamicLayerURL: assetLayer.PACKAGE_LAYERS.UTILITY,
layersIdsArray: [1,2,3,4,5,6,7,9,10,11,12,13,14,15,16,17,19,20,21,22,23,24,25,26,27],
searchFieldsArray: ["MAPREF", "Mapref", "MAINID", "Node_ID", "NODE_ID", "Map_Ref", "Main_ID"],
searchText: searchKey
};
when(findAsset.findDataTask(findAssetParams.dynamicLayerURL,
findAssetParams.layersIdsArray, findAssetParams.searchFieldsArray,
findAssetParams.searchText, true), assetSearchResult_CallBack);
}
else
alert("please enter more than 3 characters");
break;
case dojo.keys.BACKSPACE:
$(".assets-finder-results").html("");
map.graphics.clear();
break;
}
});
} the confusion is that this works with some values. example when I search for "A41483", I'll get the result but for "1E1105", I get the above error. I know for sure this value exists.
... View more
08-03-2016
03:09 PM
|
0
|
4
|
1958
|
POST
|
Thank you Jeff for this trick. it works good. Now the only issue I have is that the table is loading all attributes from the FeatureLayer. I only want the table to load only the selected features in the featureLayer. I have the fLayer added to the map with MODE ONDEMAND. I tried flayer.setDefinitionExpression(whereClause) it works ok but limit the records set for the next query.
... View more
04-29-2016
07:42 AM
|
0
|
1
|
2184
|
POST
|
here is the sample code. I am expecting it to work a bit more like the FeatureTable from ArcGIS Online: <!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>FeatureTable Formatting</title> <link rel="stylesheet" href="https://community.esri.com//js.arcgis.com/3.16/dijit/themes/claro/claro.css"> <link rel="stylesheet" href="https://community.esri.com//js.arcgis.com/3.16/esri/css/esri.css"> <script src="//js.arcgis.com/3.16/"></script> <style> html, body, #map { width: 100%; height: 100%; margin: 0; padding: 0; } </style> <script> // Sample from http://developers.arcgis.com/javascript/sandbox/sandbox.html?sample=featuretable_formatting // Globals var map, myFeatureLayer, myFeatureTable; require([ "esri/layers/FeatureLayer", "esri/dijit/FeatureTable", "esri/tasks/query", "esri/tasks/QueryTask", "esri/geometry/Extent", "esri/symbols/SimpleMarkerSymbol", "esri/symbols/SimpleLineSymbol", "esri/Color", "esri/map", "dojo/dom-construct", "dojo/dom", "dojo/number", "dojo/parser", "dojo/ready", "dojo/on", "dojo/_base/lang", "dijit/registry", "dijit/form/Button", "dijit/layout/ContentPane", "dijit/layout/BorderContainer", "dijit/form/TextBox" ], function ( FeatureLayer, FeatureTable,Query, QueryTask, Extent, SimpleMarkerSymbol, SimpleLineSymbol, Color, Map, domConstruct, dom, dojoNum, parser, ready, on,lang, registry, Button, ContentPane, BorderContainer, TextBox ) { parser.parse(); ready(function(){ map = new Map("map",{ basemap: "dark-gray", extent: new Extent({xmax: -13035353.854156237, xmin: -13053431.211345658, ymax: 4038351.1313028745, ymin: 4034089.766975982, "spatialReference":{"wkid":102100,"latestWkid":3857} }) }); var myFeatureLayer = new FeatureLayer("http://services.arcgis.com/V6ZHFr6zdgNZuVG0/arcgis/rest/services/Redlands_Emergency_Facilities/FeatureServer/0",{ mode: FeatureLayer.MODE_ONDEMAND, outFields: ["*"], visible: true, id: "fLayer" }); //set a selection symbol for the featurelayer. var selectionSymbol = new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_SQUARE, 12, new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new Color([0, 255, 197, 1]))); myFeatureLayer.setSelectionSymbol(selectionSymbol); map.addLayer(myFeatureLayer); map.on("load", loadTable); map.on("extent-change", updateTableByExtent); function updateTableByExtent(ext){ console.log("Map Extent: ", ext.extent); var qTask = new QueryTask(myFeatureLayer); var q= new Query(); q.where = "1=1"; q.returnGeometry = true; q.outFields=["*"]; q.geometry = ext.extent; q.spatialRelationship = Query.SPATIAL_REL_CONTAINS; qTask.execute(q, successCallBack, errorCallBack); function successCallBack(result){ // Update the featureTable here ====> this should work more like the featureTable widget on ArcGIS Online console.log(result); } function errorCallBack(err){ console.log("Ooops Error: ", err); } } function loadTable(){ //create new FeatureTable and set its properties myFeatureTable = new FeatureTable({ featureLayer : myFeatureLayer, map : map, gridOptions: { allowSelectAll: true, allowTextSelection: true, }, editable: true, //zoomToSelection: false, //disable pan/zoom action on the map for selected features // showGridHeader: false, // showGridMenu: false, dateOptions: { //set date options at the feature table level //all date fields will adhere this datePattern: "EEEE, MMMM d, y" }, //define order and visibility of fields. If the fields are not listed in 'outFIelds' // then they will be hidden when the table starts. outFields: ["factype", "facname", "organiz", "capacity", "curcapacity", "hoursoper", "daysoper", "opsstatus", "opendate", "imageurl", "pocname", "pocphone" ], fieldInfos: [ { name: 'factype', alias: 'Facility Type', }, { name: 'hoursoper', alias: 'Open Hours', }, { name: 'curcapacity', format: { template: "${value} people" } }, { name: 'daysoper', alias: 'Open Days', }, { name: 'opsstatus', alias: 'Status', }, { name: 'lastupdate', alias: 'Last Update', //this will override FeatureTable.dateOptions //settings dateOptions: { datePattern: 'M/d/y', } }, { name: 'imageurl', alias: 'More Info', editable: false }, { name: 'pocphone', alias: 'Phone #', format: { template: "tel: ${value}" } } ], }, 'myTableNode'); myFeatureTable.startup(); } }); }); </script> </head> <body class="claro esri"> <div data-dojo-type="dijit/layout/BorderContainer" data-dojo-props="design:'headline'" style="width:100%; height:100%;"> <div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'center', splitter:true" style="height:50%"> <div id="map"></div> </div> <div id="bot" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'bottom', splitter:true" style="height:50%"> <div id="myTableNode"></div> </div> </div> </body> </html>
... View more
04-28-2016
01:28 PM
|
0
|
1
|
2184
|
POST
|
that is exactly the logic I am going to use now but the only issue is that the table is not refreshing at all. I am using myFeatureTable.grid.refresh(); but nothing happens the table keeps the same result set from the first query.
... View more
04-28-2016
08:06 AM
|
0
|
3
|
2184
|
POST
|
There is only one method on the FeatureTable widget (startup). is there anyway to completely destroy the featureTable and recreate it each time the selection query changes. I could create my own table to display selection query result but I would prefer using featureTable widget because of the editing capability to it.
... View more
04-28-2016
07:37 AM
|
0
|
10
|
6405
|
POST
|
Thank you Robert for your quick reply. Changed the code to contains and the result is the same. here is what the selection looks like: I only want the "Yes" to be selected.
... View more
03-30-2016
07:23 AM
|
0
|
1
|
411
|
POST
|
I am using query task to select only features within a drawn polygon. executeRequestByShape: function () {
var deffByShape = new Deferred();
var queryTask = new QueryTask(this.layerUrl);
var query = new Query();
query.returnGeometry = true;
query.geometry = this.geometry;
query.spatialRelationShip = Query.SPATIAL_REL_WITHIN;
query.outFields = ["*"];
var queryResults = queryTask.execute(query);
var promiseResult = all([queryResults])
.then(function (r) {
deffByShape.resolve(r);
})
return deffByShape.promise;
}
but this code is returning features that intersect the drawn polygon. Any idea?
... View more
03-30-2016
06:51 AM
|
1
|
4
|
2599
|
POST
|
Thank you Tom, this is a real good start. I created a repository on Github with a demo sample. There is an issue though when switching the measurement units other than meters. you can try view the demo here https://github.com/rhyck-m/Drawing-circle-with-radius-measurement-display
... View more
02-27-2016
08:40 AM
|
0
|
1
|
1395
|
Title | Kudos | Posted |
---|---|---|
2 | 06-27-2023 09:06 PM | |
1 | 12-17-2021 08:58 AM | |
3 | 12-17-2021 09:37 AM | |
1 | 05-03-2021 08:47 AM | |
1 | 09-01-2016 08:36 AM |
Online Status |
Offline
|
Date Last Visited |
06-28-2023
06:10 AM
|