AnsweredAssumed Answered

Allow user to enter address for geocoding if  geoLocation not available?

Question asked by geonetadmin on Oct 19, 2012
Original User: schlot

Working through the geoLocation examples, what I don't see if an option for the user to specify an address if they don't have geoLocation available/enabled.  This seems like a no brainer to me, you easily center on a geocoded point as you can trying to have it be detected automatically.  You would just need to prompt the user to enter an address instead.
In my code, I'm trying to switch to the Settings view if navigator.location isn't available.  Then in the Settings view I would add a place for the user to enter their address.

When I try this, I do get the view to transition to the settings view, but I still have the heading for the Search Results view appearing above it. Obviously there's something else I need to check to see only the Settings view.

What am I missing here besides just the lines for checking geolocation?
 if (navigator.geolocation) {
                  watchProcess = navigator.geolocation.watchPosition(showLocation, showLocationError);
                  alert("Geolocation not supported on this device. Please enter an address.");
                 var widget = dijit.byId('settingsView');
                widget.performTransition('homeView', 1, "slide", null);