Hi,
I am getting the below error s while implementing find places functionality in the application.
No overload matches this call.
const select = document.createElement('select', '');
Argument of type '{ location: any; categories: string[]; maxLocations: number; outFields: string[]; }' is not assignable to parameter of type 'LocatorAddressToLocationsParams'.
PFB the code snippet.
const findPlaces = (category: string, pt: any) => {
locator
.addressToLocations({
location: pt,
categories: [category],
maxLocations: 25,
outFields: ['Place_addr', 'PlaceName']
})
.then((results) => {
view.popup.close();
view.graphics.removeAll();
results.forEach((result) => {
view.graphics.add(
new Graphic({
attributes: result.attributes, // Data attributes returned
geometry: result.location, // Point returned
symbol: new SimpleMarkerSymbol({
type: 'simple-marker',
color: '#000000',
size: '12px',
outline: {
color: '#ffffff',
width: '2px'
}
}),
popupTemplate: {
title: '{PlaceName}', // Data attribute names
content: '{Place_addr}'
}
})
);
});
});
};