Hi there

I am very much a newbie to the GMap API and the Ajax API, and am
building a site with an integrated map.  That side of things is
working quite well now, however I am struggling with getting the local
search to link to the map on my site.

My site is http://www.5vansite.com.


If I carry out a search using the local search, it returns the results
fine.  However once I click on the name of the town, it then opens a
new tab and takes me to Google's map of that area.  I would like to
get this to happen on the map on my page.

The only code I have for the search box is as follows:

      // Create a search control
      var searchControl = new google.search.SearchControl();
//        searchControl.style.width = '350px'; // set the control width
      // Add in a full set of searchers
      var localSearch = new google.search.LocalSearch();
      searchControl.addSearcher(localSearch);


      // Set the Local Search center point
      localSearch.setCenterPoint("United Kingdom");

      // Tell the searcher to draw itself and tell it where to attach
      searchControl.draw(document.getElementById("searchcontrol"));
      // Execute an inital search
      searchControl.execute("Google");

This is running within the Google Maps initialize function, which runs
on page load.  I am guessing I need to tie the two together somehow,
but I am at a complete loss as to how to do this.

Please could somebody help?

Thanks and regards
Noel

-- 
You received this message because you are subscribed to the Google Groups 
"Google AJAX APIs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-ajax-search-api?hl=en.

Reply via email to