Skip to content

Commit

Permalink
Add support for using default locator (vs. automatically enabling it …
Browse files Browse the repository at this point in the history
…if no locators provided).
  • Loading branch information
jcfranco committed Feb 26, 2013
1 parent 0b77d55 commit 54ac787
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/com/esri/viewer/components/SingleLineSearch.mxml
Original file line number Diff line number Diff line change
Expand Up @@ -177,14 +177,14 @@
return;
}
if (!configXML.geocoding.locator[0])
if (configXML.geocoding.@usedefaultlocator[0] != "false")
{
geocoder.useDefaultLocator = true;
locatorServicesConfigured = true;
return;
}
//backwards compatibility
else if (configXML.geocoding.locator.hasSimpleContent())
if (configXML.geocoding.locator[0]
&& configXML.geocoding.locator.hasSimpleContent())
{
//convert URL to locator XML
var url:String = configXML.geocoding.locator[0];
Expand All @@ -193,6 +193,12 @@
}
var locatorsToConfigure:int = configXML.geocoding.locator.length();
if (locatorsToConfigure == 0)
{
locatorServicesConfigured = true;
return;
}
var locatorServices:Array = [];
var locatorService:GeocoderLocatorService;
Expand Down

0 comments on commit 54ac787

Please sign in to comment.