I am creating a web application and I require the measurement widget, however it does not work alongside my other widgets. It does show up but it does not function and I am not able to see dots, initial points or lines.
Please see application in codepen:
https://codepen.io/chesouye/pen/ZEqrZwg
Solved! Go to Solution.
I have another concern. How do i remove the ArcGIS World Geocoding Service option from my feature search?
Try setting sources to an empty array, then setting it separately
var search = new Search({
view: view,
allPlaceholder: "Search",
sources: []
});
search.viewModel.sources = [{
layer: parish,
searchFields: ["PARISH_NAM"],
displayField: "PARISH_NAM",
exactMatch: false,
outFields: ["OBJECTID", "PARISH_NAM"],
name: "Parishes",
placeholder: "example: Kingston"
},
{
layer: ed,
searchFields: ["ED_NAME"],
displayField: "ED_NAME",
exactMatch: false,
outFields: ["ED_NO", "ED_NAME"],
name: "Electoral Divisions",
placeholder: "example: Kingston"
},
{
layer: consti,
searchFields: ["CONST_NAME"],
displayField: "CONST_NAME",
exactMatch: false,
outFields: ["CONST_NO", "CONST_NAME"],
name: "Constituency",
placeholder: "example: Kingston Central"
},
{
layer: ed_colored,
searchFields: ["Name", "Party"],
suggestionTemplate: "{Name}, Party: {Party}",
exactMatch: false,
outFields: ["*"],
placeholder: "Anomalies",
name: "Anomalies",
zoomScale: 500000,
resultSymbol: {
type: "picture-marker", // autocasts as new PictureMarkerSymbol()
url:
"https://developers.arcgis.com/javascript/latest/sample-code/widgets-search-multiplesource/live/images/senate.png",
height: 36
}
}];
It still is showing the geocoding service.
I would suggest opening another question on this then.