|
POST
|
here might be some indication of the issue if you look at the underlying print request. To do this, set the map up to the point where you would print. Now open your developer Tools in your browser (in Chrome, this is done by pressing the F12 key). In the Developer Tools window, switch to the Network tab Now in your EB app, attempt to print using the widget Switch back to the Developer Tools app and look at the activity is has logged. On the left-hand side, click on the entry that's named "execute". This should be the actual print request. You should see a number of tabs of information now on the right-hand side (Headers | Payload | Preview | Response | Initiator | Timing | Cookies) Click on the Response tab to look at its details. If there was an error while printing, it should be reflected and (briefly) described here.
... View more
09-18-2024
08:52 AM
|
0
|
1
|
681
|
|
POST
|
Ugh. You know, changing the DPI parameter was a conscious decision when I migrated the code but the manner in which it's implemented was unexpected. Changing it back to 50 yielded the same print results so thanks for pointing to that. My intent with bumping up the DPI was to increase the sharpness of the output image, much like when you bump up the DPI when exporting to a PDF. In reality, the export map function seems to have ended up just zooming into the map since the dpi I specified was doubled. Anyways, thanks again. Glad that my remaining migration issue is now solved.
... View more
09-16-2024
08:57 AM
|
0
|
0
|
1981
|
|
POST
|
I submitted an idea to get the resize method restored in the API but I finally have success using CSS. I'm still using the same approach as originally outline above but my resizePopupWindow function has changed. I'm now using the setProperty method on the style property and that finally works: resizePopupWindow(theWidth,theHeight) {
var theCssWidth = theWidth + 'px';
var theCssHeight = theHeight + 'px';
var cols = document.querySelectorAll('.esri-view-width-xlarge .esri-popup__main-container');
if (cols.length > 0) {
console.log('Adjusting the popup dimensions to ' + theWidth + ' x ' + theHeight);
for(var i = 0; i < cols.length; i++) {
cols[i].style.setProperty("maxHeight", theCssHeight,"important");
cols[i].style.setProperty("maxWidth", theCssWidth,"important");
cols[i].style.setProperty("height", theCssHeight,"important");
cols[i].style.setProperty("width", theCssWidth,"important");
}
}
} Hopefully that helps out someone else. I should note that the application I'm using this with is really designed for us in a desktop browser environment. I don't know about trying to use this approach under mobile device circumstances.
... View more
09-09-2024
10:48 AM
|
0
|
0
|
720
|
|
POST
|
Hey Bryan, thanks for the suggestion; it was something I had not tried. Unfortunately, it did not make a difference with my output. We're running v11.1 of Portal so I don't know if is changing things in terms of our situation vs yours.
... View more
09-06-2024
03:50 PM
|
0
|
0
|
2108
|
|
POST
|
Sometimes what to do is still vague despite all the copious documentation. I remember trying to manually edit the version references in the DAML to no avail before finally figuring out it that you just change it in the app settings. Glad you got it straightened out!
... View more
09-05-2024
08:18 AM
|
0
|
0
|
2314
|
|
POST
|
I think I ran into this a few months back myself when my machine was upgraded from 3.1 to 3.3. *I think* it's as easy as changing a setting inside Visual Studio as described here: https://github.com/Esri/arcgis-pro-sdk/wiki/ProGuide-NET-8-Upgrade
... View more
09-05-2024
08:12 AM
|
1
|
0
|
2325
|
|
POST
|
I hadn't considered looking at the request.. From what I can tell, it appears to be sending the request as JSON. I looked at the print request in the 3.X API for the same print area and the header sizes are similar (37k in 3.X vs 41k in 4.X). I'm guessing I'll have to submit an ESRI support ticket to figure this out. The issues I've been describing are using the print.execute() option for printing rather than using the Print widget. I do use the Print widget in a different part of my app and that output is what I would expect-
... View more
09-05-2024
08:00 AM
|
0
|
0
|
2136
|
|
POST
|
Hey Joel, I have been playing with that setting but I don't think that's the way to go. The physical dimensions of the JPEG map export are different than the mapView's extent on screen so if you try to use scalePreserved (in concert with outScale), the resulting JPEG map won't accurately show the feature with the buffer I apply to it. Example- I was getting inconsistent print map extents, which was super frustrating. I finally re-read the API docs and the goTo() method returns a promise so I think my code was behaving more async than sync. I added a when() after using goTo and wrapped the map export process inside that function at the map extents are behaving more like I would expect. The thing I really want to resolve is the symbology and labels which get blown up out of proportion. Again, the print output is similar to what you experience inside desktop if you alter the Reference Scale property of the Data Frame. It's just that the layer & label symbology is not correctly scaling with map scale. Export output vs onscreen map example-
... View more
09-04-2024
01:38 PM
|
0
|
2
|
2177
|
|
POST
|
As I keep working on migrating my 3.X app to 4.X, I keep hitting issues. Now, it's print output. The same basic code block, adjusted for 4.X differences, produces a vastly different output. The final part of a custom report generating tool is to produce a JPEG map and insert it into a HTML report output. The output from 3.X produces this: The 4.X API output results in this: It's almost as if there's a "reference scale" setting that I haven't adjusted but, from looking over the API reference, I can't see any. Is there one? There really isn't much to the code side of things so I'm kinda flummoxed but this. FWIW, the relevant 3.X code: tractsShown = theTractLayer.visible;
bgsShown = theBlockgroupLayer.visible;
//Switch the labelling class for Tracts/Block Groups temporarily for proper print sizes
theTractLayer.setLabelingInfo([ app.tractPrintClass ]);
theBlockgroupLayer.setLabelingInfo([ app.bgPrintClass ]);
if (!tractsShown) {
theTractLayer.setVisibility(true);
}
if (!bgsShown) {
theBlockgroupLayer.setVisibility(true);
}
if (highlightGeom != null) {
highlightSymbol = new SimpleFillSymbol(SimpleFillSymbol.STYLE_FORWARD_DIAGONAL,
new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID,
new Color([255,255,0.1]), 4),new Color([255,255,0,0.1]));
highlightGraphic = new Graphic(highlightGeom, highlightSymbol,null,null);
app.map.graphics.add(highlightGraphic);
}
pTemplate = new PrintTemplate();
pTemplate.exportOptions = {
width: 600,
height: 400,
dpi: 150
};
pTemplate.format = "jpg";
pTemplate.layout = "MAP_ONLY";
pTemplate.preserveScale = false;
pTemplate.showAttribution = false;
var params = new PrintParameters();
params.map = app.map;
params.async = false;
params.template = pTemplate;
jpgMapDiv = theDocument.getElementById("jpegMap");
thePrintTask = new PrintTask(url);
window.setTimeout(function() {
thePrintTask.execute(params, function(result) {
jpgMapDiv.innerHTML = "<img src=\"" + result.url + "\" style=\"border:2px solid black;left:25%\"\>";
var oldExtent = app.preRptExtent;
app.map.setExtent(curExtent);
//Restore the screen-centric label sizes for Tracts/Block Groups
theTractLayer.setLabelingInfo([ app.tractScreenClass ]);
theBlockgroupLayer.setLabelingInfo([ app.bgScreenClass ]);
if (highlightGeom != null) {
app.map.graphics.remove(highlightGraphic);
highlightGraphic = null;
highlightGeometry = null;
}
}, function(err) {
//Print task failed
app.map.graphics.remove(highlightGraphic);
theTractLayer.setLabelingInfo([ app.tractScreenClass ]);
theBlockgroupLayer.setLabelingInfo([ app.bgScreenClass ]);
highlightGraphic = null;
highlightGeometry = null;
});
//Reset the current viewing status of the census tract / blockgroup layers
if (!tractsShown) {
theTractLayer.setVisibility(false);
}
if (!bgsShown) {
theBlockgroupLayer.setVisibility(false);
}
},1000); And the rewritten 4.X- var theTractLayer = app.map.findLayerById("censusTracts");
var tractsShown = theTractLayer.visible;
var theBlockgroupLayer = app.map.findLayerById("censusBlockGroups");
var bgsShown = theBlockgroupLayer.visible;
//Switch the labelling class for Tracts/Block Groups temporarily for proper print sizes
theTractLayer.labelingInfo = [ app.tractPrintClass ];
theBlockgroupLayer.labelingInfo = [ app.bgPrintClass ];
if (!tractsShown) {
theTractLayer.visible = true;
}
if (!bgsShown) {
theBlockgroupLayer.visible = true;
}
if (app.highlightGeom != null) {
var highlightSymbol = new SimpleFillSymbol({
color: new Color([255,255,0,1]),
outline: new SimpleLineSymbol({
cap: "round",
color: new Color([255,255,0,1]),
join: "round",
miterLimit: 1,
style: "solid",
width: 2
}),
style: "forward-diagonal"
});
var highlightGraphic = new Graphic({geometry: app.highlightGeom, symbol: highlightSymbol});
app.theView.graphics.add(highlightGraphic);
}
var pTemplate = new PrintTemplate();
pTemplate.exportOptions = {
width: 600,
height: 400,
dpi: 300
};
pTemplate.format = "jpg";
pTemplate.layout = "map-only";
pTemplate.scalePreserved = false;
pTemplate.attributionVisible = false;
var params = new PrintParameters();
params.view = app.theView;
params.template = pTemplate;
var jpgMapDiv = theDocument.getElementById("jpegMap");
var oldExtent = app.preRptExtent;
//app.theView.goTo(app.curExtent);
print.execute(app.printUrl, params).then(function(printResult) {
jpgMapDiv.innerHTML = "<img src=\"" + printResult.url + "\" style=\"border:2px solid black;left:25%\"\>";
//Restore the screen-centric label sizes for Tracts/Block Groups
theTractLayer.labelingInfo = [ app.tractScreenClass ];
theBlockgroupLayer.labelingInfo = [ app.bgScreenClass ];
if (app.highlightGeom != null) {
app.theView.graphics.remove(highlightGraphic);
highlightGraphic = null;
app.highlightGeom = null;
app.theView.goTo(oldExtent);
}
}).catch(function(printError) {
//Print task failed
app.theView.graphics.remove(highlightGraphic);
theTractLayer.labelingInfo = [ app.tractScreenClass ];
theBlockgroupLayer.labelingInfo = [ app.bgScreenClass ];
highlightGraphic = null;
app.highlightGeom = null;
app.theView.goTo(oldExtent);
});
... View more
09-04-2024
08:09 AM
|
0
|
8
|
2222
|
|
IDEA
|
One of my biggest pet peeves about ESRI is that it constantly takes existing functionality and removes it in subsequent versions. In the 3.X API, infoWindow.Resize(width,height) could be used to adjust the size of the popup according to need. From what I can tell, this isn't really possible in 4.X, except for trying to hack it by modifying the ESRI popup CSS classes (which has not worked for me). Not all maps must be mobile friendly. It's perfectly fine to have apps that are built for the sole purpose of using it with desktop PCs. Sometimes, it's better to have more room to present information back. Restore the resize.
... View more
08-27-2024
02:01 PM
|
3
|
0
|
561
|
|
POST
|
You can't, at least in the same way that QGIS implements this. In Pro, you could achieve the same functionality using a group layer. You would create multiple copies of your layer and use a layer definition query so that each copy only represents one of the possible symbol categories. Once you have all your needed symbol categories as individual layers, select them all, right-click, and chose the option to create a group layer. It's absolutely not as efficient as in QGIS but it should achieve the same result.
... View more
08-26-2024
08:12 AM
|
3
|
1
|
2074
|
|
BLOG
|
The old app I was referring to was created by ESRI (but unsupported) and had the URL of: landsatapp.s3-website-us-west-2.amazonaws.com The url is now dead but that app did have a panchromatic merge option in it. Anyways, thanks for at least confirming that it won't be showing up. Disappointing.
... View more
08-22-2024
09:08 AM
|
0
|
0
|
550
|
|
POST
|
I have some code that works, but not in the way I am intending. I'm using the Sketch widget with a GraphicsLayer and I'm also using the Calcite Color Picker to provide the option to change the color of the sketched graphics. In 3.X, when the dojo color picker would change, I was able to change the color of any new sketched graphics *and* the color of any existing graphics in the graphicsLayer. What I'm experiencing in 4.X is different, when the color is changed in the Calcite color picker, the change event is triggered and the code runs to change the color of the Sketch View Model graphics *and* loop through any graphics in the GraphicsLayer to change the color of those graphics. But visually there is no change. Only when the user draws another graphic will the new graphic and any previous graphic change its color. I want any existing graphic to change its color visually as soon as a color has been selected. Here's a Codepen to try. Draw a polygon. Unselect the graphic. Change the color in the color picker. The existing graphic will not change until you draw a second graphic. What am I missing?
... View more
08-22-2024
09:01 AM
|
0
|
2
|
1239
|
|
BLOG
|
The predecessor for this was the ESRI Landsat APP and it had an option to view a pan-sharpened natural color image. Any chance that this app will get a similar option? I like using this app (and the Sentinel Explorer) to monitor locations in real time and the pan sharpened option is essential for that.
... View more
08-21-2024
09:48 AM
|
0
|
0
|
600
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 12-04-2025 02:30 PM | |
| 3 | 11-13-2025 07:55 AM | |
| 1 | 09-11-2025 10:18 AM | |
| 1 | 09-11-2025 08:03 AM | |
| 1 | 08-13-2025 09:16 AM |