How To Search in the Map
Disable the built-in search widget with a parameter to the embedViewer API and use the search API from your own code.
<html>
<head>
<script type="text/javascript" src="map_data/swfobject.js"></script>
<script type="text/javascript" src="map_data/avenza.js"></script>
<script type="text/javascript">
var theMap = AVENZA.embedViewer("map", "750", "500",
{
baseURL:"map_data/",
searchWidget: false,
flashSecuritySandbox: AVENZA.AUTO_SANDBOX
}
);
function search() {
var o = document.getElementById("searchText");
if (o) {
theMap.search(o.value);
}
}
</script>
</head>
<body>
<div style="position:relative">
<div id="map">
</div>
<hr>
Enter a name of a state and click the "search" button. <br>
<input id="searchText" type="text"></input>
<button type="button" onclick="search()">Search</button>
</div>
</body>
</html>
You can see a live example here.
