Thanks for helping Jeremy.
I think I need to define the search control because it has an
undefined error.
OK, here is what I have...
<script type="text/javascript">
//<![CDATA[
function initialize() {
if (GBrowserIsCompatible()) {
var icon = new GIcon();
icon.image = "link";
icon.iconSize = new GSize(30, 30);
icon.iconAnchor = new GPoint(5, 15);
icon.infoWindowAnchor = new GPoint(15, 5);
var map = new GMap2(document.getElementById("map"));
map.setCenter(new GLatLng(38.435035,-76.446304), 15);
map.addControl(new GSmallMapControl());
map.addControl(new GScaleControl());
map.addControl(new GMapTypeControl());
map.addControl(new GOverviewMapControl());
map.addControl(new google.maps.LocalSearch(
{
resultList : document.getElementById("results")
}),
new GControlPosition(G_ANCHOR_BOTTOM_LEFT, new
GSize(0,-30)));
var marker = new GMarker(new GLatLng(88.435035,-86.446304), icon);
map.addOverlay(marker);
}
}
GSearch.setOnLoadCallback(initialize);
//]]>
</script>
<div>
<asp:HyperLink runat="server" NavigateUrl="#" onclick="hotspot()"
id="HyperLink1">HyperLink</asp:HyperLink>
<script type="text/javascript">
function hotspot(){MyLocalSearchControl.execute("restaurant");}
</script>
</div>
Where do I define "MyLocalSearchControl"??
On May 19, 1:40 pm, "jgeerdes [AJAX APIs \"Guru\"]"
<
jgeer...@mchsi.com> wrote:
> I don't think there is built-in support for hotspots, but you can
> easily add the functionality. All you need to do is assign the would-
> be hotspot an onclick listener like the following:
>
> function(){myLocalSearchControl.execute("restaurant");}
>
> Jeremy R. Geerdes
> Effective website design & development
> Des Moines, IA
>
> For more information or a project quote:
http://jgeerdes.home.mchsi.com
>
jgeer...@mchsi.com