|
POST
|
Robert Scheitlin, GISP - So the deeper I git here, the more confused I get. Looking at spatial references, it's clear that the features found in the buffers are WKID 4326 don't have the same WKID as the map, which is 102100, although they come from a map services that has the map's SR. Not sure why. Anyway, so I add the below line, which fixes the WKID for what's returned... bufferQuery.outSpatialReference = this.map.spatialReference; But that doesn't put anything on the map. The buffer that I'm creating with the following snippet also has WKID 4326 ... inputBuffer = GeometryEngine.geodesicBuffer(myCtrPnt,[1000],"feet",true); ... my understanding was that geodesicBuffer would handle either of WGS84 and Web Mercator. I don't see a way to put any params into GeometryEngine like some of the GeometryService examples show. Is that what's needed here?
... View more
09-10-2020
09:19 AM
|
0
|
3
|
2172
|
|
POST
|
That's what I thought but you bring up a good point - I ran into an issue with Linear/Angular spatial reference earlier. So maybe I'm mixing spatial reference. I'll take a look at that -thanks, Robert!
... View more
09-09-2020
12:28 PM
|
0
|
4
|
2172
|
|
POST
|
Working on a custom WAB widget (JSAPI 3.x) that generates some buffers around user selected input features. Wanting to highlight features found within buffer on the map. The following code (amalgamated from various online examples) finds the features but it won't highlight anything in the map: ...
bufferQuery = new Query();
bufferQuery.returnGeometry = true;
bufferQuery.where = "1=1";
bufferQuery.outFields = ["*"];
bufferQuery.SpatialRelationship = "SPATIAL_REL_CONTAINS";
bufferQuery.geometry = inputBuffer;
...
var selectionSymbol = new SimpleMarkerSymbol(
SimpleMarkerSymbol.STYLE_CIRCLE,
12,
new SimpleLineSymbol(
SimpleLineSymbol.STYLE_NULL,
new Color([247, 34, 101, 0.9]),
1
),
new Color([207, 34, 171, 0.5])
);
myFeatureLayer.setSelectionSymbol(selectionSymbol);
myFeatureLayer.selectFeatures(bufferQuery, FeatureLayer.SELECTION_NEW, function(results) {
console.log("found ", results.length, " features in buffer");
}); I've played around with taking each taking and making a new Graphic from it to then add to a graphics layers but my understanding from what I read was that the above or some variation thereof should highlight the selection using the specific symbology. Something missing?
... View more
09-09-2020
10:23 AM
|
0
|
6
|
2229
|
|
POST
|
So it's ConfigManager.js - cool! I will try that. Thank you! I need to go back and review some of the documentation on lifecycle and loading for WAB (to the extent that it's documented ). When I was starting out and staring down the abyss of building my first widget, it didn't make a heckuva lotta sense. Maybe now it will.
... View more
09-01-2020
07:36 AM
|
0
|
1
|
1340
|
|
POST
|
So I would like to log some simple website/web application hits in a web app, log page, time, user name when someone accesses the app. This older thread here suggested doing: console.log(IdentityManager.credentials[0].userId)
//returns <user@domain> This works great when used inside one of my widgets, and I might use it there to figure out who actually uses them. But where would be the place to put this to log web app access before any widget's been activated? I haven't delved into the jimu/WAB code beyond life inside widgets. First attempt at putting it in something like main.js have failed and returned Null. I'm not really wanting to go through Portal, as suggested here, where an app is shared with everyone and not accessed through Portal and necessarily registered there. But maybe registering it there regardless is the solution? Any guidance is appreciated.
... View more
09-01-2020
06:03 AM
|
0
|
3
|
1390
|
|
POST
|
Been racking my brains here (bruisin' em). Am I missing the obvious? I've come across two BUGS that don't sound exactly like have what's going on here by have given me reason to tweak my solution. First one - BUG-000095810: The Search widget returns a "no results found" messa.. Search widget does not work against fields using coded value domains. Sure enough the Feature Layer I'm searching had domains although not the field that is my display and search field. So I replaced Second one - BUG-000121482: The Search widget in Web AppBuilder for ArcGIS fails.. . Search widget apparently doesn't work with SQL database views. I had recently set this up with a view to avoid the join someone else's had set up in the map project, which in turn prevented pagination. So I tried various values for maxSuggestions and finally replaced the view with a completely new table without domain and republished using Pro 2.5. I have created a brand new app in WAB to rule out that I've contaminated any of the OTB files. I've tried to go through the actual API code for inits.js and Search.js. But it's impossible to decipher the minified code. My gut tells there is some communication breakdown between the widget and the map service. But I don't know how to further test. Any suggestions?
... View more
08-31-2020
10:30 AM
|
0
|
1
|
1642
|
|
POST
|
So there is nothing worse, I find, than wanting to reuse some code you have successfully deployed in once place and not getting it work elsewhere. I'm running into this with using Search (JSAPI 3,x) in my latest custom widget for WAB 2.16. It's a simple search with suggestions that I'm recycling. Gave it a new name and hooked it into a new service but it bombs when trying to return suggestions. This is what I'm doing, maybe someone spots my obvious mistake. // plugged in the widget.html, I have
<div data-dojo-attach-point="searchWithSuggestions" id="searchWithSuggestions"></div> Then I do this in Javascript... // widget.js
startup : function() {
[ ... ]
var searchUrl = "https://.....Mapserver/1 ";
var searchSources = [
{featureLayer: new FeatureLayer(searchUrl),
name: 'Layer 1',
outFields: ["*"],
displayField: ["NAME"],
searchFields: ["NAME"],
suggestionTemplate: "${NAME}",
enableSearchingAll: false,
enableSuggestions: true,
exactMatch: false,
minCharacters: 3
}
];
this.searchWithSuggestions = new Search({
sources: searchSources,
popupEnabled: false,
autoSelect: false,
enableSourcesMenu: false,
enableSuggestions: true,
maxSuggestions: 5,
allPlaceholder: "enter your search here",
autoNavigate: false
}, "searchWithSuggestions");
this.searchWithSuggestions.startup();
}, Search widget shows up in widget. But when i start typing and get past 3 characters (minCharacters), it fails with So something clearly is not right with the suggestions. I've checked the map service and it supports pagination. Something wrong with my code, something else I need to check ?
... View more
08-27-2020
01:43 PM
|
0
|
2
|
1688
|
|
POST
|
So I ended up tweaking Robb's solution slightly to make it work for me... you can find the code in my comment to his post. Worked great!
... View more
08-13-2020
11:33 AM
|
0
|
0
|
1416
|
|
POST
|
Michael Robb - Glad that Robert Scheitlin, GISP pointed me to this page. I tried the above edit in jimu.js/utils.js and it saved the day! In fact, I had to add all of the below because part of what you're showing up there was not present. (I'm on WAB 2.16) mo.createWebMap = function( ...
def.then(function(response) {
var map = response.map;
var handle = query(".title",map.infoWindow.domNode)[0];
var dnd = new Moveable(map.infoWindow.domNode,{
handle:handle
});
// hide the info window popup by default
html.setStyle(map.infoWindow.domNode, "visibility", "hidden");
aspect.before(map.infoWindow, "setContent", function(method, args){
// show the info window if there are features, otherwise hide it
html.setStyle(map.infoWindow.domNode, "visibility", map.infoWindow.features ? "visible": "hidden");
});
});
return def;
}; Also, I had to bring in Moveable.. define([
'dojo/aspect',
'dojo/dnd/Moveable',
... ],
function(aspect,Moveable,... ) Anyway, glad I found this, and thanks again to both of you!
... View more
08-13-2020
11:27 AM
|
1
|
0
|
2568
|
|
POST
|
I usually work in Jupyter Notebooks when working with arcpy and only use Code for web development, so I hadn't noticed. But I see what you're saying... When I try to get info about arcpy.mp: But once inside, I get more info on everything ...
... View more
08-13-2020
10:10 AM
|
0
|
0
|
5819
|
|
POST
|
Working on a web app in WAB-DE that uses a Portal web map with pre-configured popups. Even for layers where popups have been disabled in web map (in Portal WebViewer), the map will still open a popup anywhere you click and show this... The only related thread I've found was this one: Disable "No information popup" . Apparently a quite familiar issue. Is there a way to do this programmatically through custom code under the hood of WAB-DE ? Basically, I want no popup at all where webmap does have a pre-configured (HTML) popup.
... View more
08-13-2020
09:37 AM
|
0
|
3
|
1458
|
|
IDEA
|
Anyone ever figure out how to get this annoying behavior to stop? Is there a way to override the popup triggering event with custom WAB-DE code?
... View more
08-13-2020
09:25 AM
|
0
|
0
|
2873
|
|
POST
|
I've run into all kinds of quirks with Pro symbologies but when I try this (using Lotarea (Double) for a county layer of lots), I can literally pick any type of 'Method' in Dan's screenshot up there and it works. Also, 'Graduated Colors' won't even show me non-numeric fields to pick. All the 'Text' field show up only for a symbology mode like 'Unique Values'. Are you somehow limiting sample size ('Advanced symbol options') and is that skewing your classes/breaks? Just thinking out loud...
... View more
08-11-2020
03:42 PM
|
0
|
1
|
4404
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 08-16-2025 07:32 AM | |
| 1 | 02-09-2024 05:18 PM | |
| 1 | 02-04-2025 09:27 AM | |
| 1 | 03-22-2019 10:55 AM | |
| 1 | 03-05-2020 08:46 AM |
| Online Status |
Offline
|
| Date Last Visited |
a month ago
|