|
POST
|
I can't quite grasp how to attach an event handler to the LayerList widget so that each time a user clicks (toggles) a layer, I can run a custom function. I want to attach this to every layer, not just individual ones... I tried const layerList = new LayerList({
view: mapView,
container: 'layerlist'
});
layerList.viewModel.on('trigger-action', myCustomFunction); I also tried it with just layerList.on('trigger-action', myCustomFunction) Any tips here?
... View more
02-20-2019
10:22 AM
|
0
|
4
|
3968
|
|
POST
|
To me it's kind of insane, but this is the solution I came to. I feel like I should need to call load on each basemap, but that's what I needed to do. It's callback hell, but it's the only way to find a basemap object based on the title. esriConfig.portalUrl = "myportalurl";
const basemapStringToFind = "Colored Pencil"
let portal = new Portal();
portal.load().then(() => {
portal.fetchBasemaps().then(basemaps => {
//have to load each basemap to get the title??? otherwise the title is just "Basemap"
let promises = [];
basemaps.map(bm => promises.push(bm.load()));
Promise.all(promises).then(loadedBasemaps => {
const basemap = loadedBasemaps.filter(bm => bm.title == basemapStringToFind)[0];
this.loadMap(basemap || "satellite");
});
});
});
... View more
02-08-2019
12:57 PM
|
0
|
0
|
1705
|
|
POST
|
TLDR: I am using a BasemapGalleryWidget in my application, which is pointed at my Portal (so all the basemaps loaded in the basemap gallery are those configured as basemaps in my Portal). I want to detect when not only the basemap gallery widget has populated all the basemaps, but also when the titles are populated on each basemap. So far I have: let gallery = new BasemapGallery({
container: "basemapDiv",
view: sceneView
});
//watch for basemaps to get populated
var handle = watchUtils.when(gallery.source.basemaps, "length", ()=>{
//watch for names to get populated
watchUtils.watch(gallery.source.basemaps.items[0], "title", ()=>{
gallery.source.basemaps.items.forEach(bs=>{
console.log(bs.title);
});
}); But since each item gets it's title individually, this doesn't really work - because I assume it's a different request for each basemap to get the thumbnail, title, etc. etc. I'm unclear how to detect on a widget when the whole thing has loaded. Any tips? The longer version of my problem is this: I want my application to load the last basemap a user had selected for the app (I'm using local storage). Suppose they selected a basemap from my Portal called "Colored Pencil". So I load that string from local storage, but I can't really instantiate a Map when my app loads with let esriMap = new EsriMap({
basemap: "Colored Pencil",
ground: "world-elevation"
}); The map constructor only accepts the 12 or so "satellite", 'dark-gray", "osm", etc. etc. My (intended) solution to this is to wait for the BasemapGallery widget to complete loading, and programmatically select the correct basemap by the string. const basemap = gallery.source.basemaps.items.filter(bm=>bm.title=="Colored Pencil")[0];
gallery.activeBasemap = basemap; This would hopefully just change the basemap. Yet to be seen. Yet I'm stuck on watchUtils or the BasemapGalleryViewModel to let me know once the widget has completed all it's requests and populated all it's properties. Any tips here?
... View more
02-08-2019
10:02 AM
|
0
|
1
|
1821
|
|
POST
|
I'm using the REST API (via a web app) to search a users's content for a specific type of content (KML files) https://portalserver/gis/sharing/rest/content/users/arcgisadmin/?types=KML returns no items, because there are no KML items in the root folder https://portalserver/gis/sharing/rest/content/users/arcgisadmin/ec638ccb4d8e44c0b0fe9910d989afb2?types=KML returns some items because the user uploaded some KML files to this folder However, what is a user has 30 folders - I don't want to make 30 requests. The base request is https://portalserver/gis/sharing/rest/content/users/arcgisadmin?types=KML&sortField=&sortOrder=&folders=&foldersContent=&num=& GUI is here.... I could not find in the documentation anything about Include Folders List (folders param in the GET request) or Include Folders Content (foldersContent in the GET request). Can I use these to search all the users content to get all KML files instead of having to individually search each folder? Can someone point me to the documentation on how to use them? Thanks!
... View more
02-06-2019
08:03 AM
|
0
|
0
|
745
|
|
POST
|
Sure, I can certainly write scripts with in 2.x that will work for 3.x using the __future__ module, but in order to utilize arcpy in the 3.x python (which I also need for ArcGIS Python API), I still need ArcGIS Pro installed.
... View more
01-17-2019
09:00 AM
|
0
|
1
|
4941
|
|
POST
|
They're mostly standalone script tools for data pipelines - web scraping and arcpy.da.Update and Insert cursors for our enterprise database, as well as some standard geoprocessing workflows (intersects, buffers, etc. etc.). So they rely heavily on the arcpy library. I don't know how to access the Python's 2.x arcpy library without having ArcMap installed, and migrating scripts to Python's 3.x arcpy library will allow me to ALSO take advantage of the ArcGIS API for Python (e.g. use arcpy to update an enterprise database with some geodata, and then use the ArcGIS Python API to update an Enterprise Portal for ArcGIS item to list when the underlying geodata was last updated or print a web map of the new data, all in the same script).
... View more
01-17-2019
05:22 AM
|
0
|
1
|
4941
|
|
POST
|
I've in the processing of transitioning some Python 2 arcpy geoprocessing workflows to Python 3 so I can also incorporate the ArcGIS Python API into the workflows. As such, I need both versions installed on a single computer, and both able to leverage the arcpy library. Does that mean I need to install ArcMap AND ArcGIS Pro on my machine? Is there any way to get this accomplished with JUST ArcGIS Pro?
... View more
01-17-2019
04:58 AM
|
1
|
6
|
7238
|
|
POST
|
I was still seeing this issue in 4.10 with a refresh interval on a feature layer and unique value rendererer. The layer wasn't updating correctly until I added a request interceptor esriConfig.request.interceptors.push({ urls: "https://arcgisserver/arcgis/rest/services/Development/testservice/MapServer/1", before: function (params){ params.requestOptions.cacheBust = true } });
... View more
01-10-2019
08:46 AM
|
2
|
1
|
4658
|
|
POST
|
I keep getting what looks like webgl errors iwhen trying to set a Unique Value Renderer to a MapService or FeatureService that is published to ArcGIS Server 10.6.1 (published with ArcMap 10.6.1) Browser is Chrome 71.0.3578.98 I thought the dojoConfig esri-featurelayer-webgl would work for 10.6.1, as documentation says it would, but I'm very confused. Can anyone help? Errors point to Pipeline.js: Here my some example code that reproduces the error (for me) <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no">
<title>Intro to FeatureLayer - 4.10</title>
<script>
var dojoConfig = {
has: {
"esri-featurelayer-webgl": 1
}
};
</script>
<link rel="stylesheet" href="https://js.arcgis.com/4.10/esri/css/main.css">
<script src="https://js.arcgis.com/4.10/"></script>
<style>
html,
body,
#viewDiv {
padding: 0;
margin: 0;
height: 100%;
width: 100%;
}
</style>
<script>
require([
"esri/Map",
"esri/views/MapView",
"esri/layers/FeatureLayer"
],
function(
Map, MapView,
FeatureLayer
) {
var map = new Map({
basemap: "oceans"
});
var view = new MapView({
container: "viewDiv",
map: map,
center: [-97, 38],
zoom: 5
});
/********************
* Add feature layer
********************/
// Carbon storage of trees in Warren Wilson College.
var defaultSymbol = {
type: "simple-marker", // autocasts as new SimpleMarkerSymbol()
size: 25,
color: "rgba(111,111,111,.5)",
outline: {
// autocasts as new SimpleLineSymbol()
width: 0.5,
color: "black"
}
};
var renderer = {
type: "unique-value",
field: "opsstatus",
defaultSymbol: defaultSymbol,
uniqueValueInfos: [
{
value: "Open",
symbol: {
type: "simple-fill", // autocasts as new SimpleFillSymbol()
color: "green"
}
},
{
value: "Limited",
symbol: {
type: "simple-fill", // autocasts as new SimpleFillSymbol()
color: "red"
}
}
]
};
var featureLayer = new FeatureLayer({
url: "https://myserver/arcgis/rest/services/Development/testservice/FeatureServer/0",
renderer: renderer,
outFields: ['*']
});
map.add(featureLayer);
});
</script>
</head>
<body>
<div id="viewDiv"></div>
</body>
</html>
... View more
01-09-2019
11:27 AM
|
0
|
2
|
1563
|
|
POST
|
I'm comfortable creating Python scripts to then create geoprocessing services I can use in JS web applications. However, I'm having difficulty creating similar geoprocessing services for use in ArcGIS Enterprise (10.6.1) Portal as a custom analysis tool. Using ArcMap 10.6.1, the script tool used as a basis for the geoprocessing services correctly populates the GPFeatureLayer data type with a list of layers on the map, and the resultant GPFeatureLayer derived output correctly adds to the map when the analysis is complete. But if I share this as a geoprocessing service, and try to run it as custom analysis in Portal... a. The input layer seems hard coded - I can't choose from available layers on the map b. Even if I choose the hard coded input layer, all I get in an Error (no resultant layer is added to my web map). Does anyone have even a simple example of a script tool used to create a geoprocessing service for use as custom analysis in Portal? Attached in the python I used to create a toolbox for this test case. Thanks!
... View more
09-10-2018
07:13 AM
|
0
|
0
|
969
|
|
POST
|
Oh interesting. Thanks so much for the reply. So it looks like in your code feature_info array, you manually converted East coordinates to their West counterparts (I see references to -230 as opposed to 130). It's not that you just set the feature class to the specific spatial reference, entered the coordinates as is, and it all worked out, right? So essentially I would just need to ensure all points being added to the polygon are specified as to one side of the dateline, but would have to catch and change that programatically as I parse the points.
... View more
08-02-2018
11:35 AM
|
0
|
1
|
2938
|
|
POST
|
I'm trying to parse a text file of point coordinates to create polygons, but any polygon that has points on both sizes of the international date line wraps around the map (when displayed in ArcGIS Pro). Here is an example of the text: 21-00-00.0N 130-00-00.0E 21-00-00.0N 155-00-00.0E 27-00-00.0N 155-00-00.0E 27-00-00.0N 165-00-00.0E 43-00-00.0N 165-00-00.0E 45-42-00.0N 162-55-00.0E 50-08-00.0N 176-34-00.0W 51-24-00.0N 167-49-00.0W 53-30-00.0N 160-00-00.0W 56-00-00.0N 153-00-00.0W 56-45-42.0N 151-45-00.0W 53-22-03.0N 137-00-00.0W 52-43-00.0N 135-00-00.0W 51-00-00.0N 133-45-00.0W 48-20-00.0N 128-00-00.0W 48-10-00.0N 127-55-30.0W 45-00-00.0N 126-30-00.0W 40-59-00.0N 126-54-00.0W 40-50-00.0N 127-00-00.0W 37-30-23.0N 127-00-00.0W 36-27-43.0N 126-56-00.0W 35-30-00.0N 125-50-00.0W 36-00-00.0N 124-12-00.0W 34-30-00.0N 123-15-00.0W 30-45-00.0N 120-50-00.0W 30-00-00.0N 120-00-00.0W 03-30-00.0N 120-00-00.0W 03-30-00.0N 145-00-00.0W 05-00-00.0S 155-00-00.0W 05-00-00.0S 180-00-00.0W 03-30-00.0N 180-00-00.0W 03-30-00.0N 160-00-00.0E 00-00-00.0N 160-00-00.0E 00-00-00.0N 141-00-00.0E 03-30-00.0N 141-00-00.0E 03-30-00.0N 133-00-00.0E 07-00-00.0N 130-00-00.0E I can easily create polygons that don't cross the dateline (or the equator), but am unclear how to structure polygons that do. Would anyone be able to point me in the right direction?
... View more
08-01-2018
10:52 AM
|
0
|
3
|
3241
|
|
POST
|
Details: Hi, I am planning on installing the Home Application Display patch (https://support.esri.com/en/download/7615) on my Portal 10.4 instance. At the bottom of the patch page, it says: "To avoid conflicts the 10.4 version also addresses: BUG-000099447 - Unable to upload files or create groups in the Portal home application after updating the browser to Firefox 49, Chrome 54, or Safari 10. BUG-000098559 – Un-validated redirect in Portal for ArcGIS. BUG-000098482 - Cross-site scripting (XSS) issue in Portal for ArcGIS. BUG-000098118 - Portal for ArcGIS exposes internal information. BUG-000098025 - Bypass of URL redirection rule in Portal for ArcGIS. BUG-000096571 - The secure attribute is not present on a cookie in Portal for ArcGIS. BUG-000096570 - Reflected cross-site scripting (XSS) is possible in Portal for ArcGIS. BUG-000094214 - Unable to import ArcGIS Pro entitlements to Portal for ArcGIS 10.4. BUG-000091316 - Some Portal upload operations do not validate file type correctly." It seems like those issues listed are also fixed by https://support.esri.com/en/download/7443 (Home Application Upload Patch) and https://support.esri.com/en/download/7465 (Security 2017 Update 1 Patch). This seems like the dumb question, but if I install the Home Application Display patch, then I shouldn't have to install the other 2 patches, correct? (the language "to avoid conflicts....." seems a little strange and imprecise to me) I haven't installed any patches yet, so am wondering if I need to install all 3 to have the issues fixed, or just the latest patch (which in this case the the Home Application Display Patch) Thanks!
... View more
07-26-2018
08:14 AM
|
0
|
1
|
1488
|
|
POST
|
Does anyone know when ArcGIS Enterprise 10.6.1 will be released? I'm trying to plan a migration/upgrade, and thought it would be released/announced at the UC but haven't heard anything about it....
... View more
07-13-2018
07:59 AM
|
1
|
6
|
3253
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | 02-23-2026 11:00 AM | |
| 1 | 07-08-2025 11:33 AM | |
| 1 | 11-07-2023 08:32 AM | |
| 2 | 10-01-2025 06:52 AM | |
| 5 | 09-08-2025 07:31 AM |
| Online Status |
Offline
|
| Date Last Visited |
06-04-2026
01:35 PM
|