Not sure if this is a default or not, but when I get my search results, only three fields show up. Regardless of how many I have set in my index.
Am I missing something? below is the code for the search:
sources.push({
featureLayer: new FeatureLayer("https://gis.cityofthornton.net/arcgis/rest/services/External_Webmaps/MasterAddress/MapServer/0 "),
searchFields: ["ADDRESS"],
displayField: "ADDRESS",
suggestionTemplate: "${ADDRESS}",
exactMatch: false,
outFields: ["PT_TYPE", "ADDRESS", "CITY", "STATE", "ZIPCODE", "BUS_NAME", "BUS_TYPE", "LANDUSE", "ZONING", "WARD", "SUBDIVISIO", "DEV_NAME"],
infoTemplate: new InfoTemplate("Address: ${ADDRESS}", "Address Type: ${PT_TYPE}</br>Address: ${ADDRESS}</br>City: ${CITY}", "State: ${STATE}</br>Zipcode: ${ZIPCODE}","Business Name: ${BUS_NAME}</br>Business Type: ${BUS_TYPE}</br>Landuse: ${LANDUSE}", "Zoning: ${ZONING}</br>Ward: ${WARD}", "Subdivision Name: ${SUBDIVISIO}</br>Development Name: ${DEV_NAME}"),
name: "Address Search",
placeholder: "Search Addresses",
maxResults: 6,
maxSuggestions: 6,
enableSuggestions: true,
minCharacters: 0
});
s.set("sources", sources);
s.startup();
Solved! Go to Solution.
Tyler,
The infoTemplate that you are creating does not have correct parameters. It takes only two parameters (title, content). There are extra "," inside contents:
infoTemplate: new InfoTemplate("Address: ${ADDRESS}", "Address Type: ${PT_TYPE}</br>Address: ${ADDRESS}</br>City: ${CITY}", "State: ${STATE}</br>Zipcode: ${ZIPCODE}","Business Name: ${BUS_NAME}</br>Business Type: ${BUS_TYPE}</br>Landuse: ${LANDUSE}", "Zoning: ${ZONING}</br>Ward: ${WARD}", "Subdivision Name: ${SUBDIVISIO}</br>Development Name: ${DEV_NAME}"),
Use it like this:
new InfoTemplate("Search Results", "Address: ${ADDRESS}</br>Address Type: ${PT_TYPE}</br>Address: ${ADDRESS}</br>City: ${CITY}</br>State: ${STATE}</br>Zipcode: ${ZIPCODE}</br>Business Name: ${BUS_NAME}</br>Business Type: ${BUS_TYPE}</br>Landuse: ${LANDUSE}</br>Zoning: ${ZONING}</br>Ward: ${WARD}</br>Subdivision Name: ${SUBDIVISIO}</br>Development Name: ${DEV_NAME}"),
-Girish
Is it always the same 3 fields?
Yeah it's always those first three. Here's a screen shot:
What happens if you separate ${CITY} and State with a </br>?
infoTemplate: new InfoTemplate("Address: ${ADDRESS}", "Address Type: ${PT_TYPE}</br>Address: ${ADDRESS}</br>City: ${CITY}", "State: ${STATE}</br>Zipcode: ${ZIPCODE}","Business Name: ${BUS_NAME}</br>Business Type: ${BUS_TYPE}</br>Landuse: ${LANDUSE}", "Zoning: ${ZONING}</br>Ward: ${WARD}", "Subdivision Name: ${SUBDIVISIO}</br>Development Name: ${DEV_NAME}"),
Even with it fixed for correct breaks, it doesn't work: Thanks for trying to problem solve with me
sources.push({
featureLayer: new FeatureLayer("https://gis.cityofthornton.net/arcgis/rest/services/External_Webmaps/MasterAddress/MapServer/0"),
searchFields: ["ADDRESS"],
displayField: "ADDRESS",
suggestionTemplate: "${ADDRESS}",
exactMatch: false,
outFields: ["PT_TYPE", "ADDRESS", "CITY", "STATE", "ZIPCODE", "BUS_NAME", "BUS_TYPE", "LANDUSE", "ZONING", "WARD", "SUBDIVISIO", "DEV_NAME"],
infoTemplate: new InfoTemplate("<b>Address: ${ADDRESS}</b>", "<b>Address Type: ${PT_TYPE}</br>","<b>Address: ${ADDRESS}</br>","<b>City: ${CITY}</b>", "<b>State: ${STATE}</br>","<b>Zipcode: ${ZIPCODE}</b>","<b>Business Name: ${BUS_NAME}</br>","<b>Business Type: ${BUS_TYPE}</br>","<b>Landuse: ${LANDUSE}</b>", "<b>Zoning: ${ZONING}</br>","<b>Ward: ${WARD}</b>", "<b>Subdivision Name: ${SUBDIVISIO}</br>","<b>Development Name: ${DEV_NAME}</b>"),
name: "Owner Search",
placeholder: "Search Owners",
maxResults: 6,
maxSuggestions: 6,
enableSuggestions: true,
minCharacters: 0
});
s.set("sources", sources);
s.startup();
Tyler,
The infoTemplate that you are creating does not have correct parameters. It takes only two parameters (title, content). There are extra "," inside contents:
infoTemplate: new InfoTemplate("Address: ${ADDRESS}", "Address Type: ${PT_TYPE}</br>Address: ${ADDRESS}</br>City: ${CITY}", "State: ${STATE}</br>Zipcode: ${ZIPCODE}","Business Name: ${BUS_NAME}</br>Business Type: ${BUS_TYPE}</br>Landuse: ${LANDUSE}", "Zoning: ${ZONING}</br>Ward: ${WARD}", "Subdivision Name: ${SUBDIVISIO}</br>Development Name: ${DEV_NAME}"),
Use it like this:
new InfoTemplate("Search Results", "Address: ${ADDRESS}</br>Address Type: ${PT_TYPE}</br>Address: ${ADDRESS}</br>City: ${CITY}</br>State: ${STATE}</br>Zipcode: ${ZIPCODE}</br>Business Name: ${BUS_NAME}</br>Business Type: ${BUS_TYPE}</br>Landuse: ${LANDUSE}</br>Zoning: ${ZONING}</br>Ward: ${WARD}</br>Subdivision Name: ${SUBDIVISIO}</br>Development Name: ${DEV_NAME}"),
-Girish