DOC
|
Robert Can I adjust the extent for the ‘Zoom To’ function? Thanks Keith
... View more
07-09-2019
09:00 AM
|
0
|
0
|
8794
|
POST
|
Hi Noah Thanks for the reply. I finally found it just before I saw your message. Uncaught Type error: queryTask is not a function The order of dependencies in your require statement have to match the order of the corresponding variable names. I assumed that ESRI Print.js in WAB would match, but they do not! There are approximately 47 dependencies in the define but only 31 variable names in the function. I added in the missing digit/form variables so everything lined up. The two new variables I added at the bottom were fine all the time but because they did not correspond to the define dependencies they always failed with error. I think its safe for me to say that Uncaught Type error: xxxxx is not a function is a probable issue with your variable names and variable counts at the top of your Define. Thanks again!
... View more
03-29-2019
01:12 PM
|
3
|
0
|
1013
|
POST
|
I am using the RSheitlin's printing solution for posting attributes into TextElements on a report....which works great. Decided to get the attributes from QueryTask rather than the graphicsLayer. Hangs on queryTask.execute is not a function. Can't get past it. Ideas are welcome. Researched all of RSheitlin's post on this in the past. //See if there is a parcel search layer added to the map
var plyr;
array.some(this.map.graphicsLayerIds, lang.hitch(this, function (layerId) {
var lyr = this.map.getLayer(layerId);
if(lyr.name === "Search Results: Parcels"){
plyr = lyr;
return true;
}
}));
var gra = this.map.infoWindow.getSelectedFeature();
var ppid = gra.attributes.PID;
var queryTask = new esriQueryTask("https://Default_xxxxxx/MapServer/171");
var query = new esriQuery();
query.returnGeometry = false;
query.outFields = ["*"];
query.where = "PID = '" + ppid + "'";
queryTask.execute(query, lang.hitch(this, function(results) {
console.log(results.features)
}));
if(plyr){ Keith
... View more
03-29-2019
07:44 AM
|
0
|
2
|
1375
|
POST
|
On a similar note: I added Line 7 to emulate the click event on the Popup - Expand All Layers lang.hitch(this,
this._onRowTrClick,
layerInfo,
imageShowLegendDiv,
layerTrNode,
tableNode)));
this.foldOrUnfoldAllRootLayers(false);
... View more
01-09-2018
01:42 PM
|
0
|
0
|
1029
|
POST
|
Thought I would try exporting my Workforce data as my first test with the ArcREST scripts. I can authenticate but cannot return Assignments. Below is the Python logging. I have tried many 'Where' clauses. Thought I would leave it out so it would default to 1=1. Same results each run. Any suggestions welcome. C:\Windows\system32>"C:\Program Files\ArcGIS\Pro\bin\Python\python.exe" c:\ArcREST-master\samples\arcrest_scripts\export_assignments_to_csv.py -outCSV "./exported_assignments.csv" -u xxxxxxxxx -p xxxxxxxxx -url "https://xxxxxx.maps.arcgis.com" -pid "7c71c4452d444d5996c326c01867f036" -logFile "./log.txt" -outSR 10200 -dateFormat "d/Y" [2016-10-20 15:20:43,614] [ export_assignments_to_csv.py: 116 - main()] [MainThread] [ root] [ INFO] Authenticating... [2016-10-20 15:20:45,782] [ export_assignments_to_csv.py: 119 - main()] [MainThread] [ root] [ INFO] Getting assignment feature layer... [2016-10-20 15:20:46,200] [ export_assignments_to_csv.py: 159 - <module>()] [MainThread] [ root] [CRITICAL] Exception detected, script exiting [2016-10-20 15:20:46,202] [ export_assignments_to_csv.py: 160 - <module>()] [MainThread] [ root] [CRITICAL] 'assignments' [2016-10-20 15:20:46,205] [ export_assignments_to_csv.py: 161 - <module>()] [MainThread] [ root] [CRITICAL] Traceback (mostrecent call last): | File "c:\ArcREST-master\samples\arcrest_scripts\export_assignments_to_csv.py", line 157, in <module> | main(args) | File "c:\ArcREST-master\samples\arcrest_scripts\export_assignments_to_csv.py", line 120, in main | assignment_fl = workforcehelpers.get_assignments_feature_layer(shh, args.projectId) | File "c:\ArcREST-master\samples\arcrest_scripts\workforcehelpers.py", line 73, in get_assignments_feature_layer | return arcrest.agol.FeatureLayer(project_data["assignments"]["url"], securityHandler=shh.securityhandler) | KeyError: 'assignments'
... View more
10-20-2016
01:45 PM
|
0
|
0
|
669
|
POST
|
The snippet below works with the 4.0 JavaScript API but not at 4.1. The response object prompts for authentication where it used to pass authentication through. Any ideas are welcome. restUrl = "https://xxx.server.org/arcgis/rest/services/CoolMap/"; if (queryObj.query && queryObj.query["city"]) { urlUtils.addProxyRule({ proxyUrl: "https://xxx.server.org/proxy-coolmap/", urlPrefix: restUrl }); esriRequest(restUrl, { query: { f: "json" }, cacheBust: true } ).then(function (response) { var services = [];
... View more
09-27-2016
08:23 AM
|
0
|
1
|
743
|
POST
|
Thank you Russell. I guess I could rename all of the files using a %27 rather than deleting the Apostrophe....but I was trying to avoid altering the file names. I am looking for some code behind the Popup Configuration that would replace the Apostrophe on the fly in the Hyperlink. The Silverlight Viewer handles the Apostrophe on the fly.
... View more
01-15-2016
11:52 AM
|
0
|
0
|
398
|
POST
|
Folks Customizing a Hyperlink in a Popup works great but not when your Filename includes an apostrophe. e.g. http://library.city.gov/plats/V/Victorsen's Addition to Highlands.tif Removing the apostrophe works but all of the filenames on the clients server have to be altered? Ugh Any suggestions/comments/condolences would be grateful. Keith
... View more
01-15-2016
09:58 AM
|
0
|
3
|
2374
|
POST
|
Same issue. In this case I could not join a SQL Server view to a Featureclass in the Map Document. I had to delete the SQL View from within ArcCatalog rather than a drop and create from within SSMS.
... View more
10-01-2015
11:09 AM
|
0
|
0
|
5135
|
POST
|
Folks How do I emulate a Key Click on a Dojo Treeview Control (any Dojo control) after the application has finished loading to display the Grid results. I have the Treeview node hilited but now I need that node clicked. Have tried emit, calling the onClick See line 154 here: Edit fiddle - JSFiddle Any suggestions/ideas are welcome Thanks Keith Anderson
... View more
08-03-2015
12:43 PM
|
0
|
0
|
1923
|
POST
|
Robert Here is my example of what is happening.... The code below is straight off ESRI's site. Copied directly into an HTML page it works with IE11, Chrome and FF. Removing the statesRenderer and only displaying the labelsRenderer does not work in IE11...but does display in Chrome and FF. Any suggestions/comment are grateful. Keith <!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">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<link rel="stylesheet" href="https://community.esri.com//js.arcgis.com/3.13/esri/css/esri.css">
<style>
html, body, #map {
height: 100%;
width: 100%;
margin: 0;
padding: 0;
}
</style>
<script src="//js.arcgis.com/3.13/"></script>
<script>
var map;
require([
"esri/map",
"esri/geometry/Extent",
"esri/layers/FeatureLayer",
"esri/symbols/SimpleLineSymbol",
"esri/symbols/SimpleFillSymbol",
"esri/symbols/TextSymbol",
"esri/renderers/SimpleRenderer",
"esri/layers/LabelLayer",
"esri/Color",
"dojo/domReady!"
], function (
Map, Extent, FeatureLayer,
SimpleLineSymbol, SimpleFillSymbol, TextSymbol, SimpleRenderer,
LabelLayer,
Color
) {
// load the map centered on the United States
var bbox = new Extent({ "xmin": -1940058, "ymin": -814715, "xmax": 1683105, "ymax": 1446096, "spatialReference": { "wkid": 102003 } });
map = new Map("map", {
extent: bbox
});
var labelField = "STATE_NAME";
// create a renderer for the states layer to override default symbology
//var statesColor = new Color("#666");
//var statesLine = new SimpleLineSymbol("solid", statesColor, 1.5);
//var statesSymbol = new SimpleFillSymbol("solid", statesLine, null);
//var statesRenderer = new SimpleRenderer(statesSymbol);
// create a feature layer to show country boundaries
var statesUrl = "http://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer/3";
var states = new FeatureLayer(statesUrl, {
id: "states",
outFields: [labelField]
});
//states.setRenderer(statesRenderer);
map.addLayer(states);
// create a text symbol to define the style of labels
var statesLabel = new TextSymbol().setColor("#666");
statesLabel.font.setSize("14pt");
statesLabel.font.setFamily("arial");
var statesLabelRenderer = new SimpleRenderer(statesLabel);
var labels = new LabelLayer({ id: "labels" });
// tell the label layer to label the countries feature layer
// using the field named "admin"
labels.addFeatureLayer(states, statesLabelRenderer, "{" + labelField + "}");
// add the label layer to the map
map.addLayer(labels);
});
</script>
</head>
<body>
<div id="map"></div>
</body>
</html>
... View more
07-10-2015
12:42 PM
|
0
|
0
|
1136
|
POST
|
Robert The marked answer does not work for me. Nor does toggle Compatiablity Mode on/off Using the LabelLayer example in my code. The LabelLayer code on ESRIs API site works fine in IE11. Keith
... View more
07-10-2015
08:48 AM
|
0
|
0
|
1136
|
POST
|
Hi Kirsten Any solution to this. Just ran into It. Thanks Keith Anderson
... View more
07-10-2015
08:40 AM
|
0
|
3
|
1136
|
POST
|
Folks I am using Layer.on("Click", function (evt){
var testval = evt.graphic.attributes.ADDRESS
} to return the Feature value of the "ADDRESS" field. testval results are fine. My issue is I need to pass in a different Field each time a new FeatureLayer is activated. I have the name of the Field prior to the on Click event. What is the syntax.... fld = "NAME";
Layer.on("Click", function (evt){
var testval = "evt.graphic.attributes." + fld;
} Alternative ideas welcome. Thanks, Keith
... View more
06-29-2015
12:07 PM
|
0
|
2
|
3188
|
Title | Kudos | Posted |
---|---|---|
3 | 03-29-2019 01:12 PM | |
1 | 01-30-2015 12:06 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|