Select to view content in your preferred language

Locator in AppStudio MapViewer App

1359
8
Jump to solution
03-14-2019 01:06 PM
RyanPettit1
Emerging Contributor

I am attempting my first app using AppStudio and I have a problem with the locator (magnifying glass) in the app not using the locator that is selected for the Web Map that I am referencing in the App.  I have created a Locator in ArcGIS Online for the area I want users to be able to search.  Is there a way to assign what locator I want the App to utilize so users are finding locations nearby in Illinois using my locator instead of in Norway using the ESRI World locator?

Thanks

1 Solution

Accepted Solutions
ErwinSoekianto
Esri Alum

Ryan, 

At this point, we are using the Esri World Geocoding service by default. This is a great enhancement, that we will bring it up to the team, to be added as either configurable property on the setting page or automatically using the locator of the Webmap. 

With that being said, you can change the source to change the URL of the Locator Task to your own for now, on MapViewer/views/SearchPage.qml around line ~500. See below, 

P.S. Click on the "Edit" menu option in the AppStudio Desktop to go the source code the app. 

Thank you,

Erwin

View solution in original post

8 Replies
ErwinSoekianto
Esri Alum

Ryan, 

At this point, we are using the Esri World Geocoding service by default. This is a great enhancement, that we will bring it up to the team, to be added as either configurable property on the setting page or automatically using the locator of the Webmap. 

With that being said, you can change the source to change the URL of the Locator Task to your own for now, on MapViewer/views/SearchPage.qml around line ~500. See below, 

P.S. Click on the "Edit" menu option in the AppStudio Desktop to go the source code the app. 

Thank you,

Erwin

RyanPettit1
Emerging Contributor

Just realized that I need to have a Standard License to make that edit and

then upload the apk so I can upload it to the Google Play Console. Is that

true or is there a way around that?

0 Kudos
ErwinSoekianto
Esri Alum

Yes, you would need AppStudio Standard license to upload your app and do Cloud Make to make a apk build.

0 Kudos
RyanPettit1
Emerging Contributor

Dang.

Thanks.

0 Kudos
RyanPettit1
Emerging Contributor

Thanks Erwin!  Worked like a charm!

0 Kudos
ShericeSnell
Emerging Contributor

Hi Erwin,

Can you happen to use 2 different geocodes? How would you script that in?

0 Kudos
ErwinSoekianto
Esri Alum

You would have two LocatorTask QML objects, with two different ids and switch them around as the user selects it from the UI. 

ShericeSnell
Emerging Contributor

Thanks Erwin!

0 Kudos