Icons
Geocode
LBS
Search
Route
Points
Miscellaneous
Index

AutoSuggest

The AutoSuggest class adds a pulldown menu of suggested street and cities to a text fields.
The user can either click directly on a suggestion to enter it into the field, or navigate the list using the up and down arrow keys.


Summary
The AutoSuggest class adds a pulldown menu of suggested street and cities to a text fields.
The user can either click directly on a suggestion to enter it into the field, or navigate the list using the up and down arrow keys.
The AutoSuggest constructor.
Creates a new auto suggest map instance and attach it to a city input text.
The AutoSuggest constructor.
Creates a new auto suggest map instance and attach it to a street input text.
Miscellaneous
An examples.

Constructors

AutoSuggest

Map(DomInputText streetTextInput
DomInputText cityTextInput)

The AutoSuggest constructor.
Creates a new auto suggest map instance and attach it to a street input text.

Parameters

streetTextInputThe street input text the auto suggest should be attached to.
cityTextInputThe city input text the auto suggest should be attached to.

AutoSuggest

Map(DomInputText streetTextInput)

The AutoSuggest constructor.
Creates a new auto suggest map instance and attach it to a city input text.

Parameters

streetTextInputThe input text the auto suggest should be attached to.

Example with state

<html>
<head>
	<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1255" />
	<script type="text/javascript" src="http://api.atlasct.co.il/SDK_V4/?
	  key=YOUR_KEY&GuiLang=eng"></script>
	<script language="JavaScript">
		var map = new Map(500,500);
	</script>
</head>
<body>
	<table>
	 <tr>
	  <td>
	    <table>
		 <tr>
		  <td>State</td>
		   <td><input type="text" id="stateS" size="18" dir="ltr" /></td>
		 </tr>
		 <tr>
		  <td>City</td>
		  <td><input type="text" id="cityS" size="18" dir="ltr" /></td>
		 </tr>
		 <tr>
		  <td>Street</td>
		  <td><input type="text" id="streetS"  size="18" dir="ltr" /></td>
		 </tr>
		</table>
	  </td>
	 </tr>
	 <tr>
	  <td height="100%">
	   <script language="javascript">map.writeMap();</script>
	  </td>
	 </tr>
	</table>
	<script language="javascript">
	 stateSAutoSuggest = new AutoSuggest(document.getElementById("stateS"))
	 citySAutoSuggest = new AutoSuggest(document.getElementById("cityS"),
	 document.getElementById("stateS"))
	 streetSAutoSuggest = new AutoSuggest(document.getElementById("streetS"),
	 document.getElementById("cityS"),document.getElementById("stateS"))
	</script>
</body>
</html>

Example without state

<html>
<head>
	<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1255" />
	<script type="text/javascript" src="http://api.atlasct.co.il/SDK_V4/?
	  key=YOUR_KEY&GuiLang=eng"></script>
	<script language="JavaScript">
		var map = new Map(500,500);
	</script>
</head>
<body>
	<table>
	 <tr>
	  <td>
	    <table>
		 <tr>
		  <td>City</td>
		  <td><input type="text" id="cityS" size="18" dir="ltr" /></td>
		 </tr>
		 <tr>
		  <td>Street</td>
		  <td><input type="text" id="streetS"  size="18" dir="ltr" /></td>
		 </tr>
		</table>
	  </td>
	 </tr>
	 <tr>
	  <td height="100%">
	   <script language="javascript">map.writeMap();</script>
	  </td>
	 </tr>
	</table>
	<script language="javascript">
	 citySAutoSuggest = new AutoSuggest(document.getElementById("cityS"))
	 streetSAutoSuggest = new AutoSuggest(document.getElementById("streetS"),
	 document.getElementById("cityS"))
	</script>
</body>
</html>