Following is the code on which I am working. It is allowing to click the features to get the queried info window.
I am looking for the hover option, instead of clicking. Any help, please.
require([
"esri/InfoTemplate", "esri/dijit/Legend", "esri/symbols/SimpleFillSymbol", "esri/symbols/SimpleLineSymbol", "esri/tasks/query", "esri/tasks/QueryTask",
"esri/tasks/LegendLayer", "dojo/on", "dijit/registry", "esri/dijit/BasemapGallery", "esri/geometry/webMercatorUtils",
"esri/layers/ArcGISDynamicMapServiceLayer", "esri/layers/FeatureLayer",
"dojo/dom", "dojo/dom-construct", "dojo/parser", "dojo/_base/array",
"dijit/layout/AccordionContainer", "dijit/layout/BorderContainer", "dijit/layout/ContentPane", "dijit/TitlePane",
],
function (
Graphic, SpatialReference, Extent, GraphicsLayer, Color,
InfoTemplate, Legend, SimpleFillSymbol, SimpleLineSymbol, Query, QueryTask,
LegendLayer, on, registry, BasemapGallery, webMercatorUtils,
ArcGISDynamicMapServiceLayer, FeatureLayer,
dom, domConstruct, parser, arrayUtils,
AccordionContainer, BorderContainer, ContentPane, TitlePane
) {
parser.parse();
var legendLayers = [];
var map = new esri.Map("map", {
basemap: "topo",
center: [-110, 47],
zoom: 6
});
/* Add the BASEMAP GALLERY from ESRI */
var basemapGallery = new BasemapGallery(
);
/*********************************************************
HISTORIC QUAKES FEATURE LAYER
*********************************************************/
/* Create a new InfoTemplate for the MBMG SWAMP layer 2014-12-29 */
var historicInfoTemplate = new InfoTemplate();
historicInfoTemplate.setTitle("SWAMP Record ${GWICId}");
historicInfoTemplate.setContent("<table>" +
"<tr valign='top'><td style='white-space:nowrap;'>Event Date</td><td>${Date_}</td></tr>" +
"<tr><td style='white-space:nowrap;'>Location</td><td style='white-space:nowrap;'>${Lat}, ${Long_}</td></tr>" +
"<tr><td style='white-space:nowrap;'>Magnitude</td><td style='white-space:nowrap;'>${Mag}</td></tr>" +
"<tr><td style='white-space:nowrap;'>Approx Location</td><td>${Approximate_Location}</td></tr>" +
"<tr><td style='white-space:nowrap;'>Source</td><td>${Source}</td></tr>" +
"<tr><td style='white-space:nowrap;'>Other Info</td><td><a href='${Link}' target='_newwindow'>${Link}</a></td></tr>" +
"</table>");
var historicQuakesFeatureLayer = new FeatureLayer("http://mbmgmap.mtech.edu/ArcGIS/rest/services/quakes/Historic_quakes/MapServer/0",
{
mode: FeatureLayer.MODE_SNAPSHOT,
outFields: ["Date_", "Lat", "Long_", "Mag", "Approximate_Location", "Source", "Link"],
infoTemplate: historicInfoTemplate
}
);
map.addLayers([historicQuakesFeatureLayer]);
/* Re-size the infoWindow to fit the standard contents */
map.infoWindow.resize(350, 150);
});