|
POST
|
The app line would be the first line in your main JS file (listed BEFORE the Dojo require() stuff. This is a technique I learned from this page under the "Avoid Cluttering the Global Namespace" section. Using the app technique is a great way (for me, at least) to make sure things are accessible within custom modules and from one module to another since variable scope comes into play.
... View more
08-08-2017
12:36 PM
|
0
|
3
|
3134
|
|
POST
|
I've done this. The key is making sure the event that gets referenced in the onClick event of the button has a global scope. Here's a screen shot of my infoWindow: And the code for the infoWindow content formatting function: SetSwmPopupInfo: function(graphic) {
var fullAttr = graphic.attributes;
var rptParam, content, theProjID, theTipType;
var theCipID = fullAttr.SWM_PRJ_NO;
var features = [];
features.push(graphic);
var fSet = new FeatureSet();
fSet.features = features;
app.curInfoGraphic = fSet;
rptParam = "'" + graphic.attributes.OBJECTID + ',' + graphic.geometry.type + ',' + "SWM" + "'";
rptProjectName = graphic.attributes.ProjectName_1;
if (theCipID.length > 1) {
theProjID = fullAttr.SWM_PRJ_NO;
} else {
theProjID = "Unknown";
}
content = '<table width=\"100%\"><tr><td valign=\'top\' style=\"font-weight:bold;padding-left:3px;padding-right:3px\">Project Name:</td><td valign=\'top\' style=\"padding-left:3px;padding-right:3px\">' + fullAttr.ProjectName_1 + '</td></tr>';
content = content + '<tr><td valign=\'top\' style=\"font-weight:bold;padding-left:3px;padding-right:3px;vertical-align:top\">CIP Project ID:</td><td valign=\'top\' style=\"padding-left:3px;padding-right:3px;vertical-align:top\">' + theProjID + '</td></tr>';
content = content + '<tr><td valign=\'top\' style=\"font-weight:bold;padding-left:3px;padding-right:3px;vertical-align:top\">Type of Project:</td><td valign=\'top\' style=\"padding-left:3px;padding-right:3px;vertical-align:top\">' + fullAttr.Category.toProperCase() + '</td></tr>';
content = content + '<tr><td colspan=\"2\"><br/><div style=\"margin:0 auto;display:table;line-height:28px;\"><button id=\"reportButton\" type=\"button\" onclick=\"app.trf.getTractProjectReport(' + rptParam + ')\">View a Summary Demographic Report (Census Tract Level)</button><br\>';
content = content + '<button id=\"reportBlockButton\" type=\"button\" onclick=\"app.brf.getBlockProjectReport(' + rptParam + ')\">View a Summary Demographic Report (Block Group Level)</button></div></td></tr></table><br/>';
return content;
} In the onClick tag, I'm specifying app.brf.getBlockProjectReport(arg). App is simply a global array/collection that I use to store values or references to items that I'll need from time to time: var app = {}; The actual function (getBlockProjectReport) is contained in a custom Dojo Module that I wrote named blockgroupReportFunctions: require([
"custom/mapHelp",
"custom/printMapFunctions",
"custom/postLoadMapFunctions",
"custom/tractReportFunctions",
"custom/blockgroupReportFunctions",
.....
], function (
mapHelp, PrintMapFunctions, PostLoadMapFunctions, tractReportFunctions, blockgroupReportFunctions,.....
( {
ready(function() {
.... when the Dojo Ready function gets triggered, I create a reference to that function inside of my global app collection: app.pf = new PrintMapFunctions();
app.mh = new mapHelp();
app.plmf = new PostLoadMapFunctions();
app.trf = new tractReportFunctions();
app.brf = new blockgroupReportFunctions(); ...and that finally brings me to the beginning of my response. Now I have a globally accessible reference to the function I want to trigger when the user clicks on the button I created on the fly within my infoWindow. Steve
... View more
08-08-2017
09:52 AM
|
1
|
0
|
3134
|
|
POST
|
I'd suggest a non-ESRI solution: the PeakFinder app (iOS and desktop browser; not sure if it's also on Android). Can work offline and is pretty fast and comprehensive.
... View more
08-01-2017
01:52 PM
|
0
|
0
|
1627
|
|
POST
|
In Excel, you should format that column as TEXT instead of numbers. That will eliminate the 1.0E+11 issue, and hopefully the issue you have inside the JS API as well. You should especially do this if any of your values have leading zeros (in my County, the tax account numbers sometimes have two leading zeros).
... View more
07-27-2017
07:59 AM
|
0
|
2
|
1210
|
|
POST
|
This came up in the ArcGIS Pro Q&A session during the recent conference and, as pointed out, ESRI's response was to 1.) point to the add geometry attributes tool in the Toolbox; and 2.) add an idea to the Ideas forum and vote it up! Because they're really listening to their users!
... View more
07-20-2017
08:01 AM
|
0
|
0
|
1292
|
|
POST
|
Do you have access to Adobe Acrobat Pro? I'd suggest creating a PDF using Adobe's Distiller option as a test. I'm not currently using Pro but, my experience within Arcmap tells me that using ESRI's export to PDF option typically produces larger PDF files than printing to Adobe's PDF Distiller virtual printer. This is my preferred method of producing PDFs within Arcmap. I will say that Pro is built from the ground up with an entirely new graphics pipeline so it is possible that comparing previous experiences with Arcmap are no longer applicable. Anyways, worth a try if you have that ability.
... View more
07-19-2017
08:45 AM
|
0
|
0
|
12168
|
|
POST
|
Thanks, Rupert. I think your tip #2 is closer to the guidance I was seeking. Does moving items around within your content hierarchy affect the item's URL? I wondering if you can have a situation of broken links like you would if you moved stuff around using desktop.
... View more
07-18-2017
02:01 PM
|
0
|
0
|
1216
|
|
POST
|
The feds have been perplexing as of late. The USGS had a pretty strong presence in this year's map gallery but I didn't pay attention to their booth presence. I will say that the Forest Service did not have a booth presence last year but did this year. Maybe they're alternating years now?...
... View more
07-17-2017
10:40 AM
|
1
|
0
|
2717
|
|
POST
|
I missed my chance to ask this at the conference last year but I was wondering is any of the ESRI folks have any advice / best practices when it comes to organizing the associated content that ultimately goes into a story map. A Cascade Storymap might contain several individual interactive maps & associated layers/content and I know I had trouble keeping on top of organizing everything when I tried creating a story map.
... View more
07-17-2017
10:38 AM
|
1
|
2
|
1782
|
|
POST
|
The whole server appears to be down (try navigating to the top level of the rest services directory). Given the current administration, who knows what's going on. I'd suggest contacting someone in that particular program to ask about it.
... View more
07-06-2017
08:00 AM
|
1
|
0
|
3023
|
|
POST
|
Your link seems to open for me with IE11 (on Windows 7 64-bit)
... View more
06-29-2017
12:55 PM
|
0
|
0
|
7252
|
|
IDEA
|
I was just about to add this idea (hiding field if null/empty). Agree 100%. I'd also like the ability to hide a numeric field if a specific value is found.
... View more
06-15-2017
08:21 AM
|
0
|
0
|
2727
|
|
IDEA
|
2016 update: "Esri MapStudio is being retired and replaced by ArcGIS Maps for Adobe Creative Cloud." And, frankly, that's not a real solution to what the OP was suggesting. If you're just using AGOL, the export map option is still a valid feature request.
... View more
06-13-2017
08:21 AM
|
0
|
0
|
1977
|
|
POST
|
You could specify a layerInfos object when you construct the Legend widget rather than relying on the individual properties with each layer...
... View more
06-12-2017
01:22 PM
|
0
|
0
|
4878
|
|
POST
|
It's really not a big deal to install IIS on your machine to create a Localhost "server". I've done this at home and it works fine.
... View more
06-08-2017
08:14 AM
|
0
|
0
|
2833
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | a week ago | |
| 1 | a week ago | |
| 1 | 2 weeks ago | |
| 2 | 2 weeks ago | |
| 1 | 3 weeks ago |