POST
|
Thanks. That appears to be what I wanted. That works in my application. Until it does something else unintended. 😂
... View more
a month ago
|
0
|
0
|
146
|
POST
|
Hey Rene, thanks for responding. That sample works great for FeatureLayers but I'm dealing with a GraphicsLayer. Here's a CodePen using the Sketch Widget sample as a base: https://codepen.io/evtguy/pen/xxoPorp I've tried my best to modify the sample to reflect the code in my actual application. Once you open the CodePen, here's what to do: Use the Sketch tool to add a point. Click anywhere in the map to deselect the graphic. Now click on the added point graphic to display the popup. Close the popup. The graphic remains selected.
... View more
a month ago
|
0
|
2
|
152
|
POST
|
I've spent far too much time today trying to figure this out. In the 4.X API, how do you unselect a selected graphic? My specific issue is with a popup on a graphicsLayer where the graphic is not unselected when the popup is closed. FWIW, this would be my relevant code: // Search for graphics at the clicked location
theView.hitTest(screenPoint,{include:theGLayer}).then(function (response) {
if (response.results.length) {
var theContent = app.plmf.graphicsLayerContent(response.results[0].graphic);
var theTitle = "User Defined Project";
theView.openPopup({title:theTitle, content:theContent, location: event.mapPoint});
//}
}
});
});
//Unselect the interactive project when the popup is closed
reactiveUtils.watch(
// getValue function
() => theView.popup.visible,
// callback
(visible) => {
if (visible == true) {
//Do Nothing
} else {
console.log('The popup is closed');
theView.popup.clear();
}
});
... View more
a month ago
|
0
|
4
|
206
|
POST
|
Thanks, guys. I gave the nod to Tony since his post is how I would like to implement this in 4.x but I appreciate the context that GeoGalvanic provided. It is weird how the use of popupTemplate isn't documented in the GraphicsLayer Help Docs but at least it does work. My implementation is literally using one user generated feature so I don't think there's going to be any performance hit in using GraphicsLayer vs FeatureLayer. I also prefer the freedom of storying either a point, line, or polygon in one layer using GraphicsLayer. Cheers!
... View more
08-09-2024
08:55 AM
|
0
|
0
|
161
|
POST
|
Can a 4.x GraphicsLayer have a popup? This was possible in 3.x but I'm not seeing it in 4.x. In my 3.x application, users primarily worked using a combo box picklist of mapped features but I used the GraphicsLayer and Draw toolbar to provide the option of manually drawing a graphic on the map but still take advantage of some reporting functionality that I have in the app. The report functionality could extract some of the information that a user provided when adding the graphic for use inside the final report product. I guess if GraphicsLayers can't have attributes I might have to use a FeatureLayer like one. Ugh. One step forward, two steps backwards..
... View more
08-08-2024
03:47 PM
|
0
|
3
|
234
|
POST
|
THANK YOU! Your approach might be the least painful option for me so I'll see if I'm able to incorporate it.
... View more
08-06-2024
03:19 PM
|
0
|
0
|
363
|
POST
|
No, I don't believe I would have any issues doing so. I kinda considered downloading the API as an option to keep my 3.x app running (I know ESRI isn't pulling the CDN plug for awhile but still). The biggest challenge seems to be finding the actual 3.x download. I keep getting in a circular loop while looking for it. Ugh. I'm too old and too close to retirement to learn NPM. 😆
... View more
08-06-2024
02:53 PM
|
0
|
1
|
366
|
POST
|
Thanks, Joel. While I have read the announcements about each new 4.x version, these migration issue aspects have definitely not been on my horizon. And yes, as you commented, I am using the ESRI CDN rather than self hosting the API. In my dojoConfig, I have tried providing a full URL path for my custom modules but it keeps appending that to the end of the core ESRI baseURL. This shouldn't be so difficult but, if I have to append them all into an 8,000 line JS file, I'll do it. 😩 [By the way, I don't actually use Declare in my code base. I didn't know about that getting dropped and it was pure bad luck that I randomly copy/pasted that from the Dojo help pages. Doh!]
... View more
08-05-2024
03:38 PM
|
0
|
3
|
409
|
POST
|
Thanks for chiming in. Yikes. I don't like this version of Chose Your Own adventure. My original post might have led to some confusion so let me clarify- my "modules" aren't Dojo/Digit dependent per se- I'm just using the technique to break up all my code into smaller blocks based on functionality. For example, one module might have all the pop up content generating functions, another module generates a custom report. I may use an odd dojo item (dojo.number.format) but mostly they reference to JS API items like queryTask or Geometry. It just seems like no matter what is actually inside the module, it will choke. I've tried pared down versions and the end result is the same. Here's an ESRI JS API only version with a blank function: String.prototype.toProperCase = function () {
return this.replace(/\w\S*/g, function(txt){return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();});
};
define ([
"esri/geometry/Extent",
"esri/layers/FeatureLayer",
"esri/SpatialReference",
"esri/tasks/BufferParameters",
"esri/tasks/FeatureSet",
"esri/tasks/GeometryService",
"esri/tasks/query",
"esri/tasks/QueryTask"
], function (
Extent, FeatureLayer, SpatialReference, BufferParameters, FeatureSet, GeometryService, Query, QueryTask
) {
return declare(null,{
create: function () {
}
});
}); Here's a simple module from Dojo's website: define([
"dojo/_base/declare",
"dojo/dom",
"app/dateFormatter"
], function(declare, dom, dateFormatter){
return declare(null, {
showDate: function(id, date){
dom.byId(id).innerHTML = dateFormatter.format(date);
}
});
}); Both will error out with the same message. For the heck of it, here are the consoles from my 4.x attempt on the left and the existing 3.x app which works fine. The only difference in dojoConfig I see is that the 4.x dojoConfig specifies baseUrl whereas the 3.x dojoConfig does not. Again, I'm only using this approach because that's how I did it with 3.x If there's a different (and suggested) way of dividing up / compartmentalizing your code with 4.x, I'm all ears.
... View more
08-05-2024
11:57 AM
|
0
|
1
|
429
|
POST
|
I had hoped that I could just fade into the sunset with my 3.x JS API application and not have to migrate it to 4.x but the slow & delayed pace of Experience Builder functional parity makes me feel like I'll have to migrate it. The app I have is what I would call "plain" vanilla and just uses the JS API and Dojo components available when using the API. In other words, I'm not doing any React, Typescript etc. When I developed it, I used the example in the 3.x API documentation where I created custom modules to group together my app's functionality and then load/reference them as it is outlined here under Step 4 (Load a custom module) in the Documentation. Is this method/practice still valid with the 4.x API or should I be doing this some other way? My app breaks when it hits the Require statement in my main JS file and attempts to reference the custom module. The error thrown provides zero detail as to the issue so I'm mystified as to why it's failing at that point. Steve
... View more
08-05-2024
08:52 AM
|
0
|
9
|
459
|
POST
|
Thank you, that did it. Sometimes it gets confusing when you're learning and throw together several different code snippits in order to piece together an app. I'm a little leery about hard coding the height. When I didn't specify the height, it added the scrollbar but it would push other accordion items off the page because the accordion container had overflow hidden. Any thoughts on getting all this to play nice within the screen real estate? I have 6 accordion items and most of these will have content that needs scrolling. Coming from the 3.x world and Dojo, I like how that accordion panel behaves and just pushes any unopened accordion items to the bottom and utilizes the available vertical screen space allotted for the overall accordion widget.
... View more
08-01-2024
11:16 AM
|
0
|
0
|
151
|
POST
|
For starters, you can highlight the area in the Imagery Map Feedback app to let ESRI know it should consider updating that area. Your deadline will likely come up before ESRI actually does anything. As Eugene mentions, you can see if any County or State agencies have any ortho resources that you could leverage to cover this. Short of these, you could consider purchasing an image through Sky-Fi. If they have an existing image in their collection, the turnaround on that is usually 24 hours. They do have an area minimum for ordering and it varies depending on image resolution but it's not that bad. I swear there was an announcement at the ESRI UC about integrating Sky-Fi's holdings into AGOL (likely as Premium content?) but I can't recall the specifics or find them with a quick search.
... View more
08-01-2024
10:57 AM
|
1
|
0
|
219
|
POST
|
The content inside my accordion items are too long so they get cut off. How do I add scrollbars? In general, the CSS controlling that would be "overflow-y" but I haven't been able to figure out the correct CSS item to target inside Calcite to get this to work. Thanks! Steve
... View more
08-01-2024
10:38 AM
|
0
|
2
|
175
|
POST
|
Could be this issue. There is a patch to install. https://support.esri.com/en-us/knowledge-base/impact-of-google-chrome-and-microsoft-edge-127-updates--000032813
... View more
07-30-2024
02:07 PM
|
1
|
1
|
1277
|
POST
|
You haven't mentioned if this is Enterprise or AGOL EB. While I haven't done this yet in EB, I suspect the answer is the same as if you were using the JS API (which I have done). In that case, you have to create print templates in ArcGIS Pro and publish them as layout templates. See the Enterprise Help Information on this (link here). Like I said, I have done this with the JS API to make D & E sized maps.
... View more
07-30-2024
11:44 AM
|
0
|
1
|
147
|
Title | Kudos | Posted |
---|---|---|
1 | a week ago | |
3 | 2 weeks ago | |
3 | 3 weeks ago | |
1 | 3 weeks ago | |
1 | a month ago |