|
POST
|
I installed Node 18.16.0 with the latest ExB. Yes, I always run as Admin. Then I turned off ssl. Same python error in client folder. I'm attempting to escalate my case to see if someone who works on this can look at my issue. C:\WINDOWS\system32>cd C:\ArcGISExperienceBuilder\client
C:\ArcGISExperienceBuilder\client>npm set strict-ssl false
C:\ArcGISExperienceBuilder\client>npm ci
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: react-popper@1.3.11
npm WARN Found: react@18.2.0
npm WARN node_modules/react
npm WARN react@"^18.2.0" from the root project
npm WARN 37 more (@emotion/react, @emotion/styled, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react@"0.14.x || ^15.0.0 || ^16.0.0 || ^17.0.0" from react-popper@1.3.11
npm WARN node_modules/reactstrap/node_modules/react-popper
npm WARN react-popper@"^1.3.6" from reactstrap@8.10.1
npm WARN node_modules/reactstrap
npm WARN
npm WARN Conflicting peer dependency: react@17.0.2
npm WARN node_modules/react
npm WARN peer react@"0.14.x || ^15.0.0 || ^16.0.0 || ^17.0.0" from react-popper@1.3.11
npm WARN node_modules/reactstrap/node_modules/react-popper
npm WARN react-popper@"^1.3.6" from reactstrap@8.10.1
npm WARN node_modules/reactstrap
npm WARN deprecated @npmcli/move-file@1.1.2: This functionality has been moved to @npmcli/fs
npm WARN deprecated @npmcli/move-file@2.0.1: This functionality has been moved to @npmcli/fs
npm WARN deprecated rollup-plugin-terser@7.0.2: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-terser
npm WARN deprecated sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead
npm WARN deprecated popper.js@1.16.1: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1
npm WARN deprecated core-js@2.6.12: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
npm ERR! code 1
npm ERR! path C:\ArcGISExperienceBuilder\client\node_modules\node-sass
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node scripts/build.js
npm ERR! Building: C:\Program Files (x86)\nodejs\node.exe C:\ArcGISExperienceBuilder\client\node_modules\node-sass\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp verb cli [
npm ERR! gyp verb cli 'C:\\Program Files (x86)\\nodejs\\node.exe',
npm ERR! gyp verb cli 'C:\\ArcGISExperienceBuilder\\client\\node_modules\\node-sass\\node_modules\\node-gyp\\bin\\node-gyp.js',
npm ERR! gyp verb cli 'rebuild',
npm ERR! gyp verb cli '--verbose',
npm ERR! gyp verb cli '--libsass_ext=',
npm ERR! gyp verb cli '--libsass_cflags=',
npm ERR! gyp verb cli '--libsass_ldflags=',
npm ERR! gyp verb cli '--libsass_library='
npm ERR! gyp verb cli ]
npm ERR! gyp info using node-gyp@8.4.1
npm ERR! gyp info using node@18.16.0 | win32 | ia32
npm ERR! gyp verb command rebuild []
npm ERR! gyp verb command clean []
npm ERR! gyp verb clean removing "build" directory
npm ERR! gyp verb command configure []
npm ERR! gyp verb find Python Python is not set from command line or npm configuration
npm ERR! gyp verb find Python Python is not set from environment variable PYTHON
npm ERR! gyp verb find Python checking if "python3" can be used
npm ERR! gyp verb find Python - executing "python3" to get executable path
npm ERR! gyp verb find Python - "python3" is not in PATH or produced an error
npm ERR! gyp verb find Python checking if "python" can be used
npm ERR! gyp verb find Python - executing "python" to get executable path
npm ERR! gyp verb find Python - executable path is "C:\Python312\python.exe"
npm ERR! gyp verb find Python - executing "C:\Python312\python.exe" to get version
npm ERR! gyp verb find Python - version is "3.12.1"
npm ERR! gyp info find Python using Python version 3.12.1 found at "C:\Python312\python.exe"
npm ERR! gyp verb get node dir no --target version specified, falling back to host node version: 18.16.0
npm ERR! gyp verb command install [ '18.16.0' ]
npm ERR! gyp verb install input version string "18.16.0"
npm ERR! gyp verb install installing version: 18.16.0
npm ERR! gyp verb install --ensure was passed, so won't reinstall if already installed
npm ERR! gyp verb install version not already installed, continuing with install 18.16.0
npm ERR! gyp verb ensuring nodedir is created C:\Users\jpilbeam\AppData\Local\node-gyp\Cache\18.16.0
npm ERR! gyp verb created nodedir C:\Users\jpilbeam\AppData\Local\node-gyp\Cache\18.16.0
npm ERR! gyp http GET https://nodejs.org/download/release/v18.16.0/node-v18.16.0-headers.tar.gz
npm ERR! gyp WARN install got an error, rolling back install
npm ERR! gyp verb command remove [ '18.16.0' ]
npm ERR! gyp verb remove using node-gyp dir: C:\Users\jpilbeam\AppData\Local\node-gyp\Cache
npm ERR! gyp verb remove removing target version: 18.16.0
npm ERR! gyp verb remove removing development files for version: 18.16.0
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack FetchError: request to https://nodejs.org/download/release/v18.16.0/node-v18.16.0-headers.tar.gz failed, reason: self-signed certificate in certificate chain
npm ERR! gyp ERR! stack at ClientRequest.<anonymous> (C:\ArcGISExperienceBuilder\client\node_modules\node-sass\node_modules\node-gyp\node_modules\minipass-fetch\lib\index.js:110:14)
npm ERR! gyp ERR! stack at ClientRequest.emit (node:events:513:28)
npm ERR! gyp ERR! stack at TLSSocket.socketErrorListener (node:_http_client:502:9)
npm ERR! gyp ERR! stack at TLSSocket.emit (node:events:525:35)
npm ERR! gyp ERR! stack at emitErrorNT (node:internal/streams/destroy:151:8)
npm ERR! gyp ERR! stack at emitErrorCloseNT (node:internal/streams/destroy:116:3)
npm ERR! gyp ERR! stack at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
npm ERR! gyp ERR! System Windows_NT 10.0.19045
npm ERR! gyp ERR! command "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\ArcGISExperienceBuilder\\client\\node_modules\\node-sass\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd C:\ArcGISExperienceBuilder\client\node_modules\node-sass
npm ERR! gyp ERR! node -v v18.16.0
npm ERR! gyp ERR! node-gyp -v v8.4.1
npm ERR! gyp ERR! not ok
npm ERR! Build failed with error code: 1
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\jpilbeam\AppData\Local\npm-cache\_logs\2023-12-13T14_42_41_611Z-debug-0.log
... View more
12-13-2023
06:59 AM
|
0
|
0
|
10166
|
|
POST
|
I did a new install of ExB v. 1.13. I can confirm that the package-lock.json file (along with many others that weren't there before) is now in the client folder. I ran npm ci from the admin prompt. New errors: C:\ArcGISExperienceBuilder\client>npm ci
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: react-popper@1.3.11
npm WARN Found: react@18.2.0
npm WARN node_modules/react
npm WARN react@"^18.2.0" from the root project
npm WARN 37 more (@emotion/react, @emotion/styled, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react@"0.14.x || ^15.0.0 || ^16.0.0 || ^17.0.0" from react-popper@1.3.11
npm WARN node_modules/reactstrap/node_modules/react-popper
npm WARN react-popper@"^1.3.6" from reactstrap@8.10.1
npm WARN node_modules/reactstrap
npm WARN
npm WARN Conflicting peer dependency: react@17.0.2
npm WARN node_modules/react
npm WARN peer react@"0.14.x || ^15.0.0 || ^16.0.0 || ^17.0.0" from react-popper@1.3.11
npm WARN node_modules/reactstrap/node_modules/react-popper
npm WARN react-popper@"^1.3.6" from reactstrap@8.10.1
npm WARN node_modules/reactstrap
npm WARN deprecated @npmcli/move-file@1.1.2: This functionality has been moved to @npmcli/fs
npm WARN deprecated @npmcli/move-file@2.0.1: This functionality has been moved to @npmcli/fs
npm WARN deprecated rollup-plugin-terser@7.0.2: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-terser
npm WARN deprecated sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead
npm WARN deprecated popper.js@1.16.1: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1
npm WARN deprecated core-js@2.6.12: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
npm WARN cleanup Failed to remove some directories [
npm WARN cleanup [
npm WARN cleanup 'C:\\ArcGISExperienceBuilder\\client\\node_modules',
npm WARN cleanup [Error: EPERM: operation not permitted, rmdir 'C:\ArcGISExperienceBuilder\client\node_modules\@arcgis\core\views'] {
npm WARN cleanup errno: -4048,
npm WARN cleanup code: 'EPERM',
npm WARN cleanup syscall: 'rmdir',
npm WARN cleanup path: 'C:\\ArcGISExperienceBuilder\\client\\node_modules\\@arcgis\\core\\views'
npm WARN cleanup }
npm WARN cleanup ]
npm WARN cleanup ]
npm ERR! code 1
npm ERR! path C:\ArcGISExperienceBuilder\client\node_modules\node-sass
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node scripts/build.js
npm ERR! Building: C:\Program Files\nodejs\node.exe C:\ArcGISExperienceBuilder\client\node_modules\node-sass\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp verb cli [
npm ERR! gyp verb cli 'C:\\Program Files\\nodejs\\node.exe',
npm ERR! gyp verb cli 'C:\\ArcGISExperienceBuilder\\client\\node_modules\\node-sass\\node_modules\\node-gyp\\bin\\node-gyp.js',
npm ERR! gyp verb cli 'rebuild',
npm ERR! gyp verb cli '--verbose',
npm ERR! gyp verb cli '--libsass_ext=',
npm ERR! gyp verb cli '--libsass_cflags=',
npm ERR! gyp verb cli '--libsass_ldflags=',
npm ERR! gyp verb cli '--libsass_library='
npm ERR! gyp verb cli ]
npm ERR! gyp info using node-gyp@8.4.1
npm ERR! gyp info using node@18.18.2 | win32 | x64
npm ERR! gyp verb command rebuild []
npm ERR! gyp verb command clean []
npm ERR! gyp verb clean removing "build" directory
npm ERR! gyp verb command configure []
npm ERR! gyp verb find Python Python is not set from command line or npm configuration
npm ERR! gyp verb find Python Python is not set from environment variable PYTHON
npm ERR! gyp verb find Python checking if "python3" can be used
npm ERR! gyp verb find Python - executing "python3" to get executable path
npm ERR! gyp verb find Python - "python3" is not in PATH or produced an error
npm ERR! gyp verb find Python checking if "python" can be used
npm ERR! gyp verb find Python - executing "python" to get executable path
npm ERR! gyp verb find Python - executable path is "C:\Python312\python.exe"
npm ERR! gyp verb find Python - executing "C:\Python312\python.exe" to get version
npm ERR! gyp verb find Python - version is "3.12.1"
npm ERR! gyp info find Python using Python version 3.12.1 found at "C:\Python312\python.exe"
npm ERR! gyp verb get node dir no --target version specified, falling back to host node version: 18.18.2
npm ERR! gyp verb command install [ '18.18.2' ]
npm ERR! gyp verb install input version string "18.18.2"
npm ERR! gyp verb install installing version: 18.18.2
npm ERR! gyp verb install --ensure was passed, so won't reinstall if already installed
npm ERR! gyp verb install version not already installed, continuing with install 18.18.2
npm ERR! gyp verb ensuring nodedir is created C:\Users\jpilbeam\AppData\Local\node-gyp\Cache\18.18.2
npm ERR! gyp verb created nodedir C:\Users\jpilbeam\AppData\Local\node-gyp\Cache\18.18.2
npm ERR! gyp http GET https://nodejs.org/download/release/v18.18.2/node-v18.18.2-headers.tar.gz
npm ERR! gyp WARN install got an error, rolling back install
npm ERR! gyp verb command remove [ '18.18.2' ]
npm ERR! gyp verb remove using node-gyp dir: C:\Users\jpilbeam\AppData\Local\node-gyp\Cache
npm ERR! gyp verb remove removing target version: 18.18.2
npm ERR! gyp verb remove removing development files for version: 18.18.2
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack FetchError: request to https://nodejs.org/download/release/v18.18.2/node-v18.18.2-headers.tar.gz failed, reason: self-signed certificate in certificate chain
npm ERR! gyp ERR! stack at ClientRequest.<anonymous> (C:\ArcGISExperienceBuilder\client\node_modules\node-sass\node_modules\node-gyp\node_modules\minipass-fetch\lib\index.js:110:14)
npm ERR! gyp ERR! stack at ClientRequest.emit (node:events:517:28)
npm ERR! gyp ERR! stack at TLSSocket.socketErrorListener (node:_http_client:501:9)
npm ERR! gyp ERR! stack at TLSSocket.emit (node:events:529:35)
npm ERR! gyp ERR! stack at emitErrorNT (node:internal/streams/destroy:151:8)
npm ERR! gyp ERR! stack at emitErrorCloseNT (node:internal/streams/destroy:116:3)
npm ERR! gyp ERR! stack at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
npm ERR! gyp ERR! System Windows_NT 10.0.19045
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\ArcGISExperienceBuilder\\client\\node_modules\\node-sass\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd C:\ArcGISExperienceBuilder\client\node_modules\node-sass
npm ERR! gyp ERR! node -v v18.18.2
npm ERR! gyp ERR! node-gyp -v v8.4.1
npm ERR! gyp ERR! not ok
npm ERR! Build failed with error code: 1
npm ERR! A complete log of this run can be found in: C:\Users\jpilbeam\AppData\Local\npm-cache\_logs\2023-12-12T20_24_42_875Z-debug-0.log I turned the ssl off then ran it again. No difference.
... View more
12-12-2023
12:36 PM
|
0
|
2
|
10222
|
|
POST
|
I will do that, thanks. Out of curiosity, what are the other two downloads for? I've actually downloaded them once before when on the phone with an analyst, but we both weren't sure what they did.
... View more
12-12-2023
12:03 PM
|
0
|
4
|
10246
|
|
POST
|
Thanks for the response. Yes, I'm running in Admin mode. No, package-lock.json is missing from the client folder. I was also attempting to decipher this, but no luck so far. npm ERR! The `npm ci` command can only install with an existing package-lock.json or
npm ERR! npm-shrinkwrap.json with lockfileVersion >= 1. Run an install with npm@5 or
npm ERR! later to generate a package-lock.json file, then try again. Edit: I just copy/pasted the package-lock.json file but that resulted in tons of missing components.
... View more
12-12-2023
11:40 AM
|
0
|
6
|
10257
|
|
POST
|
Currently I'm running Node.js v. 18.18.2 as suggested in this post with ExB v. 1.13. The command npm ci runs without error in the server directory. It errors in the client directory. I've already tried with the latest Node.js v. 20.1.0. No difference. C:\WINDOWS\system32>cd C:\ArcGISExperienceBuilder\client
C:\ArcGISExperienceBuilder\client>npm ci
npm ERR! code EUSAGE
npm ERR!
npm ERR! The `npm ci` command can only install with an existing package-lock.json or
npm ERR! npm-shrinkwrap.json with lockfileVersion >= 1. Run an install with npm@5 or
npm ERR! later to generate a package-lock.json file, then try again.
npm ERR!
npm ERR! Clean install a project
npm ERR!
npm ERR! Usage:
npm ERR! npm ci
npm ERR!
npm ERR! Options:
npm ERR! [--install-strategy <hoisted|nested|shallow|linked>] [--legacy-bundling]
npm ERR! [--global-style] [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]]
npm ERR! [--strict-peer-deps] [--foreground-scripts] [--ignore-scripts] [--no-audit]
npm ERR! [--no-bin-links] [--no-fund] [--dry-run]
npm ERR! [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
npm ERR! [-ws|--workspaces] [--include-workspace-root] [--install-links]
npm ERR!
npm ERR! aliases: clean-install, ic, install-clean, isntall-clean
npm ERR!
npm ERR! Run "npm help ci" for more info It was suggested in my earlier post to run these commands, but they make no difference. //Turns off ssl
npm set strict-ssl false
//Installs node packages
npm ci
//Turns ssl back on for future protection
npm set strict-ssl true During this attempted installation of Node.js I checked the Chocolatey box when installing as suggested by an ESRI tech over the phone. I guess I can uninstall then reinstall leaving that unchecked. The guide pretty much leaves you hanging here.
... View more
12-12-2023
11:21 AM
|
2
|
12
|
10817
|
|
POST
|
I'm following the guide for the ArcGIS Experience Builder Server install. According to this I can use any of the following Node.js versions. For Windows, I've tried v. 16 and the latest v. 20.10. 0. For Experience Builder 1.12 and newer, we support Node.js of version 16,18,19,20, but not Node 17. Where I'm running into problems is in step 9 of hte guide. Each time I try different combinations of Experience Builder download with a version of Node.js I get this error in the (Administrator) command prompt: C:\Users\jpilbeam>cd C:\ArcGISExperienceBuilder\server
C:\ArcGISExperienceBuilder\server>npm ci
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
npm ERR! code SELF_SIGNED_CERT_IN_CHAIN
npm ERR! errno SELF_SIGNED_CERT_IN_CHAIN
npm ERR! request to https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz failed, reason: self signed certificate in certificate chain
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\jpilbeam\AppData\Local\npm-cache\_logs\2023-12-08T21_40_00_057Z-debug-0.log Don't see much documentation on it. According to the key I can trust the cert, which I did. Even still I get the same error. Experience Builder uses a self-signed certificate in Node.js to support HTTPS. You can run Experience Builder using this certificate by trusting it, or you can use your own certificate. To change the default certificate with your own, replace these two files in the server/cert directory: server.key and server.cert.
... View more
12-08-2023
02:00 PM
|
0
|
1
|
59130
|
|
POST
|
Searching "unable to share" in Google got me this: https://support.esri.com/en-us/knowledge-base/problem-unable-to-share-surveys-publicly-in-arcgis-surv-000017424#:~:text=Navigate%20to%20Organization%20%3E%20Settings%20%3E%20Security,can%20share%20content%20publicly%20option.
... View more
12-01-2023
07:43 AM
|
0
|
0
|
1290
|
|
POST
|
That looks like a different error than the one I created the post about. Can you provide a screenshot of the error including where you are seeing it?
... View more
12-01-2023
06:36 AM
|
0
|
1
|
1296
|
|
POST
|
Hi @jcarlson, Are you saying you've used CSS in a List element's text editor? I've tried some simple internal CSS and each time it gets filtered out. Before: After:
... View more
11-16-2023
08:45 AM
|
0
|
1
|
1886
|
|
POST
|
Hi @ToddFagin , Would it be possible for you to post your working code? I have a similar situation.
... View more
10-23-2023
06:53 PM
|
0
|
1
|
3823
|
|
POST
|
Is there something similar to the District Lookup Widget you can use with the JavaScript SDK? I'd like to search an address and display the features of a hosted feature layer. Using the Search widget with multiple sources example , it allows me to search by features of a feature layer, however this requires the user to know what to look for. I'm looking enter an address to get the feature and its attributes--something similar to the District Lookup Widget. This is what I currently have using the search widget. <html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" />
<title>Access Will County</title>
<style>
html,
body,
#viewDiv {
padding: 0;
margin: 0;
height: 100%;
width: 100%;
}
</style>
<link rel="stylesheet" href="https://js.arcgis.com/4.27/esri/themes/light/main.css" />
<script src="https://js.arcgis.com/4.27/"></script>
<script>
require(["esri/Map", "esri/views/MapView", "esri/layers/FeatureLayer", "esri/widgets/Search"], (
Map,
MapView,
FeatureLayer,
Search
) => {
const map = new Map({
basemap: "dark-gray-vector"
});
const view = new MapView({
container: "viewDiv",
map: map,
center: [-88, 41.5], // lon, lat
scale: 1000000
});
const featureLayerService = new FeatureLayer({
url:
"https://services.arcgis.com/fGsbyIOAuxHnF97m/arcgis/rest/services/DialARide_Service_Areas/FeatureServer",
popupTemplate: {
// autocasts as new PopupTemplate()
title: "Service Area: {Service}",
overwriteActions: true
}
});
const searchWidget = new Search({
view: view,
// allPlaceholder: "Search",
searchAllEnabled: false,
includeDefaultSources: false,
sources: [
{
name: "Search by address",
placeholder: "search by address",
apiKey: "Your API Key Here",
singleLineFieldName: "SingleLine",
url: "https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer"
},
{
layer: featureLayerService,
searchFields: ["Service"],
displayField: "Service",
exactMatch: false,
outFields: ["Service"],
name: "Search by Service Area",
placeholder: "example: Will Ride"
}
]
});
// Add the search widget to the top left corner of the view
view.ui.add(searchWidget, {
position: "top-right"
});
});
</script>
</head>
<body>
<div id="viewDiv"></div>
</body>
</html>
... View more
10-19-2023
07:21 AM
|
0
|
3
|
1105
|
|
POST
|
After creating a case, we found out it was not in the javascript. Rather, one (or all) of the layers in the webmap was causing the warning as it was rendering. I had a hand full of ArcGIS server web services (orthos and lidar) in the webmap. After creating a new webmap and adding those layers with the exact same properties, styles and effects the warning was no longer there. If anything, it's a work-around.
... View more
10-05-2023
12:42 PM
|
0
|
0
|
1568
|
|
POST
|
After looking closer the renderingRule has been depreciated. https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html#renderingRule
... View more
10-04-2023
09:13 AM
|
0
|
1
|
1587
|
|
POST
|
I updated my app to v. 4.27 from 4.24 and now I'm getting this warning. I changed the property from ImageryLayer to rasterFunction, however that caused the imagery not to draw. Any help appreciated. EDIT: The app I'm working with uses webmaps. In the webmaps are map services. Here is the script: <script>
require(["esri/Map",
"esri/views/MapView",
"esri/widgets/Search",
"esri/widgets/Locate",
"esri/widgets/LayerList",
"esri/layers/ImageryLayer",
"esri/widgets/Legend",
"esri/widgets/Expand",
"esri/widgets/Swipe",
"esri/WebMap",
"esri/layers/support/RasterFunction",
], (Map, MapView, Search, Locate, LayerList, ImageryLayer, Legend, Expand, Swipe, WebMap, RasterFunction) => {
//webmap IDs
const webmapids = [
"e67a8eb6768641c19d4a7c5df394dbf4", //DTM
"bfc5b0242adb42bfb0fc41e54497dfc8", //DSM
"6ed3d2e495db4e859a73d2a32ce3d576", //HEDEM
"d653b18bc941458491e06e657e10f393", //Intensity
"a9ab25b1c7204764b2fabad6fc7a4635", //IR
"e6bab92ebc524072a3305ec8f128e8f8", //Soil
"2f9acebfb8db4e10bb6dddab8d3239c7", //ClosedDepressions
];
const webmaps = webmapids.map((webmapid) => {
return new WebMap({
portalItem: {
// autocasts as new PortalItem()
id: webmapid,
}
});
});
console.log("map constructor created")
// add image services used in the swipe map
const imagery2021 = new ImageryLayer({
url: "https://gis.willcountyillinois.com/image/rest/services/Orthoimagery/Orthos_2021_6IN/ImageServer",
rasterFunction: [],
// title: "2021 Orthoimagery 6in",
});
// webmaps[0].add(imagery2021);
/************************************************************
* Initialize the View with the first WebMap
************************************************************/
const view = new MapView({
map: webmaps[0],
container: "viewDiv"
});
//use promise function.when to add the imagery layer after the webmap group layer, hence, rendering it over the group layers
view.when(function () {
webmaps[0].add(imagery2021);
});
// create a new Swipe widget
const swipe = new Swipe({
leadingLayers: [imagery2021],
// trailingLayers: [imagery2021],
position: 35, // set position of widget to 35%
dragLabel: "drag left or right",
view: view
});
// add the widget to the view
view.ui.add(swipe);
/************************************************************
* On a button click, change the map of the View
************************************************************/
document.querySelector(".btns").addEventListener("click", (event) => {
const id = event.target.getAttribute("data-id");
if (id) {
const webmap = webmaps[id];
view.map = webmap;
webmap.when(function () { webmap.add(imagery2021); });
const nodes = document.querySelectorAll(".btn-switch");
for (let idx = 0; idx < nodes.length; idx++) {
const node = nodes[idx];
const mapIndex = node.getAttribute("data-id");
if (mapIndex === id) {
node.classList.add("active-map");
} else {
node.classList.remove("active-map");
}
}
}
});
// group widgets on right so expand does not cover other widgets on that side
let expand1 = new Expand({
expandTooltip: "info",
view: view,
content: document.getElementById("infoDiv"),
expandIconClass: "esri-icon-question",
group: "top-right"
});
let expand2 = new Expand({
expandTooltip: "legend",
view: view,
content: new Legend({
view: view,
style: "classic", // other styles include 'classic'
}),
expanded: false,
group: "top-right"
});
let expand3 = new Expand({
expandTooltip: "layer list",
view: view,
content: new LayerList({
view: view,
}),
group: "top-right",
});
view.ui.add([expand1, expand2, expand3], "top-right");
//add search widget
const searchWidget = new Search({
view: view,
});
const searchWidgetExpand = new Expand({
content: searchWidget,
expanded: false,
})
//add search widget to the view
view.ui.add(searchWidgetExpand, {
position: "top-left"
});
//locate widget
const locateBtn = new Locate({
view: view
});
//add locate widget to the view
view.ui.add(locateBtn, {
position: "top-left"
});
});
</script>
... View more
10-04-2023
08:12 AM
|
0
|
2
|
1616
|
|
POST
|
Is the search widget not included? I've put "search" and "Search" in the ui.compenents and they cause an error. ui.components = [
"attribution",
"zoom",
"search"
];
... View more
09-26-2023
09:26 AM
|
0
|
1
|
1755
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 11-13-2025 08:22 AM | |
| 1 | 11-12-2025 08:37 AM | |
| 1 | 10-22-2025 02:14 PM | |
| 1 | 01-17-2019 08:21 AM | |
| 1 | 07-06-2023 07:08 AM |
| Online Status |
Offline
|
| Date Last Visited |
Friday
|