POST
|
I think that's a pretty smart workaround. What exactly should I put in place of myLayer at your line 13? Should it be the layer name displayed in the title of the REST page of the layer?
... View more
07-30-2018
11:51 AM
|
0
|
3
|
6125
|
POST
|
I'm using ArcGIS API for JavaScript 4.8. My goal is to get the Census tract ID value of the clicked Feature in a FeatureLayer and display the ID value in an alert box. I got stuck when trying to use Query/QueryTask to fetch the value. My code goes here: require([
"esri/Map",
"esri/views/MapView",
"esri/layers/FeatureLayer",
"esri/layers/GroupLayer",
"esri/widgets/LayerList",
"esri/tasks/support/Query",
"esri/tasks/QueryTask",
"dojo/on",
"dojo/domReady!"
],
function(
Map, MapView, FeatureLayer, GroupLayer, LayerList, Query, QueryTask, on
) {
var map = new Map({
basemap: "topo"
});
var view = new MapView({
center: [-91.05, 30.5161109],
zoom: 11,
container: "viewDiv",
map: map,
});
// Generate link to Census tract details
view.when(function() {
on(view, "click", displayTractID);
});
function displayTractID(event) {
// TODO
}
// Define popup template and get feature layers
var census2000Template = {
title: "Census 2000",
content: [{
type: "fields",
fieldInfos: [{
fieldName: "TRACT",
label: "Tract",
visible: true
}, {
fieldName: "POPULATION",
label: "Population",
visible: true,
format: {
digitSeparator: true,
places: 0
}
}]
}]
};
var census2000Layer = new FeatureLayer({
url: "http://services.arcgis.com/KYvXadMcgf0K1EzK/ArcGIS/rest/services/Census_2000/FeatureServer/0",
outFields: ["*"],
popupTemplate: census2000Template
});
// Add feature layers to a group layer
var censusGroupLayer = new GroupLayer({
title: "Historic Census",
visible: true,
visibilityMode: "exclusive",
layers: [census2000Layer]
});
map.add(censusGroupLayer);
}); Could someone help me to fill out the TODO part or show me some sandbox examples?
... View more
07-30-2018
09:48 AM
|
0
|
8
|
9123
|
POST
|
In AGOL map viewer I can toggle layers. Is there anyway to do this with the web map embed in a HTML page?
... View more
07-18-2018
07:47 AM
|
0
|
1
|
686
|
POST
|
I recently upgraded ArcGIS Pro and got this error when trying to open Jupyter Notebook: The notebook works fine before upgrading ArcGIS Pro. Current ArcGIS Pro version 2.2.0, Anaconda version 4.3.27 with ArcGIS Pro, Anaconda version 4.4.10 for standalone.
... View more
06-29-2018
09:07 AM
|
0
|
1
|
499
|
IDEA
|
Esri recently released a new ArcGIS Online functionality to categorize items (layers, maps, apps). I think it would be good to apply this feature to ArcGIS Open Data Hub to let users search all downloadable layers within a category (business, transportation, etc.), in addition to the current method of search by tag or AGOL group.
... View more
05-22-2018
08:51 AM
|
5
|
1
|
419
|
POST
|
Hi Jared, I'm not a regular GeoNet user so please excuse my untimely reply. An workaround of tag would be put your data in groups, and AGOD offers the functionality of search the data sets in a group. It works perfectly fine with me this way. So if you haven't, certainly give it a try.
... View more
05-22-2018
08:45 AM
|
0
|
0
|
812
|
POST
|
Thanks for replying and yes, I am using this tool. Is that because I'm not installing the right Python version or what?
... View more
11-07-2016
07:12 AM
|
0
|
1
|
1392
|
POST
|
Hi, Thanks for replying. I found out that the thing after "datasets?q=" in the url is equivalent to doing a search in the search bar. So, yes, I added corresponding tags to my data sets and worked nicely! Thank you.
... View more
11-03-2016
12:44 PM
|
0
|
0
|
812
|
POST
|
Hey All, I tried to load my .mxd document into ArcGIS Pro but it crashes every time and gives me this message: "ArcGIS Pro has encountered a serious application error and is unable to continue." Do anybody familiar with such issue? It's ArcGIS Pro 1.3 on Windows 10 Pro. I also installed Anaconda. Any help?
... View more
11-03-2016
12:42 PM
|
0
|
8
|
2516
|
POST
|
Hi all, I'm working on our ArcGIS Open Data website and I'm trying to put the GIS data sets into different custom categories. I want it just like the way the Maryland site does: when click on an icon it brings me to a webpage where there are only data sets of one kind and nothing else. I'm kind of new to this and don't know where to start. I have our data here (very few but still adding...) and I already created the Open Data website. Please help me to kick start this process. Much appreciated! Thanks for reading.
... View more
10-03-2016
02:29 PM
|
0
|
4
|
2188
|
Title | Kudos | Posted |
---|---|---|
5 | 05-22-2018 08:51 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|