Select to view content in your preferred language

Open search box by default - My Government Services

3988
7
Jump to solution
11-25-2015 02:13 PM
AllenScully
Frequent Contributor

Looking for the setting in either html code or js code to have the address search box open by default.  Fairly new to customizing these apps, so I'm guessing this a pretty simple setting if you know where to look.

Alternately, something like the initial map view here would be ideal (probably requires more involved configuration):

mgs_addresssearch.png

0 Kudos
1 Solution

Accepted Solutions
LuciHawkins
Frequent Contributor

Hi Rickey,

In an older version of My Government Services, ESRI has the following code which would be around Line 73 in the new version of default.htm

div style="width: 75px; margin-top: 7px;" class="customButton" onclick="HideSplashScreenMessage(); ShowLocateContainer();">

It calls the "ShowLocateContainer" function from Utils.js after someone closes the splash screen. I am not sure if the new version has that function in the Utils.js or not.  If it does not, I can post that function also.

Thanks,

Luci

View solution in original post

7 Replies
RickeyFight
MVP Regular Contributor

Allen,

What version of the app are you using?

Are you using this one:

http://tryitlive.arcgis.com/MyGovernmentServices/

0 Kudos
AllenScully
Frequent Contributor

Hi Rickey -

Thanks for the quick response.

Yes - that's the version we are using - is there an older one that is already configured like the screen shot?

We have our own geocoder hooked up, but we're replacing an old flex based app that had the search address open when the map was opened.

0 Kudos
RickeyFight
MVP Regular Contributor

Allen,

I would imagine that it is possible.  I have not found a way to do it yet.

0 Kudos
RickeyFight
MVP Regular Contributor

Allen,

Luci Hawkins got it to work with Fort Walton Beach here:

Park and Rec finder Activity automatically selected

Loading...

I know that the links are to parks and rec but the search tools are very similar. I would maybe ask a question and see if she will share how it was done. 

0 Kudos
LuciHawkins
Frequent Contributor

Hi Rickey,

In an older version of My Government Services, ESRI has the following code which would be around Line 73 in the new version of default.htm

div style="width: 75px; margin-top: 7px;" class="customButton" onclick="HideSplashScreenMessage(); ShowLocateContainer();">

It calls the "ShowLocateContainer" function from Utils.js after someone closes the splash screen. I am not sure if the new version has that function in the Utils.js or not.  If it does not, I can post that function also.

Thanks,

Luci

AllenScully
Frequent Contributor

Hi Luci and Rickey -

Yes indeed the Utils.js file still has the ShowLocateContainer, and adding it as Luci references like the older version works perfectly. 

Really appreciate your looking into this - still getting my feet wet with custom java script, so this is quite helpful. 

Thanks

Allen

0 Kudos
LuciHawkins
Frequent Contributor

Glad we could help and it is working for you

0 Kudos