How can I change "Find address or place" to "search" in the CSS? Can I override Esri's main.css file?
I put in "content: 'search;'" here. There was no change.
Here's where it seems to be in one of my CSS files.
@media (max-width: 480px)
.esri-input.esri-search__input {
visibility: visible;
font-size: 12px;
margin-right: 0px;
}
I tried this but there was no change:
content: "search" !important;
Solved! Go to Solution.
Jared,
Here is what I have tested and works for your scenario:
//search widget
var searchWidget = new Search({
view: view,
container: "searchDiv"
});
searchWidget.watch('activeSource', function(evt){
evt.placeholder = "blah blah";
});
You don't have anything missing -- you have too much.
"dojo/i18n!esri/nls/jsapi"
Needs to be removed. This is 3.x and you seem to be using 4.x based on the code you posted.
require([
"esri/Map",
"esri/views/MapView",
"esri/layers/FeatureLayer",
"esri/layers/GraphicsLayer",
"esri/widgets/Search",
"esri/widgets/Home",
"esri/widgets/Legend",
"esri/widgets/Expand",
"dojo/domReady!"
],
function (
Map, MapView, FeatureLayer, GraphicsLayer, Search, Home, Legend, Expand
)
Carson,
Actually the allPlaceholder property does not work in his case as he is not specifying any sources.
Thank you both. Right, i'm working with 4.9. I had ArcGIS API for JavaScript 4.9 as a tag, not in the title, which might have been a better idea.
Anyway, I took out the
"dojo/i18n!esri/nls/jsapi"
and also removed the allPlaceholder element. That wasn't it.
@Robert,
How do you explain what you did there? Did you create an event based on the searchWidget?
Jared,
In the code I am watching for the active source to be set and then set the place holder. 4.x does not really uses events much instead you watch properties.