How To Show a Callout for a Map Feature
Use the features and showCallout APIs to show callout bubbles programmatically. You can also use these API to have a specific callout opened when the map first loads.
<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/",
flashSecuritySandbox: AVENZA.AUTO_SANDBOX,
loadedCB: function () {
theMap.features('STATE_ABBR="MT"').showCallout();
}
}
);
function callout() {
theMap.features('STATE_ABBR="TX"').showCallout();
}
</script>
</head>
<body>
<div style="position:relative">
<div id="map">
</div>
<hr>
<button type="button" onclick="callout()">Show Callout</button>
</div>
</body>
</html>
You can see live example here.
