POST
|
Using JS API 4.14, I have a custom Accessor class serving as the view model to a UI widget. I want to query a server to get a list of service groups available, and render that list in the UI. I have a property in my class that I want to set to the return value of the request: @property() layerGroups: string = null; I'm trying to use the code below to make the request and set the value, but this does not work. No console error, but the value of layerGroups remains null. I assume because request is an async operation, so it doesn't have access to the return value at the right time. > widget.viewModel.layerGroups > null const getLayerGroups = request("https://my.server/arcgis/rest/", {query: {f: "json"}, responseType: "json"}).then(response => this.set(this.layerGroups, response.data.folders)); Normally, I'd just nest the rest of my code in the callback and I'd have easy access to the returned value. But the Accessor class/widget code is more compartmentalized, and I'm not sure how and where to implement things. How can I make this work? Do I need to put my async operations in a different lifecycle section of my class (I've only tried them in the constructor)? Is this a scoping issue? Appreciate any advice you have. Thanks! EDIT: request here is the esri/request: import request = require("esri/request");
... View more
03-11-2020
08:19 AM
|
0
|
3
|
810
|
POST
|
It must have just been a blip in the service somewhere. After doing nothing but reloading the page just now, things are back to normal. Thanks for the reply though!
... View more
01-21-2020
07:09 AM
|
0
|
0
|
554
|
POST
|
Using the 4.14 Javacript API, I have a simple page set up with a map uses a vector basemap like so: var map = new Map({
basemap: "topo-vector",
layers: mask
}); I'm using the basic claro/light css styles: <link rel="stylesheet" href="https://js.arcgis.com/4.14/dijit/themes/claro/
claro.css" />
<link rel="stylesheet" href="https://js.arcgis.com/4.14/esri/themes/light/
main.css" /> with no additional styles applied to my map or view. As of this morning, labels are no longer showing up, and as users pan and zoom, several tiles are failing to load with 404 errors. If I switch the code to use a non-vector basemap, everything seems to work properly. And when I view the basemap in the arcgis online viewer, the labels appear fine. status.arcgis.com reports normal operation for basemaps and I didn't change my code between when it was working and now. Is anyone else having issues with vector basemaps? Am I missing some kind of style declaration that's required to show labels?
... View more
01-21-2020
06:53 AM
|
0
|
2
|
598
|
POST
|
I have a JavaScript application using the Identity Manager (esriId) to register user tokens generated by ArcGIS Server. I've based the code off of this example: Identity Manager with info persisted client side | ArcGIS API for JavaScript 3.30 My application is using a version of the api less than 3.10, so I don't have access to esriId.destroyCredentials; Is there another way to clear the credentials? I've tried deleting the esri_jsapi_id_manager_data local storage key, but deleting the key doesn't seem to stop the baseUnload function that stores the credentials from doing so when the page is closed.
... View more
11-08-2019
12:50 PM
|
0
|
0
|
369
|
POST
|
So I have set up a page with my login inputs and map. On submit, username and password are sent to the generateToken endpoint. The token response is passed to ID Manager using the functions below: function submitCreds(){ var password = passwordInput.get("value"); var email = emailInput.get("value"); var requestHandle = esriRequest({ "url": "arcgis/tokens/generatetoken", "handleAs": "json", "content": { f: "json", username: email, password: password, }}, {usePost: true} ); requestHandle.then(requestSucceeded, requestFailed); } function requestSucceeded(response, io){ esri.id.registerToken({ "expires": response['expires'], "server": "https://myserver/arcgis/rest", "ssl": true, "token": response['token'], "userId": emailInput.get("value") }); domConstruct.place("<b>Login Successful!</b>", "login- result", "last"); } Logging in through this form doesn't work to display my secure content and I'm still getting the default ArcGIS Server login dialog when the page loads. How do I load the secure service after the token has been registered? Also, how can I prevent the default login dialog from appearing? Thanks for your help! EDIT: I'm looking at the output of esri.id.findCredential("myServer/arcgis/rest/services", "myUser"); and the only differences between the output when I sign in with my form and with the default form are that when using the default login prompt, the resources array contains the specific secure layer my app will load (through my form, the array contains the server directory, myserver/arcgis/rest/services), and there are properties validity: 60 and _refreshTimer: 75 that are missing from the credential registered with my form. Do I need to scope the token registration to a specific layer or resource? Or is there another step I need to take to force the app to use the token when it makes the calls to add my secure layer? EDIT2: Solved my problem. I didn't realize the token has to be registered before the layer object for the secure layer is created. Once I moved the code block that created the layer object, the default login stopped appearing and my login form worked as expected.
... View more
06-17-2019
07:47 AM
|
0
|
0
|
2286
|
POST
|
I was able to resolve this problem by ensuring that all the IP addresses registered to the machine resolved to the same hostname. The cloud environment I was using gave the instance an internal IP that didn't resolve to the DNS hostname (in addition to the public one that did resolve--discovered this by checking the outputs of hostname -i and hostname -I). Adding a line to /etc/hosts to assign the fully qualified domain name of the machine to the internal address (output of hostname -I) and then installing ArcGIS Server fixed the problem.
... View more
06-14-2019
07:54 AM
|
0
|
0
|
1840
|
POST
|
I have a website that uses the JavaScript API (3 transitioning to 4) to display data served by ArcGIS Server (10.7). I want to secure all the ArcGIS Server services and require each user of my website to login with a unique user-name. I want to customize the login prompt on the website to include more information and links to account creation/recovery options. Is it possible to create this custom login prompt with tools built-in to ArcGIS Server or the JavaScript API? Or will I need to create my own login-form? If I need to create my own form, how can I link it to ArcGIS Server to allow users to access the underlying secure services? I've looked at the IdentityManager class, but I can't tell if that is what I need to implement what I'm thinking of and many of the examples use either ArcGIS Online or Portal, but I can't use either of those.
... View more
06-12-2019
12:38 PM
|
0
|
2
|
3093
|
POST
|
Thanks, Earl. I tried adding that line to my unit file in various places but none have yet solved the problem. Adding it in the [Unit] or [Install] Section, the service can start successfully, but SELinux still alerts about libjsig.so. Adding it to the [Service] Section, starting the service fails with SELinux denying transition on the startserver.sh script. Is there a specific order the lines in my unit file have to be arranged? Here are the current contents of the file: sudo cat /etc/systemd/system/arcgisserver.service : # ------------------------------------------------------------------ # ArcGIS Server systemd unit file # ------------------------------------------------------------------ # # Configure ArcGIS Server to be started at boot on Linux distributions # adopting systemd init system (For example RHEL 7.x and SuSE12) by # following these instructions: # # 1.) Switch to the root user. # # 2.) Copy this file to /etc/systemd/system # # 3.) Enable the service to start at boot: # # # systemctl enable arcgisserver.service # # 4.) Verify systemd service is setup correctly: # # # systemctl stop arcgisserver.service # # systemctl start arcgisserver.service # # systemctl status arcgisserver.service # # 5.) Reboot the system and verify that Server restarts properly. # # ------------------------------------------------------------------ [Unit] Description=ArcGIS Server Service After=network.target SELinuxContext=system_u:system_r:unconfined_t:s0 [Service] Type=forking User=igsgis GuessMainPID=false # The minimum number of processes need to be set to 25059 or higher. Enable # and raise this limit if it is a heavily used system. Use ulimit -Su -Hu to # check current values. # LimitNPROC=25059 # LimitNOFILE=65535 # To prevent any one service from spawning too many threads and consuming all # server resources, systemd v228 and beyond included in SLES12 SP2 and higher # set the maximum number of threads to be created at 512. Users on SLES12 may # need to enable and raise this limit if it is a heavily used system. Use # "systemctl show --property DefaultTasksMax" to check the current value. To # find the version of systemd, use "systemctl --version". # TasksMax=512 ExecStart=/diskarray/arcgis/server/startserver.sh ExecStop=/diskarray/arcgis/server/stopserver.sh [Install] WantedBy=multi-user.target Thanks again for your help. EDIT: This is the output of ls -Z for the two files throwing the error: -rwx------. igsgis data unconfined_u:object_r:unlabeled_t:s0 libjsig.so -rwx------. igsgis data unconfined_u:object_r:unlabeled_t:s0 libprejsig.so (As mentioned earlier, I've tried switching context type to default as well, I've also tried switching user from unconfined to system) The SELinux Alerts are: SELinux is preventing /usr/sbin/ip from open access on the file /diskarray/arcgis/server/framework/runtime/jre/lib/libprejsig.so. SELinux is preventing /usr/sbin/ip from getattr access on the file /diskarray/arcgis/server/framework/runtime/jre/lib/libjsig.so.
... View more
05-22-2019
05:33 AM
|
0
|
0
|
783
|
POST
|
I'm running ArcGIS Server 10.7 on RHEL Server 7.6 Whenever I start ArcGIS Server with the systemd unit included in the install, copied from arcgis/server/framework/etc/scripts/ to /etc/systemd/system/arcgisserver.service, it gives SELinux alerts blocking read/open on libjsig.so and libprejsig.so. When I start ArcGIS Server by directly calling startserver.sh, There are no alerts. I have attempted to install local policy allowing access using audit2allow via this guide: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/security-enhanced_linux/sect-security-enhanced_linux-fixing_problems-allowing_access_audit2allow and also in the RHEL SELinux Troubleshooter instructions: # ausearch -c 'ip' --raw | audit2allow -M my-ip # semodule -i my-ip. I've also tried adjusting the file's context with: # semanage fcontext -a -t default_t libjsig.so # restorecon -v libjsig.so How can I start ArcGIS Server through systemd without the SELinux permission errors?
... View more
05-21-2019
09:12 AM
|
0
|
2
|
935
|
POST
|
I just installed ArcGIS Server 10.7 Linux on a RHEL 7.6 machine and out of the box I'm getting an SSL error. I'm accessing ArcGIS Server directly (using a :6443 URL). When I view the certificate, things look normal: I've generated/checked the certificate through the Server Admin portal and I've added the cert to my local machine's Trusted Root Certification Authorities. Why am I getting this error and how can I resolve it? EDIT: Looking at the default cert that ArcGIS Server generated, its Common Name (CN) was set to LOCALHOST (thus the Common Name Invalid error). I generated and installed a new cert with the Common Name set to the URL I use to access server manager and now Chrome is giving a different error: NET::ERR_CERT_AUTHORITY_INVALID. I've tried to generate a certificate with the Subject Alternative Name (SAN) also set to my URL (following the Esri tutorial). Whenever I try to generate with DNS:my.url.com as the SAN, it gives the error Unable to Save SSL Certificate. Using an IP SAN (IP:xxx.xx.xxx.xx) works and resolves the SSL error in Chrome, so I believe a certificate containing a SAN with the URL would work. After experimenting, the problem seems to be ArcGIS Server can't save the certificate when there's a number in the SAN field. Is there a work around for this or an escape sequence for numbers, or will I have to change the domain name of the machine? EDIT 2: I ended up just changing the machine name and re-generating certs with the new name.
... View more
05-02-2019
12:14 PM
|
0
|
1
|
2082
|
POST
|
I have a fresh install of ArcGIS Server 10.7 Linux and I'm getting this error when I try to create a site through the Server Manager web interface. All the threads I've read about this seem to indicate it's a license issue. I've tried Authorizing with a .prvc file through both the command line tool and the GUI and both methods display successful completion messages at the end. I've also tried stopping the server, deleting the keycodes file, re-authorizing, and starting the server. When I check the Authorization status: tools/authorizeSoftware -s -------------------------------------------------------------------------- Starting the ArcGIS Software Authorization Wizard Run this script with -h for additional information. -------------------------------------------------------------------------- Product Ver ECP# Expires ------------------------------------------------- arcsdeserver 107 ecp######### 28-aug-2019 datareviewersvr 107 ecp######### 28-aug-2019 highwayssvr 107 ecp######### 28-aug-2019 jtxserver 107 ecp######### 28-aug-2019 networkserver 107 ecp######### 28-aug-2019 svradv 107 ecp######### 28-aug-2019 svradv_4 107 ecp######### 28-aug-2019 svrenterprise 107 ecp######### 28-aug-2019 utilnetworksvr 107 ecp######### 28-aug-2019 In the server log I see: <Msg time="2019-04-10T08:41:59,338" type="INFO" code="7252" source="Admin" process="10606" thread="1" methodName="" machine="myMachine" user="" elapsed="" requestID="">Creating a new site.</Msg> <Msg time="2019-04-10T08:41:59,339" type="INFO" code="7064" source="Admin" process="10606" thread="1" methodName="" machine="myMachine" user="" elapsed="" requestID="">Checking and validating server licenses.</Msg> <Msg time="2019-04-10T08:41:59,339" type="INFO" code="7241" source="Admin" process="10606" thread="1" methodName="" machine="myMachine" user="" elapsed="" requestID="">Server license check was successful.</Msg> <Msg time="2019-04-10T08:41:59,339" type="FINE" code="7510" source="Admin" process="10606" thread="1" methodName="" machine="myMachine" user="" elapsed="" requestID="">Time elapsed in 'License' module is '0 millis (~ 0 minutes)'.</Msg> ... .... <Msg time="2019-04-10T08:42:01,40" type="SEVERE" code="6533" source="Admin" process="10606" thread="1" methodName="" machine="myMachine" user="" elapsed="" requestID="">Failed to create the site. com.esri.arcgis.discovery.servicelib.AGSException: Failed to register the activation group.</Msg> I can't really tell if my software authorization was successful or not. What is the authorization status supposed to look like? Should I have a line for arcgisserver in there? Or is the software properly licensed/authorized and this issue related to something else entirely? EDIT: I just tried re-installing and re-authorizing ArcGIS Server after stopping both firewalld and iptables services with the same results.
... View more
04-10-2019
07:42 AM
|
0
|
1
|
2818
|
POST
|
I've tried switching the lods array around, but the problem persists. var lods = [{ "level": 0, "resolution": 0.26458386250105836, "scale": 1000 }, { "level": 1, "resolution": 0.5291677250021167, "scale": 2000 }, { "level": 2, "resolution": 1.0583354500042335, "scale": 4000 }, { "level": 3, "resolution": 2.116670900008467, "scale": 8000 }, { "level": 4, "resolution": 4.233341800016934, "scale": 16000 }, { "level": 5, "resolution": 8.466683600033868, "scale": 32000 }, { "level": 6, "resolution": 16.933367200067735, "scale": 64000 }, { "level": 7, "resolution": 33.0729828126323, "scale": 125000 }, { "level": 8, "resolution": 66.1459656252646, "scale": 250000 }, { "level": 9, "resolution": 132.2919312505292, "scale": 500000 }, { "level": 10, "resolution": 264.5838625010584, "scale": 1000000 }, { "level": 11, "resolution": 661.4596562526459, "scale": 2500000 }]; Bug report time? It's just strange to me that no one else seems to experience this glitch. I've also tried defining the max/min scales, spatialReference, and server version when I create the TileLayer, but none of that seems to make a difference either: var streetsTile = new TileLayer({ url: "http://myserver/arcgis/rest/services/Basemaps/Streets/Mapserver", minScale: 1000, maxScale: 2500000, version: 10.4, spatialReference: {wkid: 26916} });
... View more
04-09-2019
11:29 AM
|
0
|
1
|
162
|
POST
|
Yes, I've copied these values from the server: Tile Info: Height: 512 Width: 512 DPI: 96 Levels of Detail: 12 Level ID: 0 Resolution: 661.4596562526459 Scale: 2500000 Level ID: 1 Resolution: 264.5838625010584 Scale: 1000000 Level ID: 2 Resolution: 132.2919312505292 Scale: 500000 Level ID: 3 Resolution: 66.1459656252646 Scale: 250000 Level ID: 4 Resolution: 33.0729828126323 Scale: 125000 Level ID: 5 Resolution: 16.933367200067735 Scale: 64000 Level ID: 6 Resolution: 8.466683600033868 Scale: 32000 Level ID: 7 Resolution: 4.233341800016934 Scale: 16000 Level ID: 8 Resolution: 2.116670900008467 Scale: 8000 Level ID: 9 Resolution: 1.0583354500042335 Scale: 4000 Level ID: 10 Resolution: 0.5291677250021167 Scale: 2000 Level ID: 11 Resolution: 0.26458386250105836 Scale: 1000 Is this proper, or should I be using different values?
... View more
04-09-2019
08:53 AM
|
0
|
4
|
1133
|
POST
|
Hey Robert, Thanks for the advice. I'm at a total loss as to why this isn't working. Here's the entire code from my example:
require([
"esri/Map",
"esri/views/MapView",
"esri/layers/TileLayer",
"esri/Basemap",
"esri/geometry/Point",
"esri/config"
],
function(Map, MapView, TileLayer, Basemap, Point, esriConfig){
esriConfig.request.proxyUrl = "../proxy/proxy.ashx";
var lods = [{
"level": 11,
"resolution": 0.26458386250105836,
"scale": 1000
}, {
"level": 10,
"resolution": 0.5291677250021167,
"scale": 2000
}, {
"level": 9,
"resolution": 1.0583354500042335,
"scale": 4000
}, {
"level": 8,
"resolution": 2.116670900008467,
"scale": 8000
}, {
"level": 7,
"resolution": 4.233341800016934,
"scale": 16000
}, {
"level": 6,
"resolution": 8.466683600033868,
"scale": 32000
}, {
"level": 5,
"resolution": 16.933367200067735,
"scale": 64000
}, {
"level": 4,
"resolution": 33.0729828126323,
"scale": 125000
}, {
"level": 3,
"resolution": 66.1459656252646,
"scale": 250000
}, {
"level": 2,
"resolution": 132.2919312505292,
"scale": 500000
}, {
"level": 1,
"resolution": 264.5838625010584,
"scale": 1000000
}, {
"level": 0,
"resolution": 661.4596562526459,
"scale": 2500000
}];
var streetsTile = new TileLayer({
url: "https://myserver/arcgis/rest/services/Basemaps/Streets/Mapserver"
});
var streetsBase = new Basemap({
baseLayers: [streetsTile]
});
var map = new Map({
basemap: streetsBase
});
var view = new MapView({
container: 'mapView',
map: map,
zoom: 0,
center: new Point({
x: 560624.2184404366,
y: 4418006.635128269,
spatialReference: {
wkid: 26916
}
}),
constraints: {
lods: lods
}
});
});
I'm really not doing anything else besides creating a Basemap from a tile layer and passing that to Map as the basemap for my map. Is there anything you can see that would explain why the Zoom Widget would behave so strangely with my map? The rest of the app is boilerplate-- html: <!DOCTYPE html> <html> <head> <title>Map View Test</title> <link rel="stylesheet" href="https://js.arcgis.com/4.11/esri/themes/light/main.css"> <link rel="stylesheet" href="viewer.css"> <script src="https://js.arcgis.com/4.11/"></script> </head> <body> <div id="mapView"></div> <script src="viewer.js"></script> </body> </html> css: html, body, #mapView { padding: 0; margin: 0; height: 100%; width: 100%; } Thanks again for your help.
... View more
04-09-2019
06:50 AM
|
0
|
6
|
1133
|
POST
|
Thanks, Robert. Implementing this code gives me the same issue--the Zoom widget doesn't work when the view is zoomed to the outermost scale. Is there something else I'm missing? var lods = [{ "level": 11, "resolution": 0.26458386250105836, "scale": 1000 }, { "level": 10, "resolution": 0.5291677250021167, "scale": 2000 }, { "level": 9, "resolution": 1.0583354500042335, "scale": 4000 }, { "level": 8, "resolution": 2.116670900008467, "scale": 8000 }, { "level": 7, "resolution": 4.233341800016934, "scale": 16000 }, { "level": 6, "resolution": 8.466683600033868, "scale": 32000 }, { "level": 5, "resolution": 16.933367200067735, "scale": 64000 }, { "level": 4, "resolution": 33.0729828126323, "scale": 125000 }, { "level": 3, "resolution": 66.1459656252646, "scale": 250000 }, { "level": 2, "resolution": 132.2919312505292, "scale": 500000 }, { "level": 1, "resolution": 264.5838625010584, "scale": 1000000 }, { "level": 0, "resolution": 661.4596562526459, "scale": 2500000 }]; var view = new MapView({ container: 'mapView', map: map, zoom: 0, center: new Point({ x: centerX, y: centerY, spatialReference: { wkid: mySpatialReferenceID } }), constraints: { lods: lods } });
... View more
04-08-2019
01:23 PM
|
0
|
8
|
1133
|
Title | Kudos | Posted |
---|---|---|
1 | 08-09-2023 09:03 AM | |
1 | 04-11-2023 06:29 AM | |
1 | 07-18-2022 08:46 AM | |
1 | 09-01-2020 01:19 PM | |
2 | 08-27-2021 09:02 AM |
Online Status |
Offline
|
Date Last Visited |
03-08-2024
07:08 PM
|