Russell,
The Locator task is still there are still being used. It is the Geocoder dijit that is being replace by the Search dijit.
Here is a sample of using Search dijit with a standard locator:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!--The viewport meta tag is used to improve the presentation and behavior of the samples
on iOS devices-->
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
<title>ArcGIS API for JavaScript | Search widget with multiple sources</title>
<link rel="stylesheet" href="http://js.arcgis.com/3.14/dijit/themes/claro/claro.css">
<link rel="stylesheet" href="http://js.arcgis.com/3.14/esri/css/esri.css">
<style>
html,
body,
#map {
height: 100%;
width: 100%;
margin: 0;
padding: 0;
}
#search {
display: block;
position: absolute;
z-index: 2;
top: 20px;
left: 74px;
}
</style>
<script src="http://js.arcgis.com/3.14/"></script>
<script>
require([
"esri/map",
"esri/dijit/Search",
"esri/layers/FeatureLayer",
"esri/InfoTemplate",
"esri/SpatialReference",
"esri/geometry/Extent",
"dojo/i18n!esri/nls/jsapi",
"esri/tasks/locator",
"esri/symbols/PictureMarkerSymbol",
"dojo/domReady!"
], function (
Map,
Search,
FeatureLayer,
InfoTemplate,
SpatialReference,
Extent,
esriBundle,
Locator,
PictureMarkerSymbol
) {
var map = new Map("map", {
basemap: "gray",
center: [-97, 38], // lon, lat
zoom: 5
});
var s = new Search({
enableButtonMode: true, //this enables the search widget to display as a single button
enableLabel: false,
enableInfoWindow: true,
showInfoWindowOnSelect: false,
enableSourcesMenu: false,
map: map
}, "search");
var sources = s.get("sources");
sources.push({
locator: new Locator("//geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer"),
singleLineFieldName: "SingleLine",
outFields: ["Addr_type"],
name: esriBundle.widgets.Search.main.esriLocatorName,
localSearchOptions: {
minScale: 300000,
distance: 50000
},
placeholder: esriBundle.widgets.Search.main.placeholder,
highlightSymbol: new PictureMarkerSymbol(this.basePath + "/images/search-pointer.png", 36, 36).setOffset(9, 18)
});
//Set the sources above to the search widget
s.set("sources", sources);
s.startup();
});
</script>
</head>
<body>
<div id="search"></div>
<div id="map"></div>
</body>
</html>