Commit f166875d authored by Peter Knoop's avatar Peter Knoop
Browse files

Added Home widget to reset map view

parent 514c483b
......@@ -7,6 +7,7 @@ require([
"esri/layers/FeatureLayer",
"esri/widgets/Slider",
"esri/widgets/Legend",
"esri/widgets/Home",
"esri/renderers/smartMapping/creators/relationship",
"dojo/dom-style",
"dojo/dom-attr",
......@@ -21,6 +22,7 @@ require([
FeatureLayer,
Slider,
Legend,
Home,
relationshipRendererCreator,
domStyle,
domAttr,
......@@ -89,8 +91,8 @@ require([
label: "Believe global warming is happening"
},
{
fieldName: "happeningOppose",
label: "Do not believe global warming is happening"
fieldName: "FL",
label: "Flood Warnings"
}
]
}
......@@ -219,10 +221,16 @@ require([
}
]
});
// Add widget to the bottom right corner of the view
mainView.ui.add(legend, "top-right");
// Add Home button to mainView.
var homeButton = new Home({
view: mainView
});
// Add the home button to the top left corner of the view
mainView.ui.add(homeButton, "top-left");
mainView
.when(maintainFixedExtent)
// .then(disableNavigation)
......
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