Commit 19eb428b authored by Caitlin Dickinson's avatar Caitlin Dickinson
Browse files

enabling navigation on main view, specifying outFields for layer

parent 53e8437d
......@@ -96,7 +96,7 @@ require([
var layer = new FeatureLayer({
url: "https://services1.arcgis.com/4ezfu5dIwH83BUNL/arcgis/rest/services/Yale_State_Level/FeatureServer/0",
popupTemplate: popupTemplate,
// outFields: ["NAME", "TotalPop", "happening", "happeningOppose"],
outFields: ["NAME", "TotalPop", "happening", "happeningOppose"],
title: "U.S. States"
});
......@@ -106,7 +106,7 @@ require([
// Create the map views and assign to their respective containers/divs
var mainView = new MapView({
const mainView = new MapView({
container: "mainViewDiv",
map: map,
popup: {
......@@ -136,7 +136,7 @@ require([
});
var akView = new MapView({
const akView = new MapView({
container: "akViewDiv",
map: map,
extent: {
......@@ -159,7 +159,7 @@ require([
mainView.ui.add("akViewDiv", "bottom-left");
var hiView = new MapView({
const hiView = new MapView({
container: "hiViewDiv",
map: map,
extent: {
......@@ -184,7 +184,7 @@ require([
mainView
.when(maintainFixedExtent)
.then(disableNavigation)
// .then(disableNavigation)
.then(disablePopupOnClick)
.then(enableHighlightOnPointerMove);
akView
......@@ -225,11 +225,11 @@ require([
var feature = response.results.filter(function(result) {
return result.graphic.layer === layer;
})[0].graphic;
console.log(feature);
feature.popupTemplate = layer.popupTemplate;
id = feature.attributes.OBJECTID_1;
//Caitlin: Does hovering over a feature return it's ObjectID?
console.log(feature.attributes.OBJECTID_1); //This is coming up as undefined
//Does hovering over a feature return it's ObjectID?
console.log(feature);
//console.log(feature.attributes.OBJECTID); //This is coming up as undefined
highlight = layerView.highlight([id]);
var selectionId = mainView.popup.selectedFeature
? mainView.popup.selectedFeature.attributes.OBJECTID_1
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment