How can I change the title attribute of the locate widget?

1177
2
05-31-2017 10:22 AM
JackFairfield
Occasional Contributor II

In the 4.x api, I want to change the title attribute of the dom element in the locate widget.  The default value is "Default map view" which sounds misleading to the user.

I was thinking of using jquery to target the "esri-locate" and "esri-icon-locate" classes like this:

$(".esri-locate, .esri-icon-locate").prop('title', 'your new title');

This works when I run it in the console, but I can't figure out in which event I should put this to make sure the dom element is available.  Any help would be appreciated.

arcgis api for javascript 4‌ widget location‌ event listener‌ widget configuration‌

0 Kudos
2 Replies
RobertScheitlin__GISP
MVP Emeritus

Jack,

   According to the widgets nls file the title is suppose to be "Find my location". 

https://js.arcgis.com/4.3/esri/widgets/Locate/nls/Locate.js 

So this seems to be a bug/issue with the 4.x API. You should open a bug for this with tech support.

JackFairfield
Occasional Contributor II

Thanks Robert Scheitlin, GISP,

I have reached out to ESRI and my understanding is that this will be fixed with the 4.4 release.

I am still looking for an event that fires after everything loads in the map.  Something similar to the "Load" event that was in the 3.x version of the api.  Any suggestions? 

0 Kudos