DOC
|
Robert, The 'all' issue appears to only happen when the 'Filter by Map Extent' is enabled. The queryExcute appears to fire twice. The results temporarily appear and then it fires again and wipes out the results. I will take a look at the Supports OrderBy Thanks, Paul
... View more
12-18-2015
12:23 PM
|
0
|
0
|
2530
|
DOC
|
When a search option drop down is set to 'all' the results do not appear in the attribute table: Also, the 'Result Item Sorting' seems to remain disabled even when I have a layer that supports advanced queries capabilities.
... View more
12-18-2015
08:57 AM
|
0
|
0
|
2846
|
POST
|
Peter, I compared processing times between the Arcpy Flow Accumulation and Arc Hydro Flow Accumulation. They appear to be almost identical. The multi-processing algorithm sounds interesting.
... View more
04-14-2015
03:00 PM
|
0
|
0
|
633
|
POST
|
If I add a non-spatial table to my AGO map is there a way to view it in Web AppBuilder? From my tests it will not show up in the layer list and the Attribute Table widget offers not options for viewing it.
... View more
11-21-2014
12:17 PM
|
0
|
1
|
1806
|
POST
|
I cannot get the Cut GeometryService to work properly in FireFox. It works great in IE and Chrome. Sample code is here: It is designed for cutting of polygons. You may need to adjust proxy and FeatureLayer when testing locally.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=7, IE=9, IE=10">
<!--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>JavaScript API Cut Test</title>
<link rel="stylesheet" href="http://js.arcgis.com/3.6/js/dojo/dijit/themes/claro/claro.css">
<link rel="stylesheet" href="http://js.arcgis.com/3.6/js/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="http://js.arcgis.com/3.6/"></script>
<script>
var map;
require([
"esri/map",
"esri/toolbars/edit",
"esri/dijit/editing/Cut",
"esri/toolbars/draw",
"esri/layers/ArcGISTiledMapServiceLayer",
"esri/layers/FeatureLayer",
"esri/tasks/query",
"esri/symbols/SimpleMarkerSymbol",
"esri/symbols/SimpleLineSymbol",
"esri/symbols/SimpleFillSymbol",
"esri/tasks/QueryTask",
"esri/dijit/editing/Editor",
"esri/dijit/editing/TemplatePicker",
"esri/tasks/GeometryService",
"esri/config","esri/dijit/editing/Union","esri/graphic",
"dojo/i18n!esri/nls/jsapi",
"dojo/_base/array", "dojo/parser", "dojo/keys","dojo/on","dijit/registry","dojo/_base/lang",
"dijit/layout/BorderContainer", "dijit/layout/ContentPane",
"dojo/domReady!"
], function(
Map, Edit,Cut, Draw,
ArcGISTiledMapServiceLayer, FeatureLayer,Query,
SimpleMarkerSymbol, SimpleLineSymbol, SimpleFillSymbol, QueryTask,
Editor, TemplatePicker, GeometryService,
esriConfig, Union, Graphic,jsapiBundle,
arrayUtils, parser, keys, on,registry, lang
) {
parser.parse();
// refer to "Using the Proxy Page" for more information: https://developers.arcgis.com/en/javascript/jshelp/ags_proxy.html
//esriConfig.defaults.io.proxyUrl = "http://localhost/proxy/proxy.ashx";
esriConfig.defaults.io.proxyUrl = "/proxy";
var geometryService = new GeometryService("http://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer");
map = new Map("map", {
basemap: "streets",
center: [-96.541, 38.351],
zoom: 13
});
var cutService;
var unionService;
var donutService;
var waterbodies = new FeatureLayer("http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Hydrography/Watershed173811/FeatureServer/0",{
outFields: ['*']
});
var fieldsSelectionSymbol = new SimpleFillSymbol().setColor(new dojo.Color([255,255,0,0.5]));
fieldsSelectionSymbol.setOutline(new SimpleLineSymbol("dashdot", new dojo.Color([255,0,0]), 2));
waterbodies.setSelectionSymbol(fieldsSelectionSymbol);
map.addLayers([waterbodies]);
function SelectionSet(geometries, tb) {
tb.deactivate();
var selectQuery = new Query();
selectQuery.geometry = geometries;
waterbodies.selectFeatures(selectQuery, FeatureLayer.SELECTION_NEW);
}
function PerformCut() {
var selectGraphics = waterbodies.getSelectedFeatures();
if (selectGraphics.length == 0){
alert("Select a polygon to slice.");
return;
}
else if (selectGraphics.length > 1){
alert("More than one polygon is currently selected. The slice operation can only be done on one polygon.");
return;
}
var sliceGeometry = selectGraphics[0].geometry;
var tbSlice = new Draw(map);
//find points in Extent when user completes drawing extent
on(tbSlice, "DrawEnd", function(polyline){
splitLineComplete(polyline);
});
tbSlice.activate(Draw.POLYLINE);
function splitLineComplete(polyline) {
if (polyline) {
var selectGeometries = new Array();
var sliceGraphics = waterbodies.getSelectedFeatures();
for (var i = 0; i < sliceGraphics.length; i++) {
selectGeometries.push(sliceGraphics.geometry);
}
geometryService.cut(selectGeometries,polyline);
}
}
cutService = geometryService.on("cut-complete", function(results) {
tbSlice.deactivate(Draw.POLYLINE);
if (results.result.geometries != null && results.result.geometries.length > 1) {
var cutGraphic = waterbodies.getSelectedFeatures()[0].setGeometry(results.result.geometries[0]);
// Create for the next
currentSymbolCut = waterbodies.getSelectedFeatures()[0].symbol;
currentAttributesCut = lang.clone(cutGraphic.attributes);
var newGraphics = new Array();
for (var i = 1; i < results.result.geometries.length; i++) {
newGraphics.push(new Graphic(results.result.geometries, currentSymbolCut,currentAttributesCut));
}
waterbodies.applyEdits(newGraphics, [cutGraphic], null, CutSucceed, CutFailed);
function CutSucceed() {
cutService.remove();
clearTool();
}
function CutFailed(evt) {
cutService.remove();
alert("Failed - " + evtObj);
GenFunc.clearTool();
}
}
});
}
function SelectFeatures() {
var tb = new Draw(map);
//find points in Extent when user completes drawing extent
on(tb, "DrawEnd", function(geometries){
SelectionSet(geometries, tb)
});
tb.activate(Draw.EXTENT);
}
var bSelect = registry.byId("btnSelect");
on(bSelect, "click", function(evt){
SelectFeatures();
});
var bSlice = registry.byId("btnSplit");
on(bSlice, "click", function(evt){
PerformCut();
});
var bClear = registry.byId("btnClear");
on(bClear, "click", function(evt){
clearTool(waterbodies);
});
function clearTool(waterbodies){
map.graphics.clear();
if (waterbodies) {
waterbodies.clearSelection();
waterbodies.refresh();
}
}
});
</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'">
JavaScript API Cut Test
</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>
<br>
<div id="btnSelect" data-dojo-type="dijit/form/Button" style='padding-left:5px;'>Select</div>
<br>
<div id="btnSplit" data-dojo-type="dijit/form/Button" style='padding-left:5px;'>Cut</div>
<br>
<div id="btnClear" data-dojo-type="dijit/form/Button" style='padding-left:5px;'>Clear</div>
<br>
<br>
<span><u>Steps</u></span>
<br>
<br>
<span>1. Select one polygon</span>
<br>
<br>
<span>2. Click the Cut button and draw a line through the selected polygon</span>
<br>
<br>
<span>3. Polygon will should now be split.</span>
</div>
<div data-dojo-type="dijit/layout/ContentPane" id="map" data-dojo-props="region:'center'"></div>
</div>
</body>
</html>
... View more
09-16-2013
02:05 PM
|
0
|
1
|
3499
|
POST
|
I solved my issue, I needed to specify the template as an array.
... View more
06-18-2013
06:17 PM
|
0
|
0
|
340
|
POST
|
I get the following error in Chrome when trying to implement the PrintTemplate. Uncaught TypeError: Cannot read property 'showAttribution' of undefined I have showAttribution set to true for both my map and the print template. Any ideas?
// create the print template
var template = new esri.tasks.PrintTemplate();
template.layout = dijit.byId("mapLayout").value;
template.label = "Test";
template.format = dijit.byId("imageType").value;
if (dijit.byId("printLegend").checked){
template.layoutOptions = {
"titleText": dijit.byId("mapTitle").value,
"authorText": dijit.byId("printAuthor").value,
"copyrightText": dijit.byId("printCopyright").value,
"scaleBarUnit": dijit.byId("printScale").value
}
}
else {
template.layoutOptions = {
"titleText": dijit.byId("mapTitle").value,
"authorText": dijit.byId("printAuthor").value,
"copyrightText": dijit.byId("printCopyright").value,
"scaleBarUnit": dijit.byId("printScale").value
}
}
template.preserveScale = true;
template.showAttribution = true;
//var printTaskURL = ndhx.config.printURL;
var printTaskURL = "http://sampleserver6.arcgisonline.com/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task";
// var printer = new esri.dijit.Print({
// "map": ndhx.map,
// url: printTaskURL
// }, dojo.byId("print_button"));
ndhx.printer = new esri.dijit.Print({
"map": ndhx.map,
"templates": template,
url: printTaskURL
}, dojo.byId("print_button"));
ndhx.printer.startup();
dojo.connect(ndhx.printer,'onPrintStart',function(){
console.log('The print operation has started');
});
dojo.connect(printer,'onError',function(error){
console.log('The print operation has started');
});
dojo.connect(printer,'onPrintComplete',function(value){
console.log('The url to the print image is : ' + value.url);
});
... View more
06-13-2013
12:38 PM
|
0
|
3
|
863
|
POST
|
Further details: I installed/uninstalled the Web Adaptor a few times (IIS version). I followed the unregister direction from this post: http://forums.arcgis.com/threads/62254-Unregister-a-Web-Adaptor?highlight=web+adaptor During installation the web adaptor will direct me to a page for configuration. However, I got some 500.19 error (see attached). I was able to fix this by removing the configSections of the web.config file for the Web Adaptor. This was based on some online posts saying something is happening between .NET 2.0 applications and .NET 4.0 applications. My site is using only a 4.0 application so I am not sure why I got this error. However, I still get the error from the first post. I also tried a command line install and got a different error (see attached). I am not sure if something is not unregistering in the registry or a .NET 2.0/4.0 problem.
... View more
07-25-2012
10:58 AM
|
0
|
0
|
728
|
POST
|
I get this error when using the new REST service link after installing the ArcGIS Web Adaptor (See attached).
... View more
07-24-2012
07:44 AM
|
0
|
13
|
4011
|
POST
|
The problem is I am looking for the nearest location on the polyline. The location may not contain a vertex. (see attached visual) Looping through each vertice and using your forumla would give me the distance from each vertice. But, that is not what I am looking for. The 'DistanceAsync' task gives me the distance, but for some reason I can't get the polyline nearest location. I would think the value for this would be exposed somewhere.
... View more
06-22-2011
06:47 PM
|
0
|
0
|
950
|
POST
|
How do I find the location on a polyline that is closest to another point on the map. For a visual of what I am looking for, in the attached PolylinePoint.png I want to obtain the yellow "Nearest Point' location. The geometry task 'DistanceAsync' gets the closest distance between a polyline and point. However, I am looking for that 'Nearest Point' location.
... View more
06-21-2011
10:41 AM
|
0
|
7
|
4781
|
POST
|
I think I figured it out. It looks like I was trying to deactivate it before it was active. I got it working now.
... View more
06-20-2011
05:11 AM
|
0
|
0
|
120
|
POST
|
I am working with a custom version of the Cut command on the editor widget and I cannot get it to deactivate: Dim editor As Editor = TryCast(LayoutRoot.Resources("SplitEditor"), Editor) If Not editor Is Nothing Then If editor.CancelActive.CanExecute(nothing) Then <--- This is never True editor.CancelActive.Execute(nothing) <--- This never fires End If End If '--- XAML <Button x:Name="btnSplitStreet" Style="{StaticResource MenuButton}" ToolTipService.ToolTip="Split Street" Command="{Binding Cut}" Click="btnSplitStreet_Click"> <esri:Editor x:Key="SplitEditor" EditCompleted="EditorWidgetSplit_EditCompleted" Map="{Binding ElementName=Map}" LayerIDs="GPS, Roads" GeometryServiceUrl="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer" />
... View more
06-17-2011
12:18 PM
|
0
|
2
|
435
|
POST
|
This post kind of helped me: http://forums.arcgis.com/threads/16710-BUG-SelectionCount-on-FeatureLayer?highlight=PropertyChanged+featurelayer Looks like I should us PropertyChanged event with the e.PropertyName ="SelectedGraphics". It is kind of troublesome with the event triggering multiple times for each selection change.
... View more
06-10-2011
12:24 PM
|
0
|
0
|
144
|
Online Status |
Offline
|
Date Last Visited |
04-30-2021
12:17 PM
|