POST
|
In the code you have included, there is a function called doShow(). If you always want to not show the popup, just comment out or delete the second line of code in that function. That will have the effect of zooming to the feature, but not turning on the popup. That's the simplest solution. Alternatively, since the showSelections() function has three different instances where it calls doShow(), you have an opportunity for one or more of those instances to call doShow() as it is already to zoom to the feature and show the popup or to call a new function that would zoom to the feature and not show the popup. I added a function called doShowNoPopup() for this second purpose. function doShowNoPopup(){ map.infoWindow.setFeatures(features); } Then in showSelections (), replace one or all of the the doShow() calls with doShowNoPopup(). This solution has the advantage of keeping doShow() in place so that other functions may call it with the original functionality.
... View more
07-29-2022
08:36 AM
|
0
|
0
|
635
|
POST
|
I know it's been years since this question was posted, but I had the same question and worked out an answer. The doShow() function has two lines. The first highlights the feature and the second shows the popup. I made another function called doShowNoPopup() that just has that first line, map.infoWindow.setFeatures(features);. Then I call doShowNoPopup() from ShowSelections().
... View more
06-02-2021
12:48 PM
|
2
|
2
|
954
|
POST
|
Thanks for the answer. Again, not what I was hoping for but good to know.
... View more
04-08-2020
10:08 AM
|
0
|
0
|
588
|
POST
|
Thank you. That was not the answer I wanted, but it means I can stop spending time doing something that won't work. These popup expressions are associated with the county parcel layer for which they are written. Is it possible to associate the expressions with the group layer that contains all the county parcel layers rather than the individual county parcel layers, so that each of the parcel layers (all with the same fields) can reference the existing expressions? Or do I need to copy my expressions for each county parcel layer?
... View more
04-08-2020
07:09 AM
|
0
|
2
|
588
|
POST
|
I am using Arcade to customize the popup in a WAB Web Map. I am using parcel data in Florida and I have two fields in the data that use the same set of numeric county codes (CO_NO and CONO_PRV_H). I have a function to lookup the numeric value and return the county name. In {expression/expr12} I have function lookupCountyCode(countyCode){... return countyName}. I would like to be able to call that function from another expression or from the popup configuration, but I have not found any examples of how to do that. The obvious syntax would be {expression/expr12}.lookupCountyCode($feature["CO_NO"]) and then where I need the other value {expression/expr12}.lookupCountyCode($feature["CONO_PRV_H"]) but that doesn't do what I want. I see "County Code Lookup" (the name I gave my expression) in the Existing functions in the Arcade interface. If I click it, it adds a copy of my code to the current expression. I don't want another copy of the code to maintain. I want a way to call the function from outside the expression and I want to pass in the field as a value. I can't figure out what the syntax is. I even added a script tag to the HTML view of the popup Configuration with the lookupCountyCode function in it. <script type="text/arcade">function lookupCountyCode(countyCode){...return countyName}</script> But when I saved the map, the script tag and function vanished. How can I call this function from outside the expression and pass it a data field as a parameter? Or is this a limitation of Arcade? Then, once I have resolved this for the first county parcel layer, how can I apply it to all 67 county parcel layers without having to re-create all of my expressions repeatedly?
... View more
04-08-2020
04:40 AM
|
0
|
4
|
644
|
POST
|
I think I found what I need here: Use URL parameters—Web AppBuilder for ArcGIS | Documentation . I see I can pass in showLayers=<LayerName1>;<LayerName2>. All I need for a numeric lookup is to add in a lookup table.
... View more
01-22-2020
05:44 AM
|
1
|
0
|
1234
|
POST
|
Thank you. This looks like a good starting point. I will have to work with it a bit. I will report back when I have progress or ask other questions if I get stuck.
... View more
01-10-2020
07:00 AM
|
0
|
0
|
1234
|
POST
|
I have a web map with multiple layers served from my local rest map services. I want to build a web app that will allow me to specify in the url which of those layers are on or off. I understand the default visibility is set in the web map. But the visibility can be changed in the web app with the LayerList widget. I want to change the visibility at load time without the user having to open the LayerList. I know there is an entry point to affecting the layer visibility through code because LayerList does it. I want to pass in my url http://<path>/?layers=1,2,3 so that all layers are turned off except those that match to indexes 1, 2, and 3 in my array of layers. I can take care of a lookup to get the names of these layers. Once I have a reference to the operating layers, I can set the visibility property to true or false for the specified layers. When I step through my code, I can see that the visibility values are changed, but there is no corresponding impact on the map. I think what I am missing are 1) referencing the operating layers correctly (this.operLayerInfos in LayerList/Widget.js); and 2) calling my function from a proper location where it will be invoked when the map loads. Or maybe visibility isn't the right property? I would appreciate any guidance for how/where to add this functionality. First draft code in attachment.
... View more
01-07-2020
09:50 AM
|
0
|
3
|
1382
|
Title | Kudos | Posted |
---|---|---|
2 | 06-02-2021 12:48 PM | |
1 | 01-22-2020 05:44 AM |
Online Status |
Offline
|
Date Last Visited |
07-29-2022
11:54 AM
|