I am confused, this response does not seem to bear any relation to the
question. which I can't seem to find a satisfactory answer anywhere on
the web.

My problem is similar if not identical to the original question.

I am using the AJAX common loader as follows:

    <script type="text/javascript" src="http://www.google.co/jsapi?
key=mykey"></script>
    <script type="text/javascript">
        google.load("maps", "2");
        google.load("search", "1");
    </script>

I am embedding a google map into my document as follows:

        var gMap;
        var gLocalSearch;

        function initialize()
        {
            gMap = new GMap2(document.getElementById("map"));
            gLocalSearch = new google.search.LocalSearch(options);

...
        }
...

       google.setOnLoadCallback(initialize);


This works perfectly. I can query using the gLocalSearch object
external to the map. However, what I really want to do is use the
LocalSearch Control on the map itself. This works well using the old
G* notation without the new common loader, however when I use the
common loader as in the above example, and attempt to call
gMap.addControl(gLocalSearch); in rhw initialize function, I get the
following error:

a.initialize is not a function in main.js at line 622

I get the same error even if I include the old uds.js and
gmlocalsearch.js scripts directly after I have loaded the map and
search modules.

As a side note, gMap.enableGoogleBar() actually does show the local
search control correctly, however this method does not expose the
gLocalSearch interface used by the GoogleBar, which is what I need for
hotspot searches etc.

I hope a google maps expert out there could help resolve this issue

Many thanks!



On Nov 21 2008, 8:19 pm, "vishnu reddy" <[email protected]>
wrote:
> thank you very much ..for ur help ..
> i did using low level API..code for that is ..
>   // Load the Google Transliteration API
>       google.load("elements", "1", {
>             packages: "transliteration"
>           });
>
>       google.load("language", "1");
>
>     function initialize() {
>       var
> mytool_array=document.getElementById("transliteration").value.split(" ");
>
>       google.language.transliterate(mytool_array,
> google.elements.transliteration.LanguageCode.ENGLISH,
> google.elements.transliteration.LanguageCode.TELUGU, function(result) {
>             if (!result.error) {
>                  if (result.transliterations &&
> result.transliterations.length > 0 )
>                      {
>                      alert("inside if");
>                            var i=0;
>                            for(i=0;i<result.transliterations.length;i++){
>
>  if(result.transliterations[i].transliteratedWords.length > 0)
>
>                                document.getElementById("tranformed").value =
> document.getElementById("tranformed").value+"
> "+result.transliterations[i].transliteratedWords[0];
>                                                }
>
>                               }
>                   else{
>                       alert("failure");
>                       }
>             }
>           });
>
>     }
>
> 2008/11/21 Ben Lisbakken <[email protected]>
>
> > Hey Kevin,
> > Can you post a link to your code?  Then I can see what point you have
> > gotten to so I can help you fill in the blanks.  As far as using the loader,
> > you can check out some of these samples:
> >http://lisbakken.com/ajaxapi/interactive_samples/#localsearch_with_ma...
>
> > Thanks,
> > Ben
>
> > On Wed, Nov 19, 2008 at 4:20 PM, Kevin <[email protected]> wrote:
>
> >> I'm trying add a local search control to my Google map.  Examples from
> >> the documentation show the following setup
>
> >> ========================================
> >> // Load the Code
> >> <script src="http://www.google.com/uds/api?
> >> file=uds.js&v=1.0&key=ABCDEF<http://www.google.com/uds/api?file=uds.js&v=1.0&key=ABCDEF>
> >> "
> >>      type="text/javascript"></script>
> >> <script src="http://www.google.com/uds/solutions/localsearch/
> >> gmlocalsearch.js<http://www.google.com/uds/solutions/localsearch/gmlocalsearch.js>
> >> "
> >>      type="text/javascript"></script>
>
> >> // Load the Style Sheets
> >> <style type="text/css">
> >> �...@import url("http://www.google.com/uds/css/gsearch.css";);
> >> �...@import url("http://www.google.com/uds/solutions/localsearch/
> >> gmlocalsearch.css");
> >> </style>
> >> =========================================
> >> The following statement also appears in the documentation
>
> >> "Alternatively, you could use the AJAX Loader to load all of these
> >> modules via the common loader."
>
> >> I'm doing that succesfully with the Maps API and Visualization API but
> >> can't get it to work with the Search API.
>
> >> Can someone reply with a concrete example of using the common loader
> >> for this purpose.
>
> >> Thanks in advance for the help.

--~--~---------~--~----~------------~-------~--~----~
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