when i hover on a polygon its fill color should be changed. and show a popup.. i am copy-paste my code here.. u can check it and kindly help me..
my code....
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no">
<meta name="description" content="[Get started with graphics - 4.3]">
<!--
For more information about the get-started-graphics sample, read the original sample description at developers.arcgis.com. -->
<title>Get started with graphics - 4.3</title>
<style>
html,
body,
#viewDiv {
padding: 0;
margin: 0;
height: 100%;
width: 100%;
}
</style>
<script>
require([
"esri/Map",
"esri/views/MapView",
"esri/Graphic",
"esri/geometry/Point",
"esri/geometry/Polyline",
"esri/geometry/Polygon",
"esri/symbols/SimpleMarkerSymbol",
"esri/symbols/SimpleLineSymbol",
"esri/symbols/SimpleFillSymbol",
"dojo/domReady!"
], function(
Map, MapView,
Graphic, Point, Polyline, Polygon,
SimpleMarkerSymbol, SimpleLineSymbol, SimpleFillSymbol
) {
var map = new Map({
basemap: "hybrid"
});
var view = new MapView({
center: [-80, 35],
container: "viewDiv",
map: map,
zoom: 3
});
/************************
* Create a polygon graphic
************************/
// Create a polygon geometry
var polygon = new Polygon({
rings: [
[-64.78, 32.3],
[-66.07, 18.45],
[-80.21, 25.78],[-92.21, 35.78],[-85.21, 32.78],
[-64.78, 32.3]
]
});
// Create a symbol for rendering the graphic
var fillSymbol = new SimpleFillSymbol({
color: [227, 139, 79, 0.8],
outline: { // autocasts as new SimpleLineSymbol()
color: [255, 255, 255],
width: 1
}
});
// Add the geometry and symbol to a new graphic
var polygonGraphic = new Graphic({
geometry: polygon,
symbol: fillSymbol
});
// Add the graphics to the view's graphics layer
view.graphics.addMany([polygonGraphic]);
});
</script>
</head>
<body>
<div id="viewDiv"></div>
</body>
</html>